diff --git a/docs/todo.md b/docs/todo.md index 3110f4e73..a1b1a9b41 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -1,4 +1,5 @@ - clean up logging, use chalk to do colored warnings/errors and make logging look very nice and informative (no emojis) +- License header should be read from spine-libgdx/spine-libgdx/src/.../Skeleton.java in c-writer and not embedded in the file. - it's weird that method generation comes before array specialization. i'd assume method generation should get the specialization and use those to output the correct array type for return types and parameters and error if an array type is not specialized? - type extractor should also report typedefs like typedef long long PropertyId; so primitive type to some name, and we need to handle that in the codegen - Generate language bindings from spine-cpp-lite diff --git a/docs/todos/work/2025-07-08-22-31-47-review-spine-c-new-codegen/task.md b/docs/todos/work/2025-07-08-22-31-47-review-spine-c-new-codegen/task.md index 170b8f618..2b69fd12d 100644 --- a/docs/todos/work/2025-07-08-22-31-47-review-spine-c-new-codegen/task.md +++ b/docs/todos/work/2025-07-08-22-31-47-review-spine-c-new-codegen/task.md @@ -2,7 +2,7 @@ **Status:** In Progress **Created:** 2025-07-08T22:31:47 -**Agent PID:** 40566 +**Agent PID:** 42523 ## Context for Resumption **Read these files in full into your context** @@ -35,7 +35,10 @@ Interactive review of the spine-c-new code generator with user confirmation at e - [x] Remove unused `opaqueTypeGen` variable (line 135) - [x] Extract const/non-const conflict checking (lines 141-198) into its own function `checkConstNonConstConflicts` with proper documentation -## exclusions.ts (complete) +## exclusions.ts +- [x] Add field exclusion parsing support (field: Type::field) +- [x] Add granular field accessor exclusions: field-get: Type::field and field-set: Type::field +- [x] Support excluding all field accessors for a type: field: Type, field-get: Type, field-set: Type - [x] Change Exclusion type to be a discriminated union: `{ kind: 'type', typeName: string } | { kind: 'method', typeName: string, methodName: string, isConst?: boolean }` - [x] Document in the Exclusion type definition (in types.ts) that `isConst` refers to method const (i.e., `void meh() const`), not return type const - [x] Remove unnecessary logging of `isConst` in parseExclusion @@ -94,12 +97,35 @@ Interactive review of the spine-c-new code generator with user confirmation at e ## index.ts (continued) - [x] Add function to check all method return and parameter types for multi-level pointers (e.g., **) and error out early -## array-generator.ts -- [ ] Remove unused typesJson field - it's passed to constructor but never used as a field -- [ ] Remove spine/Array.h include since spine/spine.h already includes it -- [ ] Remove Array/~Array constructor/destructor check - Member now has explicit constructor/destructor types -- [ ] Fix template parameter replacement - Array methods are templated, need to replace T with actual element type -- [ ] **MAJOR REFACTOR**: Extract common method/constructor generation logic to avoid duplication between generators +## checks.ts +- [x] Add checkFieldAccessorConflicts to detect when generated getters/setters would conflict with existing methods + +## ir-generator.ts +- [x] Add static RTTI method for classes that have getRTTI() - generate spine__rtti() that returns &Type::rtti +- [x] Handle method overloads with same name but different parameters - use descriptive suffix like constructors (e.g., spine_animation_search, spine_animation_search_with_step) +- [x] Honor constructor exclusions (e.g., method: Atlas::Atlas) - constructors weren't checking exclusions +- [x] Add logging with indentation when methods/constructors are excluded due to exclusions +- [x] Add getters and setters for public fields - generate spine__get_ and spine__set_ methods (type extractor only provides public members) +- [x] Fix redundant enum value names - remove duplicate enum name prefix from values (e.g., TextureFilter::TextureFilterNearest becomes SPINE_TEXTURE_FILTER_NEAREST) +- [x] Add field exclusion support (field: Type::field) and check for unsupported types like Array in fields +- [x] Add checkTypeSupport function to validate types before trying to convert them +- [x] Fix constructor generation - only generate constructors that are explicitly public, never assume implicit default constructor (could be private) +- [x] Don't error on missing constructors for abstract classes - they can't be instantiated anyway but are useful to wrap +- [x] Fix constructor argument handling - cast pointer parameters from opaque C types to C++ types (e.g., spine_skeleton_data to SkeletonData*) +- [x] Unify argument handling - buildCppArgs now used by constructors, methods, and array methods +- [x] Unify return statement generation - generateReturnStatement shared between methods and array methods + +## array-generator.ts (complete) +- [x] Remove unused typesJson field - it's passed to constructor but never used as a field +- [x] Remove spine/Array.h include since spine/spine.h already includes it +- [x] Remove Array/~Array constructor/destructor check - Member now has explicit constructor/destructor types +- [x] Fix template parameter replacement - Array methods are templated, need to replace T with actual element type +- [x] **MAJOR REFACTOR**: Extract common method/constructor generation logic to avoid duplication between generators + +## file-writer.ts (merged into c-writer.ts) +- [x] Remove unused writeType and writeEnum methods (only writeTypeRaw and writeEnumRaw are used) +- [x] Rename writeTypeRaw/writeEnumRaw to just writeClassOrStruct/writeEnum since the old ones are unused +- [x] Merged all functionality into c-writer.ts ## Architecture Refactor - Intermediate Representation @@ -107,7 +133,7 @@ Interactive review of the spine-c-new code generator with user confirmation at e ```typescript interface CParameter { name: string; // Parameter name in C - cType: string; // C type (e.g., "float*", "spine_bone") + cType: string; // C type (e.g., "float*", "spine_bone") cppType: string; // Original C++ type (e.g., "float&", "Bone*") isOutput: boolean; // true for non-const references that become output params } @@ -152,33 +178,63 @@ class CWriter { // Handle SPINE_C_API macros // Format with proper spacing } - + writeClassSource(type: CClassOrStruct): string { // Generate all function implementations // Just output the body from each CMethod } - + writeEnumHeader(enumType: CEnum): string { // Generate enum declaration } - + private writeMethodDeclaration(method: CMethod): string private writeMethodImplementation(method: CMethod): string ``` -### Refactoring Steps: -- [ ] Create c-types.ts with IR types -- [ ] Create c-writer.ts with CWriter class -- [ ] Create ir-generator.ts with functions to convert Type → C types: - - [ ] `generateConstructors(type: ClassOrStruct): CMethod[]` - - [ ] `generateDestructor(type: ClassOrStruct): CMethod` - - [ ] `generateMethods(type: ClassOrStruct): CMethod[]` - - [ ] `generateArrayMethods(elementType: string, cTypeName: string, arrayType: ClassOrStruct): CMethod[]` - - [ ] `generateEnum(enumType: Enum): CEnum` -- [ ] Update index.ts to use new architecture: - - [ ] Generate CClassOrStruct for each class/struct type - - [ ] Generate CEnum for each enum type - - [ ] Pass to CWriter to generate code - - [ ] For arrays, generate specialized CClassOrStruct with array methods -- [ ] Delete old generators after verification -- [ ] Verify output is byte-for-byte identical to current output +### Refactoring Steps (complete): +- [x] Create c-types.ts with IR types +- [x] Create c-writer.ts with CWriter class +- [x] Create ir-generator.ts with functions to convert Type → C types: + - [x] `generateConstructors(type: ClassOrStruct): CMethod[]` + - [x] `generateDestructor(type: ClassOrStruct): CMethod` + - [x] `generateMethods(type: ClassOrStruct): CMethod[]` + - [x] `generateArrayMethods(elementType: string, cTypeName: string, arrayType: ClassOrStruct): CMethod[]` + - [x] `generateEnum(enumType: Enum): CEnum` +- [x] Update index.ts to use new architecture: + - [x] Generate CClassOrStruct for each class/struct type + - [x] Generate CEnum for each enum type + - [x] Pass to CWriter to generate code + - [x] For arrays, generate specialized CClassOrStruct with array methods +- [x] Delete old generators after verification +- [x] Verify output is working (some minor issues with RTTI and const types to fix later) + +## Error Fixes +- [x] Fix exclusions.txt to use :: instead of . for method separators +- [x] Add missing exclusions for unsupported array types (Array, Array>) +- [x] Make unsupported array types a hard error instead of warning +- [x] Filter out excluded sources before reporting array errors +- [x] Add isFieldExcluded, isFieldGetterExcluded, isFieldSetterExcluded functions +- [x] Fix abstract class instantiation (Attachment) - don't generate constructors for abstract classes +- [x] Fix mixin class constructors (BoneTimeline) - only generate constructors for classes that inherit from SpineObject +- [x] Fix method name conflicts with type names (spine_bone_pose) - added checkMethodTypeNameConflicts check and excluded Bone::pose +- [x] Add exclusions for BoneTimeline1 and BoneTimeline2 (have pure virtual methods but not detected as abstract) +- [x] Fix method overload naming conflicts - include type information in suffix for methods with same names but different parameter types +- [x] Fix static methods returning value types - Color::valueOf returns Color not Color* - added checkValueReturns and excluded Color::valueOf +- [x] Enhanced type extractor to extract protected members (with access level) for proper abstract class detection +- [x] Fixed BoneTimeline1/BoneTimeline2 abstract detection by including protected pure virtual methods +- [x] Fix checkValueReturns to allow enum return values (enums are just integers in C) + +## warnings.ts + +## type-extractor.ts +- [x] Fix inheritance processing order - addInheritedMethods assumes parent types are already processed but extractTypes doesn't guarantee this order +- [x] Bug: Method name hiding - DeformTimeline has protected apply(5 params) which hides inherited public apply(8 params) from SlotCurveTimeline due to C++ name hiding rules +- [x] Bug: addInheritedMethods was missing guard check and not setting inheritedMethodsAdded flag, causing duplicate inherited methods + +## ir-generator.ts (continued) +- [x] Fix inherited method calls to use base class cast when fromSupertype is set to avoid C++ name hiding issues +- [x] Fix naming conflict between methods named "create" and constructors - always add suffix to create methods + +## checks.ts (continued) +- [x] Fix checkConstNonConstConflicts - it was checking for different return types instead of checking for const vs non-const methods diff --git a/spine-c-new/codegen/exclusions.txt b/spine-c-new/codegen/exclusions.txt index 76b8f7a73..c423dcbaf 100644 --- a/spine-c-new/codegen/exclusions.txt +++ b/spine-c-new/codegen/exclusions.txt @@ -1,5 +1,4 @@ # Excluded types (whole type is skipped) -type: SkeletonClipping type: Triangulator type: SpineObject type: TextureLoader @@ -14,6 +13,7 @@ type: AnimationStateListenerObject type: Pool type: ArrayUtils type: BlockAllocator +type: Block type: MathUtil type: Array type: PoolObject @@ -24,24 +24,37 @@ type: EventQueue type: Json type: BaseTimeline -# We handle those in extensions.cpp through a simpler mechanism +# We handle those in extensions.cpp through more idiomatic means method: AnimationState::setListener method: AnimationState::addListener method: AnimationState::removeListener method: AnimationState::clearListeners method: TrackEntry::setListener method: TrackEntry::getListener +method: Atlas::Atlas -# Used in UE4, not used anywhere else +# Used in UE4/cocos2dx, not used anywhere else method: AnimationState::setRendererObject method: TrackEntry::setRendererObject -# Array methods need special handling -method: AttachmentTimeline.getAttachmentNames +# Array returning methods and fields not supported +method: AttachmentTimeline::getAttachmentNames +method: Skin::findNamesForSlot +field: AtlasRegion::names + +# Array> returning methods not supported +method: DeformTimeline::getVertices +method: DrawOrderTimeline::getDrawOrders # Can not emulate AttachmentMap::Entries, as that's stack allocated method: Skin::getAttachments +# Method/type name conflicts +method: Bone::pose + +# Methods that return objects by value (not supported - would need heap allocation) +method: Color::valueOf + # Exclude const versions of getSetupPose() - we'll only expose the non-const version method: BoneData::getSetupPose const method: ConstraintDataGeneric::getSetupPose const @@ -51,4 +64,8 @@ method: PhysicsConstraintData::getSetupPose const method: PosedDataGeneric::getSetupPose const method: SliderData::getSetupPose const method: SlotData::getSetupPose const -method: TransformConstraintData::getSetupPose const \ No newline at end of file +method: TransformConstraintData::getSetupPose const + +# Exclude setters and constructor for RenderCommand +method: RenderCommand::RenderCommand +field-set: RenderCommand \ No newline at end of file diff --git a/spine-c-new/codegen/src/array-scanner.ts b/spine-c-new/codegen/src/array-scanner.ts index 5d56fbdf2..9cfc77b59 100644 --- a/spine-c-new/codegen/src/array-scanner.ts +++ b/spine-c-new/codegen/src/array-scanner.ts @@ -1,5 +1,7 @@ import { Type, ArraySpecialization, isPrimitive, toSnakeCase, Member } from './types'; import { WarningsCollector } from './warnings'; +import { Exclusion } from './types'; +import { isMethodExcluded, isFieldExcluded, isFieldGetterExcluded } from './exclusions'; // Note: This regex won't correctly parse nested arrays like Array> // It will match "Array" instead of the full type. @@ -31,7 +33,7 @@ function extractArrayTypes( /** * Scans included spine-cpp types to find Array specializations */ -export function scanArraySpecializations(includedTypes: Type[]): ArraySpecialization[] { +export function scanArraySpecializations(includedTypes: Type[], exclusions: Exclusion[]): ArraySpecialization[] { const arrayTypes = new Map(); const warnings = new WarningsCollector(); @@ -70,25 +72,63 @@ export function scanArraySpecializations(includedTypes: Type[]): ArraySpecializa const elementType = elementMatch[1].trim(); + // Filter out excluded sources + const filteredSources = sources.filter(source => { + const typeName = source.type.name; + const member = source.member; + + // Check if the entire type is excluded + if (exclusions.some(e => e.kind === 'type' && e.typeName === typeName)) { + return false; + } + + // Check based on member kind + switch (member.kind) { + case 'method': + // Check if method is excluded + return !isMethodExcluded(typeName, member.name, exclusions, member); + + case 'field': + // Check if field is excluded (all accessors) + if (isFieldExcluded(typeName, member.name, exclusions)) { + return false; + } + // Check if field getter is excluded + if (isFieldGetterExcluded(typeName, member.name, exclusions)) { + return false; + } + // Field is included if at least setter is not excluded + return true; + + default: + return true; + } + }); + + // Skip if all sources are excluded + if (filteredSources.length === 0) { + continue; + } + // For template types, check if element type is a template parameter const firstSource = sources[0]; const sourceType = firstSource.type; if (sourceType.kind !== "enum" && sourceType.isTemplate && sourceType.templateParams?.includes(elementType)) { // Warn about template placeholders like T, K - warnings.addWarning(arrayType, `Template class uses generic array with template parameter '${elementType}'`, sources); + warnings.addWarning(arrayType, `Template class uses generic array with template parameter '${elementType}'`, filteredSources); continue; } // Check for const element types (not allowed in arrays) if (elementType.startsWith('const ') || elementType.includes(' const ')) { - warnings.addWarning(arrayType, "Arrays should not have const element types", sources); + warnings.addWarning(arrayType, "Arrays should not have const element types", filteredSources); continue; } // Check for multi-level pointers (unsupported, should be caught by checkMultiLevelPointers in index.ts) const pointerCount = (elementType.match(/\*/g) || []).length; if (pointerCount > 1) { - warnings.addWarning(arrayType, "Multi-level pointers are not supported", sources); + warnings.addWarning(arrayType, "Multi-level pointers are not supported", filteredSources); continue; } @@ -135,13 +175,13 @@ export function scanArraySpecializations(includedTypes: Type[]): ArraySpecializa // Check for problematic types if (elementType.startsWith('Array<')) { // C doesn't support nested templates, would need manual Array> implementation - warnings.addWarning(arrayType, "C doesn't support nested templates", sources); + warnings.addWarning(arrayType, "C doesn't support nested templates", filteredSources); continue; } if (elementType === 'String') { // String arrays should use const char** instead - warnings.addWarning(arrayType, "String arrays should use const char** in C API", sources); + warnings.addWarning(arrayType, "String arrays should use const char** in C API", filteredSources); continue; } @@ -161,8 +201,21 @@ export function scanArraySpecializations(includedTypes: Type[]): ArraySpecializa }); } - // Print warnings - warnings.printWarnings('Array Generation Warnings:'); + // Print warnings and exit if there are any unsupported types + if (warnings.hasWarnings()) { + warnings.printWarnings('Array Generation Errors:'); + console.error('\nERROR: Found unsupported array types that cannot be wrapped in C.'); + console.error('You must either:'); + console.error(' 1. Modify the C++ code to avoid these types'); + console.error(' 2. Add method/field exclusions to exclusions.txt'); + console.error('\nExample exclusions:'); + console.error(' method: AttachmentTimeline::getAttachmentNames'); + console.error(' field: AtlasRegion::names'); + console.error(' method: DeformTimeline::getVertices'); + console.error(' method: DrawOrderTimeline::getDrawOrders'); + console.error(' method: Skin::findNamesForSlot'); + process.exit(1); + } // Sort specializations: primitives first, then enums, then pointers specializations.sort((a, b) => { diff --git a/spine-c-new/codegen/src/c-types.ts b/spine-c-new/codegen/src/c-types.ts new file mode 100644 index 000000000..2597b3d3e --- /dev/null +++ b/spine-c-new/codegen/src/c-types.ts @@ -0,0 +1,34 @@ +import { ClassOrStruct, Enum } from './types'; + +export interface CParameter { + name: string; // Parameter name in C + cType: string; // C type (e.g., "float*", "spine_bone") + cppType: string; // Original C++ type (e.g., "float&", "Bone*") + isOutput: boolean; // true for non-const references that become output params +} + +export interface CMethod { + name: string; // Full C function name (e.g., "spine_bone_get_x") + returnType: string; // C return type + parameters: CParameter[]; + body: string; // The actual implementation code (e.g., "return ((Bone*)self)->getX();") +} + +export interface CClassOrStruct { + name: string; // C type name (e.g., "spine_bone") + cppType: ClassOrStruct; // Original C++ type info + constructors: CMethod[]; // All constructors (including default) + destructor: CMethod; // Always present (calls delete) + methods: CMethod[]; // All methods +} + +export interface CEnumValue { + name: string; // C enum value name (e.g., "SPINE_BLEND_MODE_NORMAL") + value?: string; // Optional explicit value +} + +export interface CEnum { + name: string; // C type name (e.g., "spine_blend_mode") + cppType: Enum; // Original C++ enum info + values: CEnumValue[]; // Converted enum values +} \ No newline at end of file diff --git a/spine-c-new/codegen/src/c-writer.ts b/spine-c-new/codegen/src/c-writer.ts new file mode 100644 index 000000000..82055c9a8 --- /dev/null +++ b/spine-c-new/codegen/src/c-writer.ts @@ -0,0 +1,350 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import { Type, toSnakeCase } from './types'; +import { CClassOrStruct, CEnum, CMethod, CParameter } from './c-types'; + +const LICENSE_HEADER = fs.readFileSync(path.join(__dirname, '../../../spine-cpp/spine-cpp/src/spine/Skeleton.cpp'), 'utf8').split('\n').slice(0, 28).join('\n'); + +/** Generates strings for CClassOrStruct and CEnum, and writes them to files. */ +export class CWriter { + constructor(private outputDir: string) { + // Clean and recreate output directory + this.cleanOutputDirectory(); + } + + private cleanOutputDirectory(): void { + // Remove existing generated directory if it exists + if (fs.existsSync(this.outputDir)) { + console.log(`Cleaning ${this.outputDir}...`); + fs.rmSync(this.outputDir, { recursive: true, force: true }); + } + + // Recreate the directory + fs.mkdirSync(this.outputDir, { recursive: true }); + } + + writeClassHeader(type: CClassOrStruct): string { + const lines: string[] = []; + + // Add header guard + const guardName = `SPINE_${type.name.toUpperCase()}_H`; + lines.push(`#ifndef ${guardName}`); + lines.push(`#define ${guardName}`); + lines.push(''); + + // Add includes + lines.push('#include "../base.h"'); + lines.push('#include "types.h"'); + lines.push(''); + + // Add extern C + lines.push('#ifdef __cplusplus'); + lines.push('extern "C" {'); + lines.push('#endif'); + lines.push(''); + + // Add all method declarations + for (const constructor of type.constructors) { + lines.push(this.writeMethodDeclaration(constructor)); + } + + if (type.constructors.length > 0) { + lines.push(''); + } + + lines.push(this.writeMethodDeclaration(type.destructor)); + lines.push(''); + + for (const method of type.methods) { + lines.push(this.writeMethodDeclaration(method)); + } + + // Close extern C + lines.push(''); + lines.push('#ifdef __cplusplus'); + lines.push('}'); + lines.push('#endif'); + lines.push(''); + lines.push(`#endif /* ${guardName} */`); + + return lines.join('\n'); + } + + writeClassSource(type: CClassOrStruct): string { + const lines: string[] = []; + + // Add includes + lines.push(`#include "${type.name.replace("spine_", "")}.h"`); + lines.push('#include '); + lines.push(''); + lines.push('using namespace spine;'); + lines.push(''); + + // Add all method implementations + for (const constructor of type.constructors) { + lines.push(this.writeMethodImplementation(constructor)); + lines.push(''); + } + + lines.push(this.writeMethodImplementation(type.destructor)); + lines.push(''); + + for (const method of type.methods) { + lines.push(this.writeMethodImplementation(method)); + lines.push(''); + } + + return lines.join('\n').trim() + '\n'; + } + + writeEnumHeader(enumType: CEnum): string { + const lines: string[] = []; + + // Add header guard + const guardName = `SPINE_${enumType.name.toUpperCase()}_H`; + lines.push(`#ifndef ${guardName}`); + lines.push(`#define ${guardName}`); + lines.push(''); + + // Add extern C + lines.push('#ifdef __cplusplus'); + lines.push('extern "C" {'); + lines.push('#endif'); + lines.push(''); + + // Add enum declaration + lines.push(`typedef enum ${enumType.name} {`); + + for (let i = 0; i < enumType.values.length; i++) { + const value = enumType.values[i]; + const comma = i < enumType.values.length - 1 ? ',' : ''; + + if (value.value) { + lines.push(` ${value.name} = ${value.value}${comma}`); + } else { + lines.push(` ${value.name}${comma}`); + } + } + + lines.push(`} ${enumType.name};`); + + // Close extern C + lines.push(''); + lines.push('#ifdef __cplusplus'); + lines.push('}'); + lines.push('#endif'); + lines.push(''); + lines.push(`#endif /* ${guardName} */`); + + return lines.join('\n'); + } + + private writeMethodDeclaration(method: CMethod): string { + const params = this.formatParameters(method.parameters); + return `SPINE_C_API ${method.returnType} ${method.name}(${params});`; + } + + private writeMethodImplementation(method: CMethod): string { + const params = this.formatParameters(method.parameters); + const signature = `${method.returnType} ${method.name}(${params})`; + + return `${signature} { + ${method.body} +}`; + } + + private formatParameters(parameters: CParameter[]): string { + if (parameters.length === 0) { + return 'void'; + } + + return parameters + .map(p => `${p.cType} ${p.name}`) + .join(', '); + } + + async writeType(typeName: string, headerContent: string, sourceContent?: string): Promise { + const fileName = toSnakeCase(typeName); + + // Write header file + const headerPath = path.join(this.outputDir, `${fileName}.h`); + fs.writeFileSync(headerPath, headerContent); + + // Write source file (as .cpp since it contains C++ code) + if (sourceContent) { + const sourcePath = path.join(this.outputDir, `${fileName}.cpp`); + fs.writeFileSync(sourcePath, sourceContent); + } + } + + async writeMainHeader(cClasses: CClassOrStruct[]): Promise { + const mainHeaderPath = path.join(this.outputDir, '..', '..', 'include', 'spine-c.h'); + + // Ensure include directory exists + const includeDir = path.dirname(mainHeaderPath); + if (!fs.existsSync(includeDir)) { + fs.mkdirSync(includeDir, { recursive: true }); + } + + const lines = [ + LICENSE_HEADER, + '', + '#ifndef SPINE_C_H', + '#define SPINE_C_H', + '', + '// Base definitions', + '#include "../src/base.h"', + '', + '// All type declarations and enum includes', + '#include "../src/generated/types.h"', + '', + '// Extension types & functions', + '#include "../src/extensions.h"', + '', + '// Generated class types' + ]; + + // Add class includes (they contain the actual function declarations) + for (const classType of cClasses) { + lines.push(`#include "../src/generated/${classType.name.replace("spine_", "")}.h"`); + } + + lines.push(''); + lines.push('#endif // SPINE_C_H'); + + fs.writeFileSync(mainHeaderPath, lines.join('\n')); + } + + async writeArrays(cArrayTypes: CClassOrStruct[]): Promise { + console.log('\nGenerating arrays.h/arrays.cpp...'); + + // Generate header + const arrayHeaderLines: string[] = []; + { + arrayHeaderLines.push(LICENSE_HEADER); + arrayHeaderLines.push(''); + arrayHeaderLines.push('#ifndef SPINE_C_ARRAYS_H'); + arrayHeaderLines.push('#define SPINE_C_ARRAYS_H'); + arrayHeaderLines.push(''); + arrayHeaderLines.push('#include "../base.h"'); + arrayHeaderLines.push('#include "types.h"'); + arrayHeaderLines.push(''); + arrayHeaderLines.push('#ifdef __cplusplus'); + arrayHeaderLines.push('extern "C" {'); + arrayHeaderLines.push('#endif'); + arrayHeaderLines.push(''); + + // Add opaque type declarations + for (const arrayType of cArrayTypes) { + arrayHeaderLines.push(`SPINE_OPAQUE_TYPE(${arrayType.name})`); + } + + arrayHeaderLines.push(''); + + // Add all method declarations + for (const arrayType of cArrayTypes) { + arrayHeaderLines.push(arrayType.constructors.map(c => this.writeMethodDeclaration(c)).join('\n\n')); + arrayHeaderLines.push(this.writeMethodDeclaration(arrayType.destructor)); + arrayHeaderLines.push(arrayType.methods.map(c => this.writeMethodDeclaration(c)).join('\n\n')); + arrayHeaderLines.push(''); + } + + // Close extern C + arrayHeaderLines.push('#ifdef __cplusplus'); + arrayHeaderLines.push('}'); + arrayHeaderLines.push('#endif'); + arrayHeaderLines.push(''); + arrayHeaderLines.push('#endif /* SPINE_C_ARRAYS_H */'); + } + + // Generate source + const arraySourceLines: string[] = []; + { + arraySourceLines.push(LICENSE_HEADER); + arraySourceLines.push(''); + arraySourceLines.push('#include "arrays.h"'); + arraySourceLines.push('#include '); + arraySourceLines.push(''); + arraySourceLines.push('using namespace spine;'); + arraySourceLines.push(''); + + // Add all method implementations + for (const arrayType of cArrayTypes) { + arraySourceLines.push(arrayType.constructors.map(c => this.writeMethodImplementation(c)).join('\n\n')); + arraySourceLines.push(this.writeMethodImplementation(arrayType.destructor)); + arraySourceLines.push(arrayType.methods.map(c => this.writeMethodImplementation(c)).join('\n\n')); + arraySourceLines.push(''); + } + } + + const headerPath = path.join(this.outputDir, 'arrays.h'); + const sourcePath = path.join(this.outputDir, 'arrays.cpp'); + + fs.writeFileSync(headerPath, arrayHeaderLines.join('\n')); + fs.writeFileSync(sourcePath, arraySourceLines.join('\n')); + } + + /** Writes the types.h file, which includes all class forward declarations and enum types. */ + async writeTypesHeader(cClasses: CClassOrStruct[], cEnums: CEnum[]): Promise { + const headerPath = path.join(this.outputDir, 'types.h'); + const lines: string[] = [ + LICENSE_HEADER, + '', + '#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' + ]; + + // Forward declare all class types + for (const classType of cClasses) { + lines.push(`SPINE_OPAQUE_TYPE(${classType.name})`); + } + + lines.push(''); + lines.push('// Include all enum types (cannot be forward declared)'); + + // Include all enum headers + for (const enumType of cEnums) { + lines.push(`#include "${enumType.name.replace("spine_", "")}.h"`); + } + + lines.push(''); + lines.push('// Array specializations'); + lines.push('#include "arrays.h"'); + + lines.push(''); + lines.push('#ifdef __cplusplus'); + lines.push('}'); + lines.push('#endif'); + lines.push(''); + lines.push('#endif // SPINE_C_TYPES_H'); + + fs.writeFileSync(headerPath, lines.join('\n')); + } + + async writeAll(cClasses: CClassOrStruct[], cEnums: CEnum[], cArrayTypes: CClassOrStruct[]): Promise { + await this.writeTypesHeader(cClasses, cEnums); + await this.writeMainHeader(cClasses); + await this.writeArrays(cArrayTypes); + + // Write all class files + for (const classType of cClasses) { + const headerContent = this.writeClassHeader(classType); + const sourceContent = this.writeClassSource(classType); + await this.writeType(classType.name.replace("spine_", ""), headerContent, sourceContent); + } + + // Write all enum headers + for (const enumType of cEnums) { + const headerContent = this.writeEnumHeader(enumType); + await this.writeType(enumType.name.replace("spine_", ""), headerContent); + } + } +} \ No newline at end of file diff --git a/spine-c-new/codegen/src/checks.ts b/spine-c-new/codegen/src/checks.ts new file mode 100644 index 000000000..f6d798b7b --- /dev/null +++ b/spine-c-new/codegen/src/checks.ts @@ -0,0 +1,421 @@ +import { isMethodExcluded } from "./exclusions"; +import { Exclusion, Method, Field, Type } from "./types"; +import { ClassOrStruct, toSnakeCase, isPrimitive } from "./types"; + +/** + * Checks for methods that have both const and non-const versions with different return types. + * This is a problem for C bindings because C doesn't support function overloading. + * + * In C++, you can have: + * T& getValue(); // for non-const objects + * const T& getValue() const; // for const objects + * + * But in C, we can only have one function with a given name, so we need to detect + * and report these conflicts. + * + * @param classes - Array of class/struct types to check + * @param exclusions - Exclusion rules to skip specific methods + * @returns Array of conflicts found, or exits if conflicts exist + */ +export function checkConstNonConstConflicts(classes: ClassOrStruct[], exclusions: Exclusion[]): void { + const conflicts: Array<{ type: string, method: string }> = []; + + for (const type of classes) { + if (type.members === undefined) { + continue; + } + + // Get all non-static methods + const allMethods = type.members?.filter(m => + m.kind === 'method' && + !m.isStatic + ) as Method[] | undefined; + + if (allMethods) { + const methodGroups = new Map(); + for (const method of allMethods) { + // Skip if this specific const/non-const version is excluded + if (isMethodExcluded(type.name, method.name, exclusions, { isConst: method.isConst })) { + continue; + } + const key = method.name + '(' + (method.parameters?.map(p => p.type).join(',') || '') + ')'; + if (!methodGroups.has(key)) { + methodGroups.set(key, []); + } + methodGroups.get(key)!.push(method as Method); + } + + for (const [signature, group] of methodGroups) { + if (group.length > 1) { + // Check if we have both const and non-const versions + const hasConst = group.some(m => m.isConst === true); + const hasNonConst = group.some(m => m.isConst === false); + + if (hasConst && hasNonConst) { + conflicts.push({ type: type.name, method: group[0].name }); + } + } + } + } + } + + // If we found conflicts, report them all and exit + if (conflicts.length > 0) { + console.error("\n" + "=".repeat(80)); + console.error("SUMMARY OF ALL CONST/NON-CONST METHOD CONFLICTS"); + console.error("=".repeat(80)); + console.error(`\nFound ${conflicts.length} method conflicts across the codebase:\n`); + + for (const conflict of conflicts) { + console.error(` - ${conflict.type}::${conflict.method}()`); + } + + console.error("\nThese methods have both const and non-const versions in C++ which cannot"); + console.error("be represented in the C API. You need to either:"); + console.error(" 1. Add these to exclusions.txt"); + console.error(" 2. Modify the C++ code to avoid const/non-const overloading"); + console.error("=".repeat(80) + "\n"); + + process.exit(1); + } +} + +/** + * Checks for multi-level pointers in method signatures and errors if found + */ +export function checkMultiLevelPointers(types: ClassOrStruct[]) { + const errors: { type: string, member: string, signature: string }[] = []; + + // Helper to check if a type has multi-level pointers + function hasMultiLevelPointers(typeStr: string): boolean { + // First check the outer type (after removing template content) + let outerType = typeStr; + + // Extract all template contents for separate checking + const templateContents: string[] = []; + let depth = 0; + let templateStart = -1; + + for (let i = 0; i < typeStr.length; i++) { + if (typeStr[i] === '<') { + if (depth === 0) { + templateStart = i + 1; + } + depth++; + } else if (typeStr[i] === '>') { + depth--; + if (depth === 0 && templateStart !== -1) { + templateContents.push(typeStr.substring(templateStart, i)); + templateStart = -1; + } + } + } + + // Remove all template content from outer type + outerType = outerType.replace(/<[^>]+>/g, '<>'); + + // Check outer type for consecutive pointers + if (/\*\s*\*/.test(outerType)) { + return true; + } + + // Recursively check template contents + for (const content of templateContents) { + if (hasMultiLevelPointers(content)) { + return true; + } + } + + return false; + } + + for (const type of types) { + if (!type.members) continue; + + for (const member of type.members) { + if (member.kind === 'method') { + // Check return type + if (hasMultiLevelPointers(member.returnType)) { + errors.push({ + type: type.name, + member: member.name, + signature: `return type: ${member.returnType}` + }); + } + + // Check parameters + if (member.parameters) { + for (const param of member.parameters) { + if (hasMultiLevelPointers(param.type)) { + errors.push({ + type: type.name, + member: member.name, + signature: `parameter '${param.name}': ${param.type}` + }); + } + } + } + } else if (member.kind === 'field') { + // Check field type + if (hasMultiLevelPointers(member.type)) { + errors.push({ + type: type.name, + member: member.name, + signature: `field type: ${member.type}` + }); + } + } + } + } + + // If we found multi-level pointers, report them and exit + if (errors.length > 0) { + console.error("\n" + "=".repeat(80)); + console.error("MULTI-LEVEL POINTER ERROR"); + console.error("=".repeat(80)); + console.error(`\nFound ${errors.length} multi-level pointer usage(s) which are not supported:\n`); + + for (const error of errors) { + console.error(` - ${error.type}::${error.member} - ${error.signature}`); + } + + console.error("\nMulti-level pointers (e.g., char**, void***) cannot be represented in the C API."); + console.error("You need to either:"); + console.error(" 1. Refactor the C++ code to avoid multi-level pointers"); + console.error(" 2. Exclude these types/methods in exclusions.txt"); + console.error("=".repeat(80) + "\n"); + + process.exit(1); + } +} + +/** + * Checks for conflicts between generated field accessors and existing methods. + * For example, if a class has a public field 'x' and also has methods getX() or setX(), + * the generated getters/setters would conflict. + */ +export function checkFieldAccessorConflicts(classes: ClassOrStruct[], exclusions: Exclusion[]): void { + const conflicts: Array<{ type: string, field: string, conflictingMethod: string, accessorType: 'getter' | 'setter' }> = []; + + for (const type of classes) { + if (!type.members) continue; + + // Get all non-static fields + const fields = type.members.filter(m => + m.kind === 'field' && + !m.isStatic + ) as Field[]; + + // Get all methods + const methods = type.members.filter(m => + m.kind === 'method' + ) as Method[]; + + // For each field, check if getter/setter would conflict + for (const field of fields) { + const fieldNameSnake = toSnakeCase(field.name); + const getterName = `get_${fieldNameSnake}`; + const setterName = `set_${fieldNameSnake}`; + + // Check for getter conflicts + for (const method of methods) { + if (isMethodExcluded(type.name, method.name, exclusions, { isConst: method.isConst })) { + continue; + } + + const methodNameSnake = toSnakeCase(method.name); + + // Check if this method would conflict with the generated getter + if (methodNameSnake === getterName || methodNameSnake === `get${field.name.toLowerCase()}`) { + conflicts.push({ + type: type.name, + field: field.name, + conflictingMethod: method.name, + accessorType: 'getter' + }); + } + + // Check if this method would conflict with the generated setter + if (!field.type.includes('const') && !field.type.endsWith('&')) { + if (methodNameSnake === setterName || methodNameSnake === `set${field.name.toLowerCase()}`) { + conflicts.push({ + type: type.name, + field: field.name, + conflictingMethod: method.name, + accessorType: 'setter' + }); + } + } + } + } + } + + // If we found conflicts, report them + if (conflicts.length > 0) { + console.error("\n" + "=".repeat(80)); + console.error("FIELD ACCESSOR CONFLICTS"); + console.error("=".repeat(80)); + console.error(`\nFound ${conflicts.length} conflicts between public fields and existing methods:\n`); + + for (const conflict of conflicts) { + console.error(` - ${conflict.type}::${conflict.field} would generate ${conflict.accessorType} that conflicts with ${conflict.type}::${conflict.conflictingMethod}()`); + } + + console.error("\nThese fields have corresponding getter/setter methods in C++."); + console.error("You should either:"); + console.error(" 1. Make the field private/protected in C++"); + console.error(" 2. Exclude the conflicting method in exclusions.txt"); + console.error(" 3. Add field exclusion support to skip generating accessors for specific fields"); + console.error("=".repeat(80) + "\n"); + + process.exit(1); + } +} + +/** + * Checks for method names that would conflict with type names when converted to C. + * For example, if we have a type BonePose (→ spine_bone_pose) and a method Bone::pose() (→ spine_bone_pose) + */ +export function checkMethodTypeNameConflicts(classes: ClassOrStruct[], allTypes: Type[], exclusions: Exclusion[]): void { + const conflicts: Array<{ className: string, methodName: string, conflictingType: string }> = []; + + // Build a set of all C type names + const cTypeNames = new Set(); + for (const type of allTypes) { + cTypeNames.add(`spine_${toSnakeCase(type.name)}`); + } + + // Check all methods + for (const type of classes) { + if (!type.members) continue; + + const methods = type.members!.filter(m => + m.kind === 'method' + ) as Method[]; + + for (const method of methods) { + // Skip excluded methods + if (isMethodExcluded(type.name, method.name, exclusions, method)) { + continue; + } + + // Generate the C function name + const cFunctionName = `spine_${toSnakeCase(type.name)}_${toSnakeCase(method.name)}`; + + // Check if this conflicts with any type name + if (cTypeNames.has(cFunctionName)) { + // Find which type it conflicts with + const conflictingType = allTypes.find(t => + `spine_${toSnakeCase(t.name)}` === cFunctionName + ); + + if (conflictingType) { + conflicts.push({ + className: type.name, + methodName: method.name, + conflictingType: conflictingType!.name + }); + } + } + } + } + + // Report conflicts + if (conflicts.length > 0) { + console.error("\n" + "=".repeat(80)); + console.error("METHOD/TYPE NAME CONFLICTS"); + console.error("=".repeat(80)); + console.error(`\nFound ${conflicts.length} method names that conflict with type names:\n`); + + for (const conflict of conflicts) { + console.error(` - ${conflict.className}::${conflict.methodName}() conflicts with type ${conflict.conflictingType}`); + console.error(` Both generate the same C name: spine_${toSnakeCase(conflict.className)}_${toSnakeCase(conflict.methodName)}`); + } + + console.error("\nThese conflicts cannot be resolved automatically. You must either:"); + console.error(" 1. Rename the method or type in C++"); + console.error(" 2. Exclude the method in exclusions.txt"); + console.error(" 3. Exclude the conflicting type in exclusions.txt"); + console.error("=".repeat(80) + "\n"); + + process.exit(1); + } +} + +/** + * Checks for methods that return non-primitive types by value. + * These cannot be wrapped in C without heap allocation. + */ +export function checkValueReturns(classes: ClassOrStruct[], allTypes: Type[], exclusions: Exclusion[]): void { + const issues: Array<{ type: string, method: string, returnType: string }> = []; + + // Build a set of enum type names for quick lookup + const enumTypes = new Set(); + for (const type of allTypes) { + if (type.kind === 'enum') { + enumTypes.add(type.name); + } + } + + for (const type of classes) { + if (!type.members) continue; + + const methods = type.members.filter(m => + m.kind === 'method' + ) as Method[]; + + for (const method of methods) { + // Skip excluded methods + if (isMethodExcluded(type.name, method.name, exclusions, method)) { + continue; + } + + const returnType = method.returnType; + + // Skip void, primitives, pointers, and references + if (returnType === 'void' || + isPrimitive(returnType) || + returnType.endsWith('*') || + returnType.endsWith('&')) { + continue; + } + + // Skip String (handled specially) + if (returnType === 'String' || returnType === 'const String') { + continue; + } + + // Skip enums (they're just integers in C) + if (enumTypes.has(returnType)) { + continue; + } + + // This is a non-primitive type returned by value + issues.push({ + type: type.name, + method: method.name, + returnType: returnType + }); + } + } + + // Report issues + if (issues.length > 0) { + console.error("\n" + "=".repeat(80)); + console.error("METHODS RETURNING OBJECTS BY VALUE"); + console.error("=".repeat(80)); + console.error(`\nFound ${issues.length} methods that return non-primitive types by value:\n`); + + for (const issue of issues) { + console.error(` - ${issue.type}::${issue.method}() returns ${issue.returnType}`); + } + + console.error("\nC cannot return objects by value through opaque pointers."); + console.error("You must either:"); + console.error(" 1. Change the C++ method to return a pointer or reference"); + console.error(" 2. Exclude the method in exclusions.txt"); + console.error("=".repeat(80) + "\n"); + + process.exit(1); + } +} \ No newline at end of file diff --git a/spine-c-new/codegen/src/exclusions.ts b/spine-c-new/codegen/src/exclusions.ts index 9b7e1e035..96120b36c 100644 --- a/spine-c-new/codegen/src/exclusions.ts +++ b/spine-c-new/codegen/src/exclusions.ts @@ -9,6 +9,11 @@ import { Exclusion } from './types'; * - Empty lines are ignored * - Type exclusions: "type: TypeName" * - Method exclusions: "method: TypeName::methodName [const]" + * - Field exclusions: "field: TypeName[::fieldName]" + * - Field getter exclusions: "field-get: TypeName[::fieldName]" + * - Field setter exclusions: "field-set: TypeName[::fieldName]" + * + * When fieldName is omitted, applies to all fields of that type. * * Examples: * ``` @@ -22,6 +27,19 @@ import { Exclusion } from './types'; * * # Exclude only const version of a method * method: BoneData::getSetupPose const + * + * # Exclude constructors (allows type but prevents creation) + * method: AtlasRegion::AtlasRegion + * + * # Exclude field accessors + * field: AtlasRegion::names # Exclude both getter and setter + * field-get: SecretData::password # Exclude only getter + * field-set: Bone::x # Exclude only setter (read-only) + * + * # Exclude all field accessors for a type + * field: RenderCommand # No field accessors at all + * field-get: DebugData # No getters (write-only fields) + * field-set: RenderCommand # No setters (read-only fields) * ``` */ export function loadExclusions(filePath: string): Exclusion[] { @@ -58,7 +76,60 @@ export function loadExclusions(filePath: string): Exclusion[] { methodName: methodName, isConst: isConst || undefined }); + continue; + } + // Parse field exclusion (all accessors) + // Format: field: Type::field or field: Type (for all fields) + const fieldMatch = trimmed.match(/^field:\s*(.+?)(?:::(.+?))?$/); + if (fieldMatch) { + const typeName = fieldMatch[1].trim(); + const fieldName = fieldMatch[2]?.trim(); + + if (fieldName) { + // Specific field + exclusions.push({ + kind: 'field', + typeName, + fieldName + }); + } else { + // All fields - add both field-get and field-set for the type + exclusions.push({ + kind: 'field-get', + typeName, + fieldName: '*' // Special marker for all fields + }); + exclusions.push({ + kind: 'field-set', + typeName, + fieldName: '*' + }); + } + continue; + } + + // Parse field getter exclusion + // Format: field-get: Type::field or field-get: Type (for all fields) + const fieldGetMatch = trimmed.match(/^field-get:\s*(.+?)(?:::(.+?))?$/); + if (fieldGetMatch) { + exclusions.push({ + kind: 'field-get', + typeName: fieldGetMatch[1].trim(), + fieldName: fieldGetMatch[2]?.trim() || '*' + }); + continue; + } + + // Parse field setter exclusion + // Format: field-set: Type::field or field-set: Type (for all fields) + const fieldSetMatch = trimmed.match(/^field-set:\s*(.+?)(?:::(.+?))?$/); + if (fieldSetMatch) { + exclusions.push({ + kind: 'field-set', + typeName: fieldSetMatch[1].trim(), + fieldName: fieldSetMatch[2]?.trim() || '*' + }); } } @@ -85,4 +156,41 @@ export function isMethodExcluded(typeName: string, methodName: string, exclusion }); return result; +} + +export function isFieldExcluded(typeName: string, fieldName: string, exclusions: Exclusion[]): boolean { + return exclusions.some(ex => { + if (ex.kind === 'field' && ex.typeName === typeName && ex.fieldName === fieldName) { + return true; + } + return false; + }); +} + +export function isFieldGetterExcluded(typeName: string, fieldName: string, exclusions: Exclusion[]): boolean { + return exclusions.some(ex => { + if (ex.kind === 'field-get' && ex.typeName === typeName && + (ex.fieldName === fieldName || ex.fieldName === '*')) { + return true; + } + // If the entire field is excluded, getter is also excluded + if (ex.kind === 'field' && ex.typeName === typeName && ex.fieldName === fieldName) { + return true; + } + return false; + }); +} + +export function isFieldSetterExcluded(typeName: string, fieldName: string, exclusions: Exclusion[]): boolean { + return exclusions.some(ex => { + if (ex.kind === 'field-set' && ex.typeName === typeName && + (ex.fieldName === fieldName || ex.fieldName === '*')) { + return true; + } + // If the entire field is excluded, setter is also excluded + if (ex.kind === 'field' && ex.typeName === typeName && ex.fieldName === fieldName) { + return true; + } + return false; + }); } \ No newline at end of file diff --git a/spine-c-new/codegen/src/index.ts b/spine-c-new/codegen/src/index.ts index e4ee03865..ae8720a7a 100644 --- a/spine-c-new/codegen/src/index.ts +++ b/spine-c-new/codegen/src/index.ts @@ -1,226 +1,30 @@ #!/usr/bin/env node -import * as fs from 'fs'; import * as path from 'path'; -import { Type, Member, SpineTypes, toSnakeCase, Exclusion, ClassOrStruct } from './types'; -import { loadExclusions, isTypeExcluded, isMethodExcluded } from './exclusions'; -import { ConstructorGenerator } from './generators/constructor-generator'; -import { MethodGenerator } from './generators/method-generator'; -import { EnumGenerator } from './generators/enum-generator'; -import { ArrayGenerator } from './generators/array-generator'; -import { FileWriter } from './file-writer'; -import { extractTypes, loadTypes } from './type-extractor'; -import { scanArraySpecializations } from './array-scanner'; - -/** - * Checks for methods that have both const and non-const versions with different return types. - * This is a problem for C bindings because C doesn't support function overloading. - * - * In C++, you can have: - * T& getValue(); // for non-const objects - * const T& getValue() const; // for const objects - * - * But in C, we can only have one function with a given name, so we need to detect - * and report these conflicts. - * - * @param classes - Array of class/struct types to check - * @param exclusions - Exclusion rules to skip specific methods - * @returns Array of conflicts found, or exits if conflicts exist - */ -function checkConstNonConstConflicts(classes: ClassOrStruct[], exclusions: Exclusion[]): void { - const conflicts: Array<{ type: string, method: string }> = []; - - for (const type of classes) { - if (type.members === undefined) { - continue; - } - - // Get all non-static methods first - const allMethods = type.members?.filter(m => m.kind === 'method').filter(m => !m.isStatic); - - if (allMethods) { - const methodGroups = new Map>(); - for (const method of allMethods) { - if (method.name === 'getSetupPose') { - console.log(`Skipping excluded method: ${type.name}::${method.name}${method.isConst ? ' const' : ''}`); - } - // Skip if this specific const/non-const version is excluded - if (isMethodExcluded(type.name, method.name, exclusions, method)) { - continue; - } - const key = method.name + '(' + (method.parameters?.map(p => p.type).join(',') || '') + ')'; - if (!methodGroups.has(key)) { - methodGroups.set(key, []); - } - methodGroups.get(key)!.push(method); - } - - for (const [signature, group] of methodGroups) { - if (group.length > 1) { - const returnTypes = new Set(group.map(m => m.returnType)); - if (returnTypes.size > 1) { - conflicts.push({ type: type.name, method: group[0].name }); - } - } - } - } - } - - // If we found conflicts, report them all and exit - if (conflicts.length > 0) { - console.error("\n" + "=".repeat(80)); - console.error("SUMMARY OF ALL CONST/NON-CONST METHOD CONFLICTS"); - console.error("=".repeat(80)); - console.error(`\nFound ${conflicts.length} method conflicts across the codebase:\n`); - - for (const conflict of conflicts) { - console.error(` - ${conflict.type}::${conflict.method}()`); - } - - console.error("\nThese methods have both const and non-const versions in C++ which cannot"); - console.error("be represented in the C API. You need to either:"); - console.error(" 1. Add these to exclusions.txt"); - console.error(" 2. Modify the C++ code to avoid const/non-const overloading"); - console.error("=".repeat(80) + "\n"); - - process.exit(1); - } -} - -/** - * Checks for multi-level pointers in method signatures and errors if found - */ -function checkMultiLevelPointers(types: ClassOrStruct[]) { - const errors: {type: string, member: string, signature: string}[] = []; - - // Helper to check if a type has multi-level pointers - function hasMultiLevelPointers(typeStr: string): boolean { - // First check the outer type (after removing template content) - let outerType = typeStr; - - // Extract all template contents for separate checking - const templateContents: string[] = []; - let depth = 0; - let templateStart = -1; - - for (let i = 0; i < typeStr.length; i++) { - if (typeStr[i] === '<') { - if (depth === 0) { - templateStart = i + 1; - } - depth++; - } else if (typeStr[i] === '>') { - depth--; - if (depth === 0 && templateStart !== -1) { - templateContents.push(typeStr.substring(templateStart, i)); - templateStart = -1; - } - } - } - - // Remove all template content from outer type - outerType = outerType.replace(/<[^>]+>/g, '<>'); - - // Check outer type for consecutive pointers - if (/\*\s*\*/.test(outerType)) { - return true; - } - - // Recursively check template contents - for (const content of templateContents) { - if (hasMultiLevelPointers(content)) { - return true; - } - } - - return false; - } - - for (const type of types) { - if (!type.members) continue; - - for (const member of type.members) { - if (member.kind === 'method') { - // Check return type - if (hasMultiLevelPointers(member.returnType)) { - errors.push({ - type: type.name, - member: member.name, - signature: `return type: ${member.returnType}` - }); - } - - // Check parameters - if (member.parameters) { - for (const param of member.parameters) { - if (hasMultiLevelPointers(param.type)) { - errors.push({ - type: type.name, - member: member.name, - signature: `parameter '${param.name}': ${param.type}` - }); - } - } - } - } else if (member.kind === 'field') { - // Check field type - if (hasMultiLevelPointers(member.type)) { - errors.push({ - type: type.name, - member: member.name, - signature: `field type: ${member.type}` - }); - } - } - } - } - - // If we found multi-level pointers, report them and exit - if (errors.length > 0) { - console.error("\n" + "=".repeat(80)); - console.error("MULTI-LEVEL POINTER ERROR"); - console.error("=".repeat(80)); - console.error(`\nFound ${errors.length} multi-level pointer usage(s) which are not supported:\n`); - - for (const error of errors) { - console.error(` - ${error.type}::${error.member} - ${error.signature}`); - } - - console.error("\nMulti-level pointers (e.g., char**, void***) cannot be represented in the C API."); - console.error("You need to either:"); - console.error(" 1. Refactor the C++ code to avoid multi-level pointers"); - console.error(" 2. Exclude these types/methods in exclusions.txt"); - console.error("=".repeat(80) + "\n"); - - process.exit(1); - } -} +import { CWriter } from './c-writer'; +import { checkConstNonConstConflicts, checkMultiLevelPointers, checkFieldAccessorConflicts, checkMethodTypeNameConflicts, checkValueReturns } from './checks'; +import { isTypeExcluded, loadExclusions } from './exclusions'; +import { generateArrays, generateTypes } from './ir-generator'; +import { extractTypes } from './type-extractor'; +import { ClassOrStruct } from './types'; async function main() { - // Extract types if needed - extractTypes(); - - console.log('Loading type information...'); - - // Load all necessary data - const typesJson = loadTypes() as SpineTypes; + // Load all exclusions const exclusions = loadExclusions(path.join(__dirname, '../exclusions.txt')); - // Flatten all types from all headers into a single array - const allTypes: Type[] = []; - for (const header of Object.keys(typesJson)) { - allTypes.push(...typesJson[header]); - } + // Extract ALL types from spine-cpp first (needed for inheritance checking) + const allExtractedTypes = extractTypes(); + allExtractedTypes.sort((a, b) => a.name.localeCompare(b.name)); - // Create a map of all types for easy lookup - const typeMap = new Map(); - for (const type of allTypes) { - typeMap.set(type.name, type); - } + // Then filter out excluded and template types + let arrayType: ClassOrStruct | undefined; + const types = allExtractedTypes.filter(type => { + // Store the Array type, needed for array specializations + if (type.name === 'Array' && type.kind !== 'enum') { + arrayType = type as ClassOrStruct; + } - - // Filter types: only exclude templates and manually excluded types - const includedTypes = allTypes.filter(type => { if (isTypeExcluded(type.name, exclusions)) { + console.log(`Excluding type due to exclusions.txt: ${type.name}`); return false; } @@ -234,9 +38,13 @@ async function main() { return true; }); + if (!arrayType) { + throw new Error('Array type not found in types'); + } + // Separate classes and enums - const classes = includedTypes.filter(t => t.kind !== "enum"); - const enums = includedTypes.filter(t => t.kind === 'enum'); + const classes = types.filter(t => t.kind !== "enum"); + const enums = types.filter(t => t.kind === 'enum'); console.log(`Found ${classes.length} classes/structs and ${enums.length} enums to generate`); @@ -246,76 +54,22 @@ async function main() { // Check for multi-level pointers checkMultiLevelPointers(classes); - // Create a set of valid type names for type checking - const validTypes = new Set(includedTypes.map(t => t.name)); + // Check for field accessor conflicts + checkFieldAccessorConflicts(classes, exclusions); - // Initialize generators - const constructorGen = new ConstructorGenerator(validTypes); - const methodGen = new MethodGenerator(exclusions, validTypes); - const enumGen = new EnumGenerator(); - const fileWriter = new FileWriter(path.join(__dirname, '../../src/generated')); + // Check for method/type name conflicts + checkMethodTypeNameConflicts(classes, allExtractedTypes, exclusions); + // Check for methods returning objects by value + checkValueReturns(classes, allExtractedTypes, exclusions); - // Generate code for each type - for (const type of classes) { - console.log(`Generating ${type.name}...`); + // Generate C intermediate representation for classes, enums and arrays + const { cTypes, cEnums } = await generateTypes(types, exclusions, allExtractedTypes); + const cArrayTypes = await generateArrays(types, arrayType, exclusions); - const headerContent: string[] = []; - const sourceContent: string[] = []; - - // Source includes - sourceContent.push(`#include "${toSnakeCase(type.name)}.h"`); - sourceContent.push('#include '); - sourceContent.push(''); - sourceContent.push('using namespace spine;'); - sourceContent.push(''); - - // Opaque type is already in types.h, don't generate it here - - // Generate constructors - const constructors = constructorGen.generate(type); - if (constructors.declarations.length > 0) { - headerContent.push(...constructors.declarations); - sourceContent.push(...constructors.implementations); - } - - // Generate methods - const methods = methodGen.generate(type); - if (methods.declarations.length > 0) { - headerContent.push(...methods.declarations); - sourceContent.push(...methods.implementations); - } - - // Write files - await fileWriter.writeType(type.name, headerContent, sourceContent); - } - - // Generate enum files - for (const enumType of enums) { - console.log(`Generating enum ${enumType.name}...`); - const enumCode = enumGen.generate(enumType); - await fileWriter.writeEnum(enumType.name, enumCode); - } - - // Generate Array specializations - console.log('\nScanning for Array specializations...'); - const arraySpecs = scanArraySpecializations(includedTypes); - console.log(`Found ${arraySpecs.length} array specializations to generate`); - - if (arraySpecs.length > 0) { - console.log('\nGenerating arrays.h/arrays.cpp...'); - const arrayGen = new ArrayGenerator(typesJson); - const { header, source } = arrayGen.generate(arraySpecs); - - // Write arrays.h and arrays.cpp - await fileWriter.writeArrays(header, source); - } - - // Generate types.h file (includes arrays.h) - await fileWriter.writeTypesHeader(classes, enums); - - // Generate main header file - await fileWriter.writeMainHeader(classes, enums); + // Write all files to disk + const cWriter = new CWriter(path.join(__dirname, '../../src/generated')); + await cWriter.writeAll(cTypes, cEnums, cArrayTypes); console.log('Code generation complete!'); } diff --git a/spine-c-new/codegen/src/ir-generator.ts b/spine-c-new/codegen/src/ir-generator.ts new file mode 100644 index 000000000..4bcffce01 --- /dev/null +++ b/spine-c-new/codegen/src/ir-generator.ts @@ -0,0 +1,916 @@ +import { ClassOrStruct, Enum, Member, Constructor, Method, Field, Destructor, Parameter, Type } from './types'; +import { CClassOrStruct, CEnum, CMethod, CParameter, CEnumValue } from './c-types'; +import { toSnakeCase, toCFunctionName, toCTypeName, isPrimitive, checkTypeSupport } from './types'; +import { Exclusion } from './types'; +import { ArraySpecialization } from './types'; +import { scanArraySpecializations } from './array-scanner'; +import { isFieldExcluded, isFieldGetterExcluded, isFieldSetterExcluded } from './exclusions'; + +/** + * Checks if a type inherits from SpineObject (directly or indirectly) + */ +function inheritsFromSpineObject(type: ClassOrStruct, allTypes: Map): boolean { + // Check direct inheritance + if (type.superTypes?.includes('SpineObject')) { + return true; + } + + // Check indirect inheritance through all supertypes + if (type.superTypes) { + for (const superTypeName of type.superTypes) { + // Strip template parameters for lookup + // e.g., "PosedDataGeneric" -> "PosedDataGeneric" + const baseTypeName = superTypeName.split('<')[0].trim(); + + const superType = allTypes.get(baseTypeName); + if (superType && superType.kind !== 'enum') { + if (inheritsFromSpineObject(superType, allTypes)) { + return true; + } + } + } + } + + return false; +} + +export function generateConstructors(type: ClassOrStruct, knownTypeNames: Set, exclusions: Exclusion[], allTypes: Map): CMethod[] { + const constructors: CMethod[] = []; + const cTypeName = `spine_${toSnakeCase(type.name)}`; + const cppTypeName = type.name; + + // Abstract classes cannot be instantiated + if (type.isAbstract) { + console.log(` ${type.name} is abstract - no constructors generated`); + return constructors; + } + + // Only generate constructors for classes that inherit from SpineObject + // (they have the location-based operator new) + if (!inheritsFromSpineObject(type, allTypes)) { + console.log(` ${type.name} does not inherit from SpineObject - no constructors generated`); + return constructors; + } + + // Find all constructors (we only have public members in the JSON) + const ctorMembers = (type.members || []) + .filter(m => m.kind === 'constructor') as Constructor[]; + + // Check if all constructors are excluded + const allConstructorsExcluded = exclusions.some(e => + e.kind === 'method' && + e.typeName === type.name && + e.methodName === type.name // Constructor has same name as class + ); + + if (allConstructorsExcluded) { + // If all constructors are excluded, don't generate any + console.log(` Excluding constructor: ${type.name}::${type.name}`); + return constructors; + } + + // Only generate constructors that are explicitly defined as public + // We cannot assume anything about implicit constructors since: + // 1. For classes, the default constructor is private by default + // 2. There might be a private/protected default constructor we don't know about + // The type extractor only shows public members + + // Check if this type has no public constructors + if (ctorMembers.length === 0) { + // Check if constructor is explicitly excluded + const constructorExcluded = exclusions.some(e => + e.kind === 'method' && + e.typeName === type.name && + e.methodName === type.name + ); + + if (constructorExcluded) { + console.log(` No public constructors for ${type.name}, but constructor is excluded - type can be used but not created from C`); + } else { + console.error(`\nERROR: ${type.name} has no public constructors - it cannot be instantiated from C`); + console.error(` You must either:`); + console.error(` 1. Add a public constructor to the C++ class`); + console.error(` 2. Add 'type: ${type.name}' to exclusions.txt to exclude the entire type`); + console.error(` 3. Add 'method: ${type.name}::${type.name}' to exclusions.txt to allow the type but prevent creation`); + process.exit(1); + } + } + + // Generate constructors for each constructor member + let i = 1; + for (const ctor of ctorMembers) { + if (!ctor.parameters || ctor.parameters.length === 0) { + // Default constructor + constructors.push({ + name: `${cTypeName}_create`, + returnType: cTypeName, + parameters: [], + body: `return (${cTypeName}) new (__FILE__, __LINE__) ${cppTypeName}();` + }); + } else { + // Parameterized constructor + const cParams = convertParameters(ctor.parameters, knownTypeNames); + const suffix = i == 1 ? "": i; + + // Build the C++ constructor call + const cppArgs = buildCppArgs(ctor.parameters, cParams, knownTypeNames); + + constructors.push({ + name: `${cTypeName}_create${suffix}`, + returnType: cTypeName, + parameters: cParams, + body: `return (${cTypeName}) new (__FILE__, __LINE__) ${cppTypeName}(${cppArgs});` + }); + } + i++; + } + + return constructors; +} + +export function generateDestructor(type: ClassOrStruct): CMethod { + const cTypeName = `spine_${toSnakeCase(type.name)}`; + const cppTypeName = type.name; + + return { + name: `${cTypeName}_dispose`, + returnType: 'void', + parameters: [{ + name: 'self', + cType: cTypeName, + cppType: `${cppTypeName}*`, + isOutput: false + }], + body: `delete (${cppTypeName}*)self;` + }; +} + +export function generateMethods(type: ClassOrStruct, knownTypeNames: Set, exclusions: Exclusion[]): CMethod[] { + const methods: CMethod[] = []; + const cTypeName = `spine_${toSnakeCase(type.name)}`; + const cppTypeName = type.name; + + // Get all methods (we only have public members in the JSON) + const methodMembers = (type.members || []) + .filter(m => m.kind === 'method') as Method[]; + + // Check if this class has getRTTI method + const hasGetRTTI = methodMembers.some(m => m.name === 'getRTTI'); + + // Group methods by name to detect overloads + const methodsByName = new Map(); + for (const method of methodMembers) { + // Skip excluded methods and operators + if (isMethodExcluded(type.name, method, exclusions)) { + console.log(` Excluding method: ${type.name}::${method.name}${method.isConst ? ' const' : ''}`); + continue; + } + if (method.name.startsWith('operator')) { + continue; + } + + const methods = methodsByName.get(method.name) || []; + methods.push(method); + methodsByName.set(method.name, methods); + } + + // Generate methods with appropriate suffixes for overloads + for (const [methodName, methodOverloads] of methodsByName) { + // Special handling for methods named "create" to avoid conflicts with constructors + const isCreateMethod = methodName === 'create'; + + if (methodOverloads.length === 1 && !isCreateMethod) { + // No overloads and not a create method, use standard name + const cMethod = generateMethod(type, methodOverloads[0], cTypeName, cppTypeName, knownTypeNames); + if (cMethod) { + methods.push(cMethod); + } + } else { + // Multiple overloads OR create method, add parameter-based suffix + let i = 1; + for (const method of methodOverloads) { + // For create methods, always add suffix to avoid constructor conflicts + // For overloads, we need to include type information in the suffix + const suffix = isCreateMethod ? `method` : i; + i++; + + const baseCMethodName = toCFunctionName(type.name, method.name); + const cMethodName = `${baseCMethodName}_${suffix}`; + + const cMethod = generateMethod(type, method, cTypeName, cppTypeName, knownTypeNames, cMethodName); + if (cMethod) { + methods.push(cMethod); + } + } + } + } + + // If class has getRTTI, also add static rtti method + if (hasGetRTTI) { + methods.push({ + name: `${cTypeName}_rtti`, + returnType: 'spine_rtti', + parameters: [], + body: `return (spine_rtti)&${cppTypeName}::rtti;` + }); + } + + return methods; +} + +/** + * Generate getter and setter methods for public fields + */ +export function generateFieldAccessors(type: ClassOrStruct, knownTypeNames: Set, exclusions: Exclusion[]): CMethod[] { + const methods: CMethod[] = []; + const cTypeName = `spine_${toSnakeCase(type.name)}`; + const cppTypeName = type.name; + + // Get all non-static fields (we only have public members in the JSON) + const fieldMembers = (type.members || []) + .filter(m => m.kind === 'field' && !m.isStatic) as Field[]; + + for (const field of fieldMembers) { + // Check if entire field is excluded + if (isFieldExcluded(type.name, field.name, exclusions)) { + console.log(` Excluding field: ${type.name}::${field.name}`); + continue; + } + + // Check if field type is supported + const typeError = checkTypeSupport(field.type, knownTypeNames); + if (typeError) { + console.warn(` Skipping field ${type.name}::${field.name}: ${typeError}`); + continue; + } + + const fieldNameSnake = toSnakeCase(field.name); + + // Generate getter + if (!isFieldGetterExcluded(type.name, field.name, exclusions)) { + try { + const cReturnType = toCTypeName(field.type, knownTypeNames); + const getterName = `${cTypeName}_get_${fieldNameSnake}`; + + methods.push({ + name: getterName, + returnType: cReturnType, + parameters: [{ + name: 'self', + cType: cTypeName, + cppType: `${cppTypeName}*`, + isOutput: false + }], + body: generateFieldGetterBody(field, cppTypeName, knownTypeNames) + }); + } catch (e) { + console.warn(` Skipping getter for field ${type.name}::${field.name}: ${e}`); + } + } else { + console.log(` Excluding field getter: ${type.name}::${field.name}`); + } + + // Generate setter (only for non-const, non-reference types) + if (!field.type.includes('const') && !field.type.endsWith('&') && !isFieldSetterExcluded(type.name, field.name, exclusions)) { + try { + const cParamType = toCTypeName(field.type, knownTypeNames); + const setterName = `${cTypeName}_set_${fieldNameSnake}`; + + methods.push({ + name: setterName, + returnType: 'void', + parameters: [ + { + name: 'self', + cType: cTypeName, + cppType: `${cppTypeName}*`, + isOutput: false + }, + { + name: 'value', + cType: cParamType, + cppType: field.type, + isOutput: false + } + ], + body: generateFieldSetterBody(field, cppTypeName, knownTypeNames) + }); + } catch (e) { + console.warn(` Skipping setter for field ${type.name}::${field.name}: ${e}`); + } + } else if (isFieldSetterExcluded(type.name, field.name, exclusions)) { + console.log(` Excluding field setter: ${type.name}::${field.name}`); + } + } + + return methods; +} + +function generateFieldGetterBody(field: Field, cppTypeName: string, knownTypeNames: Set): string { + const fieldAccess = `((${cppTypeName}*)self)->${field.name}`; + + // Handle String fields + if (field.type === 'String' || field.type === 'const String' || field.type === 'const String&') { + return `return ${fieldAccess}.buffer();`; + } + + // Handle reference types + if (field.type.endsWith('&')) { + const baseType = field.type.slice(0, -1).trim(); + const cType = toCTypeName(baseType, knownTypeNames); + + if (isPrimitive(baseType)) { + return `return ${fieldAccess};`; + } + + return `return (${cType})&${fieldAccess};`; + } + + // Handle pointer types + if (field.type.endsWith('*')) { + const baseType = field.type.slice(0, -1).trim(); + + if (isPrimitive(baseType)) { + return `return ${fieldAccess};`; + } + + const cType = toCTypeName(field.type, knownTypeNames); + return `return (${cType})${fieldAccess};`; + } + + // Handle enum types + if (knownTypeNames.has(field.type)) { + const cType = toCTypeName(field.type, knownTypeNames); + return `return (${cType})${fieldAccess};`; + } + + // Handle primitive types + if (isPrimitive(field.type)) { + return `return ${fieldAccess};`; + } + + // Handle non-primitive value types (need to return address) + const cType = toCTypeName(field.type, knownTypeNames); + return `return (${cType})&${fieldAccess};`; +} + +function generateFieldSetterBody(field: Field, cppTypeName: string, knownTypeNames: Set): string { + const fieldAccess = `((${cppTypeName}*)self)->${field.name}`; + + // Handle String fields + if (field.type === 'String') { + return `${fieldAccess} = String(value);`; + } + + // Handle Array types + if (field.type.startsWith('Array<')) { + const arrayMatch = field.type.match(/^Array<(.+?)>$/); + if (arrayMatch) { + const elementType = arrayMatch[1]; + return `${fieldAccess} = *((Array<${elementType}>*)value);`; + } + } + + // Handle enum types + if (knownTypeNames.has(field.type)) { + return `${fieldAccess} = (${field.type})value;`; + } + + // Handle pointer types (cast back from opaque type) + if (field.type.endsWith('*') && !isPrimitive(field.type)) { + const baseType = field.type.slice(0, -1).trim(); + return `${fieldAccess} = (${baseType}*)value;`; + } + + // Handle everything else + return `${fieldAccess} = value;`; +} + +/** + * Generate CClassOrStruct for an array specialization + */ +export function generateArrayType(spec: ArraySpecialization, arrayType: ClassOrStruct, knownTypeNames: Set): CClassOrStruct { + const cTypeName = spec.cTypeName; + + // Generate array constructors + const constructors = [ + { + name: `${cTypeName}_create`, + returnType: cTypeName, + parameters: [], + body: `return (${cTypeName}) new (__FILE__, __LINE__) Array<${spec.elementType}>();` + }, + { + name: `${cTypeName}_create_with_capacity`, + returnType: cTypeName, + parameters: [{ + name: 'initialCapacity', + cType: 'size_t', + cppType: 'size_t', + isOutput: false + }], + body: `return (${cTypeName}) new (__FILE__, __LINE__) Array<${spec.elementType}>(initialCapacity);` + } + ]; + + // Generate destructor + const destructor = { + name: `${cTypeName}_dispose`, + returnType: 'void', + parameters: [{ + name: 'array', + cType: cTypeName, + cppType: `Array<${spec.elementType}>*`, + isOutput: false + }], + body: `delete (Array<${spec.elementType}>*)array;` + }; + + // Generate array methods + const methods = generateArrayMethods(spec.elementType, cTypeName, arrayType, knownTypeNames); + + return { + name: cTypeName, + cppType: arrayType, + constructors, + destructor, + methods + }; +} + +export function generateArrayMethods(elementType: string, cTypeName: string, arrayType: ClassOrStruct, knownTypeNames: Set): CMethod[] { + const methods: CMethod[] = []; + const cppElementType = elementType; + const cElementType = toCTypeName(elementType, knownTypeNames); + + // Generate array-specific methods + const arrayMethods = (arrayType.members || []).filter(m => m.kind === 'method') as Method[]; + + for (const method of arrayMethods) { + // Skip constructors/destructors (handled separately) + if (method.name === 'Array' || method.name === '~Array') { + continue; + } + + // Skip operator overloads + if (method.name.startsWith('operator')) { + continue; + } + + // Replace template parameter T with actual element type + const specializedMethod = specializeArrayMethod(method, cppElementType); + + const cMethod = generateArrayMethod(cTypeName, specializedMethod, cppElementType, cElementType, knownTypeNames); + if (cMethod) { + methods.push(cMethod); + } + } + + return methods; +} + +export function generateEnum(enumType: Enum): CEnum { + const cEnumName = `spine_${toSnakeCase(enumType.name)}`; + const enumNameUpper = toSnakeCase(enumType.name).toUpperCase(); + const values: CEnumValue[] = []; + + for (const value of enumType.values) { + // Convert value name to snake case + let valueNameSnake = toSnakeCase(value.name).toUpperCase(); + + // Remove redundant prefix if the value name starts with the enum name + // e.g., for TextureFilter::TextureFilter_Nearest, remove the "TextureFilter_" prefix + const enumNameCamelCase = enumType.name.toUpperCase(); + if (value.name.toUpperCase().startsWith(enumNameCamelCase)) { + let withoutPrefix = value.name.slice(enumType.name.length); + // Also strip leading underscore if present + if (withoutPrefix.startsWith('_')) { + withoutPrefix = withoutPrefix.slice(1); + } + // Only use the stripped version if it's not empty + if (withoutPrefix.length > 0) { + valueNameSnake = toSnakeCase(withoutPrefix).toUpperCase(); + } + } + + values.push({ + name: `SPINE_${enumNameUpper}_${valueNameSnake}`, + value: value.value + }); + } + + return { + name: cEnumName, + cppType: enumType, + values + }; +} + +// Helper functions + +function convertParameters(params: Parameter[], knownTypeNames: Set): CParameter[] { + const cParams: CParameter[] = []; + + for (const param of params) { + const cType = toCTypeName(param.type, knownTypeNames); + const isOutput = isOutputParameter(param.type); + + cParams.push({ + name: param.name, + cType, + cppType: param.type, + isOutput + }); + } + + return cParams; +} + +function isOutputParameter(cppType: string): boolean { + // Non-const references to primitives become output parameters + const refMatch = cppType.match(/^((?:const\s+)?(.+?))\s*&$/); + if (refMatch) { + const fullBaseType = refMatch[1].trim(); + const baseType = refMatch[2].trim(); + const isConst = fullBaseType.startsWith('const '); + + return !isConst && isPrimitive(baseType); + } + + return false; +} + +function generateParameterSuffix(params: CParameter[]): string { + if (params.length === 0) return ''; + return params.map(p => toSnakeCase(p.name)).join('_'); +} + +/** + * Generates a parameter suffix that includes type information for overloaded methods. + * This ensures unique function names when methods have the same parameter names but different types. + */ +function generateParameterSuffixWithTypes(params: CParameter[], knownTypeNames: Set): string { + if (params.length === 0) return ''; + + return params.map(p => { + const paramName = toSnakeCase(p.name); + + // For pointer types that differ (e.g., float* vs spine_array_float), include type info + if (p.cType.includes('spine_array_')) { + // Extract the array element type + const arrayType = p.cType.replace('spine_array_', 'array_'); + return `${paramName}_${arrayType}`; + } else if (p.cType.endsWith('*') && isPrimitive(p.cType.slice(0, -1).trim())) { + // For primitive pointers like float*, int* + const baseType = p.cType.slice(0, -1).trim(); + return `${paramName}_${baseType}_ptr`; + } + + // For other parameters, just use the name + return paramName; + }).join('_'); +} + +/** + * Converts a C parameter to its C++ argument form for function calls. + * Handles type conversions, casts, and dereferencing as needed. + */ +function convertArgumentToCpp(cppType: string, cParamName: string, isOutput: boolean, knownTypeNames: Set): string { + // Handle String parameters + if (cppType === 'const String&' || cppType === 'String') { + return `String(${cParamName})`; + } + + // Handle pointer parameters (need to cast from opaque type) + if (cppType.endsWith('*')) { + const baseType = cppType.slice(0, -1).trim(); + if (!isPrimitive(baseType)) { + // Cast from opaque C type to C++ type + return `(${cppType})${cParamName}`; + } else { + return cParamName; + } + } + + // Handle reference parameters + if (cppType.endsWith('&')) { + const baseType = cppType.slice(0, -1).trim(); + + // Non-const primitive refs are output parameters + if (isOutput) { + return `*${cParamName}`; + } + + // For T const& where T is a pointer type (e.g., Animation* const&) + if (baseType.endsWith(' const')) { + // Remove const to get the actual type + const actualType = baseType.slice(0, -6).trim(); // Remove ' const' + if (actualType.endsWith('*')) { + // It's a pointer, just cast and use directly + return `(${actualType})${cParamName}`; + } + } + + // Class references need to dereference the pointer + if (!isPrimitive(baseType)) { + return `*((${baseType}*)${cParamName})`; + } + + // Const primitive refs + return cParamName; + } + + // Handle enum parameters + if (cppType.match(/^(?:const\s+)?([A-Z]\w+)(?:\s*&)?$/) && knownTypeNames.has(cppType.replace(/^const\s+/, '').replace(/\s*&$/, ''))) { + const enumType = cppType.replace(/^const\s+/, '').replace(/\s*&$/, ''); + return `(${enumType})${cParamName}`; + } + + // Handle everything else + return cParamName; +} + +function buildCppArgs(cppParams: Parameter[], cParams: CParameter[], knownTypeNames: Set): string { + const args: string[] = []; + + for (let i = 0; i < cppParams.length; i++) { + const cppParam = cppParams[i]; + const cParam = cParams[i]; + args.push(convertArgumentToCpp(cppParam.type, cParam.name, cParam.isOutput, knownTypeNames)); + } + + return args.join(', '); +} + +function generateMethod(type: ClassOrStruct, method: Method, cTypeName: string, cppTypeName: string, knownTypeNames: Set, customMethodName?: string): CMethod | null { + try { + const cReturnType = toCTypeName(method.returnType, knownTypeNames); + const cMethodName = customMethodName || toCFunctionName(type.name, method.name); + + // Convert parameters + const cParams: CParameter[] = []; + + // Add self parameter for non-static methods + if (!method.isStatic) { + cParams.push({ + name: 'self', + cType: cTypeName, + cppType: `${cppTypeName}*`, + isOutput: false + }); + } + + // Add method parameters + if (method.parameters) { + cParams.push(...convertParameters(method.parameters, knownTypeNames)); + } + + // Generate method body + let methodCall: string; + if (method.isStatic) { + methodCall = `${cppTypeName}::${method.name}(${buildCppArgs(method.parameters || [], cParams, knownTypeNames)})`; + } else if (method.fromSupertype) { + // For inherited methods that may be hidden by derived class methods with same name, + // explicitly call the base class version + methodCall = `((${method.fromSupertype}*)(${cppTypeName}*)self)->${method.name}(${buildCppArgs(method.parameters || [], cParams.slice(1), knownTypeNames)})`; + } else { + methodCall = `((${cppTypeName}*)self)->${method.name}(${buildCppArgs(method.parameters || [], cParams.slice(1), knownTypeNames)})`; + } + const body = generateReturnStatement(method.returnType, methodCall, knownTypeNames); + + return { + name: cMethodName, + returnType: cReturnType, + parameters: cParams, + body + }; + } catch (e) { + console.warn(`Skipping method ${type.name}::${method.name}: ${e}`); + return null; + } +} + +/** + * Generates the return statement for a method based on its return type. + * Handles type conversions, casts, and special cases like String and references. + */ +function generateReturnStatement(returnType: string, methodCall: string, knownTypeNames: Set, + elementType?: string, cElementType?: string): string { + const isVoid = returnType === 'void'; + + // Handle void returns + if (isVoid) { + return `${methodCall};`; + } + + // Handle String returns + if (returnType === 'String' || returnType === 'const String' || returnType === 'const String&') { + return `return ${methodCall}.buffer();`; + } + + // Handle element type returns (for array methods) + if (elementType && returnType === elementType) { + if (elementType.endsWith('*') && !isPrimitive(elementType)) { + return `return (${cElementType})${methodCall};`; + } + return `return ${methodCall};`; + } + + // Handle reference returns + if (returnType.endsWith('&')) { + const baseType = returnType.slice(0, -1).trim(); + + // Handle element type references (for array methods) + if (elementType && returnType === `${elementType}&`) { + if (elementType.endsWith('*') && !isPrimitive(elementType)) { + return `return (${cElementType})&${methodCall};`; + } + return `return &${methodCall};`; + } + + const cType = toCTypeName(baseType, knownTypeNames); + + // For primitive references, return the value + if (isPrimitive(baseType)) { + return `return ${methodCall};`; + } + + // For class references, return the address cast to opaque type + return `return (${cType})&${methodCall};`; + } + + // Handle pointer returns + if (returnType.endsWith('*')) { + const baseType = returnType.slice(0, -1).trim(); + + // Primitive pointers pass through + if (isPrimitive(baseType)) { + return `return ${methodCall};`; + } + + // Class pointers need cast + const cType = toCTypeName(returnType, knownTypeNames); + return `return (${cType})${methodCall};`; + } + + // Handle enum returns + if (knownTypeNames.has(returnType)) { + const cType = toCTypeName(returnType, knownTypeNames); + return `return (${cType})${methodCall};`; + } + + // Handle primitive returns + return `return ${methodCall};`; +} + +function specializeArrayMethod(method: Method, cppElementType: string): Method { + // Helper to replace T with the actual element type, handling const correctly + const replaceT = (type: string): string => { + // For const T&, if T is a pointer, we need T const& not const T& + if (type === 'const T &' && cppElementType.endsWith('*')) { + return `${cppElementType} const &`; + } + // For const T*, if T is a pointer, keep it as is + if (type === 'const T *' && cppElementType.endsWith('*')) { + return `${cppElementType} const *`; + } + // Otherwise do simple replacement + return type.replace(/\bT\b/g, cppElementType); + }; + + const specializedReturnType = replaceT(method.returnType); + const specializedParams = method.parameters?.map(p => ({ + ...p, + type: replaceT(p.type) + })); + + return { + ...method, + returnType: specializedReturnType, + parameters: specializedParams + }; +} + +function generateArrayMethod(cTypeName: string, method: Method, cppElementType: string, cElementType: string, knownTypeNames: Set): CMethod | null { + try { + const cReturnType = toCTypeName(method.returnType, knownTypeNames); + const cMethodName = `${cTypeName}_${toSnakeCase(method.name)}`; + + // Convert parameters + const cParams: CParameter[] = []; + + // Add self parameter + cParams.push({ + name: 'array', + cType: cTypeName, + cppType: `Array<${cppElementType}>*`, + isOutput: false + }); + + // Add method parameters + if (method.parameters) { + cParams.push(...convertParameters(method.parameters, knownTypeNames)); + } + + // Generate method body for array + const body = generateArrayMethodBody(method, cppElementType, cElementType, knownTypeNames); + + return { + name: cMethodName, + returnType: cReturnType, + parameters: cParams, + body + }; + } catch (e) { + console.warn(`Skipping array method ${method.name}: ${e}`); + return null; + } +} + +function generateArrayMethodBody(method: Method, cppElementType: string, cElementType: string, knownTypeNames: Set): string { + const self = `((Array<${cppElementType}>*)array)->`; + + // Build method call arguments using shared function + const cppArgs = method.parameters ? + buildCppArgs(method.parameters, convertParameters(method.parameters, knownTypeNames), knownTypeNames) : + ''; + + const methodCall = `${self}${method.name}(${cppArgs})`; + + // Use shared return value handling + return generateReturnStatement(method.returnType, methodCall, knownTypeNames, cppElementType, cElementType); +} + +function isMethodExcluded(typeName: string, method: Method, exclusions: Exclusion[]): boolean { + for (const exclusion of exclusions) { + if (exclusion.kind === 'method' && + exclusion.typeName === typeName && + exclusion.methodName === method.name) { + // If isConst is specified, it must match + if (exclusion.isConst !== undefined) { + return exclusion.isConst === method.isConst; + } + // Otherwise, exclude all overloads + return true; + } + } + return false; +} + +export async function generateTypes(types: Type[], exclusions: Exclusion[], allExtractedTypes: Type[]): Promise<{ cTypes: CClassOrStruct[], cEnums: CEnum[] }> { + const knownTypeNames = new Set(types.map(t => t.name)); + const allTypesMap = new Map(allExtractedTypes.map(t => [t.name, t])); + + // Generate C intermediate representation for classes/structs + const cTypes: CClassOrStruct[] = []; + for (const type of types.filter(t => t.kind !== 'enum')) { + console.log(`Generating ${type.name}...`); + + // Generate IR + const constructors = generateConstructors(type, knownTypeNames, exclusions, allTypesMap); + const destructor = generateDestructor(type); + const methods = generateMethods(type, knownTypeNames, exclusions); + const fieldAccessors = generateFieldAccessors(type, knownTypeNames, exclusions); + + // Combine all methods + const allMethods = [...methods, ...fieldAccessors]; + + const cType: CClassOrStruct = { + name: `spine_${toSnakeCase(type.name)}`, + cppType: type, + constructors, + destructor, + methods: allMethods + }; + + cTypes.push(cType); + } + + // Generate C intermediate representation for enums + const cEnums: CEnum[] = []; + for (const enumType of types.filter(t => t.kind === 'enum')) { + console.log(`Generating enum ${enumType.name}...`); + + const cEnum = generateEnum(enumType); + cEnums.push(cEnum); + } + + return { cTypes, cEnums }; +} + +export function generateArrays(types: Type[], arrayType: ClassOrStruct, exclusions: Exclusion[]): CClassOrStruct[] { + const knownTypeNames = new Set(types.map(t => t.name)); + + // Generate Array specializations + console.log('\nScanning for Array specializations...'); + const arraySpecializations = scanArraySpecializations(types, exclusions); + console.log(`Found ${arraySpecializations.length} array specializations to generate`); + + // Generate array types + const cArrayTypes: CClassOrStruct[] = []; + for (const arraySpecialization of arraySpecializations) { + const arrayIR = generateArrayType(arraySpecialization, arrayType, knownTypeNames); + cArrayTypes.push(arrayIR); + } + return cArrayTypes; +} \ No newline at end of file diff --git a/spine-c-new/codegen/src/type-extractor.ts b/spine-c-new/codegen/src/type-extractor.ts index 50eb45b12..2021a7a42 100644 --- a/spine-c-new/codegen/src/type-extractor.ts +++ b/spine-c-new/codegen/src/type-extractor.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { execSync } from 'child_process'; -import { Type, Member, Method, Field, Constructor, Destructor, Parameter, EnumValue, SpineTypes, ClassOrStruct, Enum } from './types'; +import { Type, Member, Method, Field, Constructor, Destructor, Parameter, EnumValue, ClassOrStruct, Enum } from './types'; const SPINE_CPP_PATH = path.join(__dirname, '../../../spine-cpp'); const SPINE_INCLUDE_DIR = path.join(SPINE_CPP_PATH, 'spine-cpp/include'); @@ -98,16 +98,17 @@ function isInTargetFile(node: any, targetPath: string): boolean { /** * Extracts member information from an AST node */ -function extractMember(inner: any, parent: any): Member | null { +function extractMember(inner: any, parent: any): Member & { access?: 'public' | 'protected' } | null { if (inner.isImplicit) return null; switch (inner.kind) { case 'FieldDecl': - const field: Field = { + const field: Field & { access?: 'public' | 'protected' } = { kind: 'field', name: inner.name || '', type: inner.type?.qualType || '', - isStatic: inner.storageClass === 'static' + isStatic: inner.storageClass === 'static', + access: 'public' // Will be set correctly later }; return field; @@ -116,7 +117,7 @@ function extractMember(inner: any, parent: any): Member | null { // Skip operators - not needed for C wrapper generation if (inner.name.startsWith('operator')) return null; - const method: Method = { + const method: Method & { access?: 'public' | 'protected' } = { kind: 'method', name: inner.name, returnType: extractReturnType(inner), @@ -124,25 +125,28 @@ function extractMember(inner: any, parent: any): Member | null { isStatic: inner.storageClass === 'static', isVirtual: inner.virtual || false, isPure: inner.pure || false, - isConst: inner.constQualifier || false + isConst: inner.constQualifier || false, + access: 'public' // Will be set correctly later }; return method; case 'CXXConstructorDecl': - const constructor: Constructor = { + const constructor: Constructor & { access?: 'public' | 'protected' } = { kind: 'constructor', name: inner.name || parent.name || '', - parameters: extractParameters(inner) + parameters: extractParameters(inner), + access: 'public' // Will be set correctly later }; return constructor; case 'CXXDestructorDecl': // Include destructors for completeness - const destructor: Destructor = { + const destructor: Destructor & { access?: 'public' | 'protected' } = { kind: 'destructor', name: inner.name || `~${parent.name}`, isVirtual: inner.virtual || false, - isPure: inner.pure || false + isPure: inner.pure || false, + access: 'public' // Will be set correctly later }; return destructor; @@ -175,7 +179,11 @@ function extractTypeInfo(node: any, sourceLines: string[]): Type { } return enumValue; - }) + }), + loc: { + line: node.loc?.line || 0, + col: node.loc?.col || 0 + } }; return enumInfo; } @@ -206,12 +214,19 @@ function extractTypeInfo(node: any, sourceLines: string[]): Type { continue; } - if (inner.kind === 'FriendDecl' || currentAccess !== 'public') continue; + if (inner.kind === 'FriendDecl') continue; + // Skip private members entirely + if (currentAccess === 'private') continue; + + // Extract public and protected members const member = extractMember(inner, node); if (member) { + // Always set access level (we only extract public and protected) + member.access = currentAccess as 'public' | 'protected'; info.members.push(member); - // Check if this is a pure virtual method + + // Check if this is a pure virtual method (regardless of access level) if (member.kind === 'method' && member.isPure) { hasPureVirtual = true; } @@ -221,6 +236,14 @@ function extractTypeInfo(node: any, sourceLines: string[]): Type { // Always set isAbstract to a boolean value info.isAbstract = hasPureVirtual; + // Filter out protected members - we only needed them to check for abstract classes + info.members = info.members.filter(m => (m as any).access === 'public'); + + // Remove access field from all members since we only keep public members + info.members.forEach(m => { + delete (m as any).access; + }); + return info; } @@ -297,8 +320,6 @@ function processNode( types.push(typeInfo); } else if (node.kind === 'EnumDecl') { types.push(extractTypeInfo(node, sourceLines)); - } else if (node.kind === 'TypedefDecl' || node.kind === 'TypeAliasDecl') { - types.push(extractTypeInfo(node, sourceLines)); } } @@ -329,26 +350,20 @@ function extractLocalTypes(headerFile: string, typeMap: Map | null // Filter out forward declarations and SpineObject const filteredTypes = types - .filter(t => t.kind !== 'enum') .filter(t => { - // Skip types with no members (forward declarations) - if (t.members && t.members.length === 0) return false; + // Keep all enums + if (t.kind === 'enum') return true; // Skip SpineObject - it's not needed for C wrapper generation if (t.name === 'SpineObject') return false; + // For classes/structs, skip those with no members (forward declarations) + const classOrStruct = t as ClassOrStruct; + if (classOrStruct.members && classOrStruct.members.length === 0) return false; + return true; }) - .sort((a, b) => (a.loc?.line || 0) - (b.loc?.line || 0)); - - // Add inherited methods if we have a type map - if (typeMap) { - for (const type of filteredTypes) { - if (type.superTypes && type.members) { - addInheritedMethods(type, typeMap); - } - } - } + .sort((a, b) => a.loc.line - b.loc.line); return filteredTypes; } @@ -473,11 +488,17 @@ function addTemplateInheritedMethods( /** * Adds inherited methods to a type */ -function addInheritedMethods(type: ClassOrStruct, typeMap: Map): void { +function addInheritedMethods(type: ClassOrStruct & { inheritedMethodsAdded: boolean }, typeMap: Map): void { + // Skip if already processed + if (type.inheritedMethodsAdded) { + return; + } + const inheritedMethods: Member[] = []; const ownMethodSignatures = new Set(); // Build a set of method signatures from this type + // All members are public at this point (protected/private were filtered out earlier) for (const member of type.members || []) { if (member.kind === 'method') { const sig = getMethodSignature(member as Method); @@ -501,6 +522,9 @@ function addInheritedMethods(type: ClassOrStruct, typeMap: Map): v const templateType = typeMap.get(templateClassName); if (templateType && templateType.kind !== 'enum' && templateType.members) { + if (!templateType.inheritedMethodsAdded) { + addInheritedMethods(templateType, typeMap); + } // Process template inheritance addTemplateInheritedMethods( type, templateType, templateClassName, templateArgs, @@ -513,6 +537,10 @@ function addInheritedMethods(type: ClassOrStruct, typeMap: Map): v if (!superType || superType.kind === 'enum' || !superType.members) continue; + if (!superType.inheritedMethodsAdded) { + addInheritedMethods(superType, typeMap); + } + // Add non-overridden methods from supertype for (const member of superType.members) { if (member.kind === 'method') { @@ -532,6 +560,9 @@ function addInheritedMethods(type: ClassOrStruct, typeMap: Map): v if (type.members) { type.members.push(...inheritedMethods); } + + // Mark as processed + type.inheritedMethodsAdded = true; } /** @@ -600,29 +631,29 @@ function isExtractionNeeded(): boolean { /** * Runs the type extraction process and generates the output file */ -export function extractTypes(): void { +export function extractTypes(): Type[] { if (!isExtractionNeeded()) { - return; + return loadTypes(); } console.log('Running type extraction...'); try { const allHeaders = findAllHeaderFiles(); - const allTypes: SpineTypes = {}; + const allTypes: { [header: string]: (ClassOrStruct & { inheritedMethodsAdded: boolean } | Enum)[] } = {}; let processed = 0, errors = 0; console.error(`Processing ${allHeaders.length} header files...`); // First pass: extract all types without inheritance - const typeMap = new Map(); + const typeMap = new Map(); for (const headerFile of allHeaders) { const relPath = path.relative(SPINE_INCLUDE_DIR, headerFile); process.stderr.write(`\r\x1b[K Pass 1 - Processing ${++processed}/${allHeaders.length}: ${relPath}...`); try { - const types = extractLocalTypes(headerFile); + const types = extractLocalTypes(headerFile).map(type => type as ClassOrStruct & { inheritedMethodsAdded: boolean } | Enum); if (types.length > 0) { allTypes[relPath] = types; // Build type map @@ -647,17 +678,24 @@ export function extractTypes(): void { process.stderr.write(`\r\x1b[K Pass 2 - Processing ${++processed}/${Object.keys(allTypes).length}: ${relPath}...`); for (const type of allTypes[relPath]) { - if (type.kind !== 'enum' && type.superTypes && type.members) { - addInheritedMethods(type, typeMap); + if (type.kind !== 'enum') { + const classOrStruct = type; + if (classOrStruct.superTypes && classOrStruct.members) { + if (classOrStruct.name === "ConstraintTimeline1") { + console.log("ConstraintTimeline1"); + } - // Check if any inherited methods are pure virtual - // If so, and the class doesn't override them, it's abstract - if (!type.isAbstract) { - const hasPureVirtual = type.members.some((m: Member) => - m.kind === 'method' && m.isPure === true - ); - if (hasPureVirtual) { - type.isAbstract = true; + addInheritedMethods(classOrStruct, typeMap); + + // Check if any inherited methods (including protected) are pure virtual + // If so, and the class doesn't override them, it's abstract + if (!classOrStruct.isAbstract) { + const hasPureVirtual = classOrStruct.members.some((m: Member) => + m.kind === 'method' && m.isPure === true + ); + if (hasPureVirtual) { + classOrStruct.isAbstract = true; + } } } } @@ -666,6 +704,12 @@ export function extractTypes(): void { console.error(`\n Completed: ${Object.keys(allTypes).length} files processed, ${errors} errors`); + if (errors > 0) { + console.error(`\n ${errors} errors occurred during type extraction`); + console.error(`\n Run the commands shown for each error and fix the issue in spine-cpp`); + process.exit(1); + } + // Write to output file fs.writeFileSync(OUTPUT_FILE, JSON.stringify(allTypes, null, 2)); console.log(`Type extraction complete, wrote ${OUTPUT_FILE}`); @@ -673,15 +717,24 @@ export function extractTypes(): void { console.error('Failed to extract types:', error.message); throw error; } + + return loadTypes(); } /** - * Loads the extracted type information + * Loads the extracted type information from spine-c/codegen/spine-cpp-types.json */ -export function loadTypes(): SpineTypes { +export function loadTypes(): Type[] { if (!fs.existsSync(OUTPUT_FILE)) { throw new Error(`Type information not found at ${OUTPUT_FILE}. Run extraction first.`); } - return JSON.parse(fs.readFileSync(OUTPUT_FILE, 'utf8')); + const typesJson = JSON.parse(fs.readFileSync(OUTPUT_FILE, 'utf8')); + // Flatten all types from all headers into a single array + const types: Type[] = []; + for (const header of Object.keys(typesJson)) { + types.push(...typesJson[header]); + } + + return types; } \ No newline at end of file diff --git a/spine-c-new/codegen/src/types.ts b/spine-c-new/codegen/src/types.ts index 7daab715a..385cfc977 100644 --- a/spine-c-new/codegen/src/types.ts +++ b/spine-c-new/codegen/src/types.ts @@ -48,6 +48,10 @@ export type Enum = { kind: 'enum'; name: string; values: EnumValue[]; + loc: { + line: number; + col: number; + }; } export interface EnumValue { @@ -58,7 +62,7 @@ export interface EnumValue { export interface ClassOrStruct { name: string; kind: 'class' | 'struct'; - loc?: { + loc: { line: number; col: number; }; @@ -71,10 +75,6 @@ export interface ClassOrStruct { export type Type = ClassOrStruct | Enum; -export interface SpineTypes { - [header: string]: Type[]; -} - export type Exclusion = | { kind: 'type'; @@ -85,6 +85,21 @@ export type Exclusion = typeName: string; methodName: string; isConst?: boolean; // Whether the method is const (e.g., void foo() const), NOT whether return type is const + } + | { + kind: 'field'; + typeName: string; + fieldName: string; + } + | { + kind: 'field-get'; + typeName: string; + fieldName: string; + } + | { + kind: 'field-set'; + typeName: string; + fieldName: string; }; export interface ArraySpecialization { @@ -154,7 +169,7 @@ export function isPrimitive(cppType: string): boolean { * Converts a C++ type to its corresponding C type. * * @param cppType The C++ type to convert - * @param validTypes Set of valid type names (classes and enums) from filtered types + * @param knownTypeNames Set of known type names (classes and enums) from filtered types * @returns The C type * @throws Error if the type is not recognized * @@ -166,7 +181,7 @@ export function isPrimitive(cppType: string): boolean { * - Class references: "const Color&" → "spine_color" * - Non-const primitive refs: "float&" → "float*" (output parameter) */ -export function toCTypeName(cppType: string, validTypes: Set): string { +export function toCTypeName(cppType: string, knownTypeNames: Set): string { // Remove extra spaces and normalize const normalizedType = cppType.replace(/\s+/g, ' ').trim(); @@ -181,7 +196,7 @@ export function toCTypeName(cppType: string, validTypes: Set): string { return 'const char*'; } - // PropertyId is a typedef + // Special Type: PropertyId is a typedef if (normalizedType === 'PropertyId') { return 'int64_t'; } @@ -206,6 +221,12 @@ export function toCTypeName(cppType: string, validTypes: Set): string { return `spine_array_${toSnakeCase(elementType)}`; } + // Handle "Type * const" pattern (const pointer) + if (normalizedType.endsWith(' const')) { + const baseType = normalizedType.slice(0, -6).trim(); // Remove ' const' + return toCTypeName(baseType, knownTypeNames); + } + // Pointers const pointerMatch = normalizedType.match(/^(.+?)\s*\*$/); if (pointerMatch) { @@ -233,7 +254,7 @@ export function toCTypeName(cppType: string, validTypes: Set): string { } // Const references and class references - recurse without the reference - return toCTypeName(baseType, validTypes); + return toCTypeName(baseType, knownTypeNames); } // Function pointers - for now, just error @@ -241,11 +262,50 @@ export function toCTypeName(cppType: string, validTypes: Set): string { throw new Error(`Function pointer types not yet supported: ${normalizedType}`); } + // Handle const types - strip const and recurse + if (normalizedType.startsWith('const ') && !normalizedType.includes('*') && !normalizedType.includes('&')) { + const baseType = normalizedType.slice(6).trim(); // Remove 'const ' + return toCTypeName(baseType, knownTypeNames); + } + // Everything else should be a class or enum type // Check if it's a valid type - if (!validTypes.has(normalizedType)) { + if (!knownTypeNames.has(normalizedType)) { throw new Error(`Unknown type: ${normalizedType}. Not a primitive and not in the list of valid types.`); } return `spine_${toSnakeCase(normalizedType)}`; +} + +/** + * Checks if a C++ type can be represented in the C API. + * Returns null if the type can be handled, or an error message if not. + */ +export function checkTypeSupport(cppType: string, knownTypeNames: Set): string | null { + // Remove extra spaces and normalize + const normalizedType = cppType.replace(/\s+/g, ' ').trim(); + + // Check for Array which we can't handle + const arrayMatch = normalizedType.match(/^(?:const\s+)?Array<(.+?)>\s*(?:&|\*)?$/); + if (arrayMatch) { + const elementType = arrayMatch[1].trim(); + if (elementType === 'String') { + return "Array is not supported - use const char** instead"; + } + // Check if array type exists + const arrayTypeName = `spine_array_${toSnakeCase(elementType)}`; + // We can't check if the array was generated, so we'll let toCTypeName handle that + } + + // Check for multi-level pointers + if (/\*\s*\*/.test(normalizedType)) { + return "Multi-level pointers are not supported"; + } + + // Check for function pointers + if (normalizedType.includes('(') && normalizedType.includes(')')) { + return "Function pointer types are not supported"; + } + + return null; } \ 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 ee33d125e..96878f3a3 100644 --- a/spine-c-new/include/spine-c.h +++ b/spine-c-new/include/spine-c.h @@ -36,23 +36,21 @@ // All type declarations and enum includes #include "../src/generated/types.h" -// Extension functions +// Extension types & functions #include "../src/extensions.h" // Generated class types +#include "../src/generated/alpha_timeline.h" #include "../src/generated/animation.h" -#include "../src/generated/track_entry.h" -#include "../src/generated/event_queue_entry.h" #include "../src/generated/animation_state.h" #include "../src/generated/animation_state_data.h" -#include "../src/generated/atlas_page.h" -#include "../src/generated/atlas_region.h" #include "../src/generated/atlas.h" #include "../src/generated/atlas_attachment_loader.h" +#include "../src/generated/atlas_page.h" +#include "../src/generated/atlas_region.h" #include "../src/generated/attachment.h" #include "../src/generated/attachment_loader.h" #include "../src/generated/attachment_timeline.h" -#include "../src/generated/block.h" #include "../src/generated/bone.h" #include "../src/generated/bone_data.h" #include "../src/generated/bone_local.h" @@ -63,11 +61,6 @@ #include "../src/generated/bounding_box_attachment.h" #include "../src/generated/clipping_attachment.h" #include "../src/generated/color.h" -#include "../src/generated/rgba_timeline.h" -#include "../src/generated/rgb_timeline.h" -#include "../src/generated/alpha_timeline.h" -#include "../src/generated/rgba2_timeline.h" -#include "../src/generated/rgb2_timeline.h" #include "../src/generated/constraint.h" #include "../src/generated/constraint_data.h" #include "../src/generated/constraint_timeline.h" @@ -79,16 +72,21 @@ #include "../src/generated/draw_order_timeline.h" #include "../src/generated/event.h" #include "../src/generated/event_data.h" +#include "../src/generated/event_queue_entry.h" #include "../src/generated/event_timeline.h" +#include "../src/generated/from_property.h" +#include "../src/generated/from_rotate.h" +#include "../src/generated/from_scale_x.h" +#include "../src/generated/from_scale_y.h" +#include "../src/generated/from_shear_y.h" +#include "../src/generated/from_x.h" +#include "../src/generated/from_y.h" #include "../src/generated/ik_constraint.h" #include "../src/generated/ik_constraint_data.h" #include "../src/generated/ik_constraint_pose.h" #include "../src/generated/ik_constraint_timeline.h" #include "../src/generated/inherit_timeline.h" #include "../src/generated/linked_mesh.h" -#include "../src/generated/interpolation.h" -#include "../src/generated/pow_interpolation.h" -#include "../src/generated/pow_out_interpolation.h" #include "../src/generated/mesh_attachment.h" #include "../src/generated/path_attachment.h" #include "../src/generated/path_constraint.h" @@ -98,24 +96,30 @@ #include "../src/generated/path_constraint_position_timeline.h" #include "../src/generated/path_constraint_spacing_timeline.h" #include "../src/generated/physics_constraint.h" -#include "../src/generated/physics_constraint_data.h" -#include "../src/generated/physics_constraint_pose.h" -#include "../src/generated/physics_constraint_timeline.h" -#include "../src/generated/physics_constraint_inertia_timeline.h" -#include "../src/generated/physics_constraint_strength_timeline.h" #include "../src/generated/physics_constraint_damping_timeline.h" -#include "../src/generated/physics_constraint_mass_timeline.h" -#include "../src/generated/physics_constraint_wind_timeline.h" +#include "../src/generated/physics_constraint_data.h" #include "../src/generated/physics_constraint_gravity_timeline.h" +#include "../src/generated/physics_constraint_inertia_timeline.h" +#include "../src/generated/physics_constraint_mass_timeline.h" #include "../src/generated/physics_constraint_mix_timeline.h" +#include "../src/generated/physics_constraint_pose.h" #include "../src/generated/physics_constraint_reset_timeline.h" +#include "../src/generated/physics_constraint_strength_timeline.h" +#include "../src/generated/physics_constraint_timeline.h" +#include "../src/generated/physics_constraint_wind_timeline.h" #include "../src/generated/point_attachment.h" +#include "../src/generated/polygon.h" #include "../src/generated/posed.h" #include "../src/generated/posed_active.h" #include "../src/generated/posed_data.h" -#include "../src/generated/rtti.h" #include "../src/generated/region_attachment.h" +#include "../src/generated/render_command.h" +#include "../src/generated/rgb2_timeline.h" +#include "../src/generated/rgba2_timeline.h" +#include "../src/generated/rgba_timeline.h" +#include "../src/generated/rgb_timeline.h" #include "../src/generated/rotate_timeline.h" +#include "../src/generated/rtti.h" #include "../src/generated/scale_timeline.h" #include "../src/generated/scale_x_timeline.h" #include "../src/generated/scale_y_timeline.h" @@ -127,10 +131,9 @@ #include "../src/generated/skeleton.h" #include "../src/generated/skeleton_binary.h" #include "../src/generated/skeleton_bounds.h" -#include "../src/generated/polygon.h" +#include "../src/generated/skeleton_clipping.h" #include "../src/generated/skeleton_data.h" #include "../src/generated/skeleton_json.h" -#include "../src/generated/render_command.h" #include "../src/generated/skeleton_renderer.h" #include "../src/generated/skin.h" #include "../src/generated/slider.h" @@ -145,21 +148,15 @@ #include "../src/generated/slot_timeline.h" #include "../src/generated/texture_region.h" #include "../src/generated/timeline.h" -#include "../src/generated/transform_constraint.h" -#include "../src/generated/from_property.h" #include "../src/generated/to_property.h" -#include "../src/generated/from_rotate.h" #include "../src/generated/to_rotate.h" -#include "../src/generated/from_x.h" -#include "../src/generated/to_x.h" -#include "../src/generated/from_y.h" -#include "../src/generated/to_y.h" -#include "../src/generated/from_scale_x.h" #include "../src/generated/to_scale_x.h" -#include "../src/generated/from_scale_y.h" #include "../src/generated/to_scale_y.h" -#include "../src/generated/from_shear_y.h" #include "../src/generated/to_shear_y.h" +#include "../src/generated/to_x.h" +#include "../src/generated/to_y.h" +#include "../src/generated/track_entry.h" +#include "../src/generated/transform_constraint.h" #include "../src/generated/transform_constraint_data.h" #include "../src/generated/transform_constraint_pose.h" #include "../src/generated/transform_constraint_timeline.h" @@ -168,6 +165,5 @@ #include "../src/generated/translate_y_timeline.h" #include "../src/generated/update.h" #include "../src/generated/vertex_attachment.h" -#include "../src/generated/vertices.h" #endif // SPINE_C_H \ No newline at end of file diff --git a/spine-c-new/src/base.h b/spine-c-new/src/base.h index 3b5d8613e..dc102b63c 100644 --- a/spine-c-new/src/base.h +++ b/spine-c-new/src/base.h @@ -36,22 +36,22 @@ #ifdef __cplusplus #if _WIN32 -#define SPINE_C_EXPORT extern "C" __declspec(dllexport) +#define SPINE_C_API extern "C" __declspec(dllexport) #else #ifdef __EMSCRIPTEN__ -#define SPINE_C_EXPORT extern "C" __attribute__((used)) +#define SPINE_C_API extern "C" __attribute__((used)) #else -#define SPINE_C_EXPORT extern "C" +#define SPINE_C_API extern "C" #endif #endif #else #if _WIN32 -#define SPINE_C_EXPORT __declspec(dllexport) +#define SPINE_C_API __declspec(dllexport) #else #ifdef __EMSCRIPTEN__ -#define SPINE_C_EXPORT __attribute__((used)) +#define SPINE_C_API __attribute__((used)) #else -#define SPINE_C_EXPORT +#define SPINE_C_API #endif #endif #endif @@ -62,4 +62,6 @@ } name##_wrapper; \ typedef name##_wrapper *name; +typedef long long spine_property_id; + #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 index 7768524aa..fcf7f8025 100644 --- a/spine-c-new/src/extensions.cpp +++ b/spine-c-new/src/extensions.cpp @@ -136,27 +136,6 @@ void spine_report_leaks() { 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; @@ -425,64 +404,6 @@ spine_animation_state_events spine_skeleton_drawable_get_animation_state_events( 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__); diff --git a/spine-c-new/src/extensions.h b/spine-c-new/src/extensions.h index fb87797aa..cf278e407 100644 --- a/spine-c-new/src/extensions.h +++ b/spine-c-new/src/extensions.h @@ -55,76 +55,58 @@ 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); +SPINE_C_API int32_t spine_major_version(); +SPINE_C_API int32_t spine_minor_version(); +SPINE_C_API void spine_enable_debug_extension(bool enable); +SPINE_C_API void spine_report_leaks(); // 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); +SPINE_C_API float spine_bounds_get_x(spine_bounds bounds); +SPINE_C_API float spine_bounds_get_y(spine_bounds bounds); +SPINE_C_API float spine_bounds_get_width(spine_bounds bounds); +SPINE_C_API 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); +SPINE_C_API float spine_vector_get_x(spine_vector vector); +SPINE_C_API 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_C_API spine_atlas spine_atlas_load(const char *atlasData); +SPINE_C_API 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); +SPINE_C_API int32_t spine_atlas_get_num_image_paths(spine_atlas atlas); +SPINE_C_API const char *spine_atlas_get_image_path(spine_atlas atlas, int32_t index); +SPINE_C_API bool spine_atlas_is_pma(spine_atlas atlas); +SPINE_C_API const char *spine_atlas_get_error(spine_atlas atlas); +SPINE_C_API 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); +SPINE_C_API spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const char *skeletonData); +SPINE_C_API spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length); +SPINE_C_API const char *spine_skeleton_data_result_get_error(spine_skeleton_data_result result); +SPINE_C_API spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result); +SPINE_C_API 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); +SPINE_C_API spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData); +SPINE_C_API spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable); +SPINE_C_API void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable); +SPINE_C_API spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable); +SPINE_C_API spine_animation_state spine_skeleton_drawable_get_animation_state(spine_skeleton_drawable drawable); +SPINE_C_API spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable); +SPINE_C_API spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable); // 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); +SPINE_C_API spine_skin_entries spine_skin_entries_create(); +SPINE_C_API void spine_skin_entries_dispose(spine_skin_entries entries); +SPINE_C_API int32_t spine_skin_entries_get_num_entries(spine_skin_entries entries); +SPINE_C_API 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); +SPINE_C_API int32_t spine_skin_entry_get_slot_index(spine_skin_entry entry); +SPINE_C_API const char *spine_skin_entry_get_name(spine_skin_entry entry); +SPINE_C_API spine_attachment spine_skin_entry_get_attachment(spine_skin_entry entry); #ifdef __cplusplus } diff --git a/spine-c-new/src/generated/alpha_timeline.cpp b/spine-c-new/src/generated/alpha_timeline.cpp index 83749d8c7..e3d261dec 100644 --- a/spine-c-new/src/generated/alpha_timeline.cpp +++ b/spine-c-new/src/generated/alpha_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "alpha_timeline.h" #include using namespace spine; 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; + return (spine_alpha_timeline) new (__FILE__, __LINE__) AlphaTimeline(frameCount, bezierCount, slotIndex); } -void spine_alpha_timeline_dispose(spine_alpha_timeline obj) { - if (!obj) return; - delete (AlphaTimeline *) obj; +void spine_alpha_timeline_dispose(spine_alpha_timeline self) { + delete (AlphaTimeline*)self; } -spine_rtti spine_alpha_timeline_get_rtti() { - return (spine_rtti) &AlphaTimeline::rtti; +spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline self) { + return (spine_rtti)&((AlphaTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_alpha_timeline_apply(spine_alpha_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((AlphaTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_alpha_timeline_set_frame(spine_alpha_timeline self, size_t frame, float time, float value) { + ((CurveTimeline1*)(AlphaTimeline*)self)->setFrame(frame, time, value); } -float spine_alpha_timeline_get_curve_value(spine_alpha_timeline obj, float time) { - if (!obj) return 0; - AlphaTimeline *_obj = (AlphaTimeline *) obj; - return _obj->getCurveValue(time); +float spine_alpha_timeline_get_curve_value(spine_alpha_timeline self, float time) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getCurveValue(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, (MixBlend) blend, current, setup); +float spine_alpha_timeline_get_relative_value(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_alpha_timeline_get_absolute_value_1(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_alpha_timeline_get_absolute_value_2(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_alpha_timeline_get_scale_value(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_alpha_timeline self, size_t frame) { + ((CurveTimeline1*)(AlphaTimeline*)self)->setLinear(frame); } -void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int value) { - if (!obj) return; - AlphaTimeline *_obj = (AlphaTimeline *) obj; - _obj->setSlotIndex(value); +void spine_alpha_timeline_set_stepped(spine_alpha_timeline self, size_t frame) { + ((CurveTimeline1*)(AlphaTimeline*)self)->setStepped(frame); +} + +void spine_alpha_timeline_set_bezier(spine_alpha_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline1*)(AlphaTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_alpha_timeline_get_bezier_value(spine_alpha_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_alpha_timeline_get_curves(spine_alpha_timeline self) { + return (spine_array_float)&((CurveTimeline1*)(AlphaTimeline*)self)->getCurves(); +} + +size_t spine_alpha_timeline_get_frame_entries(spine_alpha_timeline self) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getFrameEntries(); +} + +size_t spine_alpha_timeline_get_frame_count(spine_alpha_timeline self) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_alpha_timeline_get_frames(spine_alpha_timeline self) { + return (spine_array_float)&((CurveTimeline1*)(AlphaTimeline*)self)->getFrames(); +} + +float spine_alpha_timeline_get_duration(spine_alpha_timeline self) { + return ((CurveTimeline1*)(AlphaTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_alpha_timeline_get_property_ids(spine_alpha_timeline self) { + return (spine_array_property_id)&((CurveTimeline1*)(AlphaTimeline*)self)->getPropertyIds(); +} + +int spine_alpha_timeline_get_slot_index(spine_alpha_timeline self) { + return ((SlotTimeline*)(AlphaTimeline*)self)->getSlotIndex(); +} + +void spine_alpha_timeline_set_slot_index(spine_alpha_timeline self, int inValue) { + ((SlotTimeline*)(AlphaTimeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_alpha_timeline_rtti(void) { + return (spine_rtti)&AlphaTimeline::rtti; } diff --git a/spine-c-new/src/generated/alpha_timeline.h b/spine-c-new/src/generated/alpha_timeline.h index 1a4a02541..f2c5b9c25 100644 --- a/spine-c-new/src/generated/alpha_timeline.h +++ b/spine-c-new/src/generated/alpha_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_ALPHA_TIMELINE_H +#define SPINE_SPINE_ALPHA_TIMELINE_H -#ifndef SPINE_C_ALPHATIMELINE_H -#define SPINE_C_ALPHATIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_alpha_timeline spine_alpha_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_alpha_timeline_dispose(spine_alpha_timeline self); + +SPINE_C_API spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline self); +SPINE_C_API void spine_alpha_timeline_apply(spine_alpha_timeline self, 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_API void spine_alpha_timeline_set_frame(spine_alpha_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_alpha_timeline_get_curve_value(spine_alpha_timeline self, float time); +SPINE_C_API float spine_alpha_timeline_get_relative_value(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_alpha_timeline_get_absolute_value_1(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_alpha_timeline_get_absolute_value_2(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_alpha_timeline_get_scale_value(spine_alpha_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_alpha_timeline_set_linear(spine_alpha_timeline self, size_t frame); +SPINE_C_API void spine_alpha_timeline_set_stepped(spine_alpha_timeline self, size_t frame); +SPINE_C_API void spine_alpha_timeline_set_bezier(spine_alpha_timeline self, 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_API float spine_alpha_timeline_get_bezier_value(spine_alpha_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_alpha_timeline_get_curves(spine_alpha_timeline self); +SPINE_C_API size_t spine_alpha_timeline_get_frame_entries(spine_alpha_timeline self); +SPINE_C_API size_t spine_alpha_timeline_get_frame_count(spine_alpha_timeline self); +SPINE_C_API spine_array_float spine_alpha_timeline_get_frames(spine_alpha_timeline self); +SPINE_C_API float spine_alpha_timeline_get_duration(spine_alpha_timeline self); +SPINE_C_API spine_array_property_id spine_alpha_timeline_get_property_ids(spine_alpha_timeline self); +SPINE_C_API int spine_alpha_timeline_get_slot_index(spine_alpha_timeline self); +SPINE_C_API void spine_alpha_timeline_set_slot_index(spine_alpha_timeline self, int inValue); +SPINE_C_API spine_rtti spine_alpha_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_ALPHATIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_ALPHA_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/animation.cpp b/spine-c-new/src/generated/animation.cpp index ed1d0309b..3fb52999d 100644 --- a/spine-c-new/src/generated/animation.cpp +++ b/spine-c-new/src/generated/animation.cpp @@ -1,105 +1,52 @@ -/****************************************************************************** - * 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 "animation.h" #include using namespace spine; 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; + return (spine_animation) new (__FILE__, __LINE__) Animation(*((const String*)name), *((Array*)timelines), duration); } -void spine_animation_dispose(spine_animation obj) { - if (!obj) return; - delete (Animation *) obj; +void spine_animation_dispose(spine_animation self) { + delete (Animation*)self; } -int32_t spine_animation_get_num_timelines(spine_animation obj) { - if (!obj) return 0; - Animation *_obj = (Animation *) obj; - return (int32_t) _obj->getTimelines().size(); +spine_array_timeline spine_animation_get_timelines(spine_animation self) { + return (spine_array_timeline)&((Animation*)self)->getTimelines(); } -spine_timeline *spine_animation_get_timelines(spine_animation obj) { - if (!obj) return nullptr; - Animation *_obj = (Animation *) obj; - return (spine_timeline *) _obj->getTimelines().buffer(); +void spine_animation_set_timelines(spine_animation self, spine_array_timeline timelines) { + ((Animation*)self)->setTimelines(*((Array*)timelines)); } -void spine_animation_set_timelines(spine_animation obj, spine_array_timeline value) { - if (!obj) return; - Animation *_obj = (Animation *) obj; - _obj->setTimelines((Array &) value); +bool spine_animation_has_timeline(spine_animation self, spine_array_property_id ids) { + return ((Animation*)self)->hasTimeline(*((Array*)ids)); } -bool spine_animation_has_timeline(spine_animation obj, spine_array_property_id ids) { - if (!obj) return false; - Animation *_obj = (Animation *) obj; - return _obj->hasTimeline((Array &) ids); +float spine_animation_get_duration(spine_animation self) { + return ((Animation*)self)->getDuration(); } -float spine_animation_get_duration(spine_animation obj) { - if (!obj) return 0; - Animation *_obj = (Animation *) obj; - return _obj->getDuration(); +void spine_animation_set_duration(spine_animation self, float inValue) { + ((Animation*)self)->setDuration(inValue); } -void spine_animation_set_duration(spine_animation obj, float value) { - if (!obj) return; - Animation *_obj = (Animation *) obj; - _obj->setDuration(value); +void spine_animation_apply(spine_animation self, 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) { + ((Animation*)self)->apply(*((Skeleton*)skeleton), lastTime, time, loop, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, loop, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +const char* spine_animation_get_name(spine_animation self) { + return (const char*)&((Animation*)self)->getName(); } -const char* spine_animation_get_name(spine_animation obj) { - if (!obj) return nullptr; - Animation *_obj = (Animation *) obj; - return (const char *) _obj->getName().buffer(); +spine_array_int spine_animation_get_bones(spine_animation self) { + return (spine_array_int)&((Animation*)self)->getBones(); } -int32_t spine_animation_get_num_bones(spine_animation obj) { - if (!obj) return 0; - Animation *_obj = (Animation *) obj; - return (int32_t) _obj->getBones().size(); +int spine_animation_search_1(spine_array_float values, float target) { + return Animation::search(*((Array*)values), target); } -int *spine_animation_get_bones(spine_animation obj) { - if (!obj) return nullptr; - Animation *_obj = (Animation *) obj; - auto& vec = _obj->getBones(); - if (vec.size() == 0) return nullptr; - return (int *) &vec[0]; +int spine_animation_search_2(spine_array_float values, float target, int step) { + return Animation::search(*((Array*)values), target, step); } diff --git a/spine-c-new/src/generated/animation.h b/spine-c-new/src/generated/animation.h index 9e743996f..7cb90ca32 100644 --- a/spine-c-new/src/generated/animation.h +++ b/spine-c-new/src/generated/animation.h @@ -1,56 +1,30 @@ -/****************************************************************************** - * 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_SPINE_ANIMATION_H +#define SPINE_SPINE_ANIMATION_H -#ifndef SPINE_C_ANIMATION_H -#define SPINE_C_ANIMATION_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_animation spine_animation_create(const char* name, spine_array_timeline 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 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, 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, 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 int *spine_animation_get_bones(spine_animation obj); +SPINE_C_API void spine_animation_dispose(spine_animation self); + +SPINE_C_API spine_array_timeline spine_animation_get_timelines(spine_animation self); +SPINE_C_API void spine_animation_set_timelines(spine_animation self, spine_array_timeline timelines); +SPINE_C_API bool spine_animation_has_timeline(spine_animation self, spine_array_property_id ids); +SPINE_C_API float spine_animation_get_duration(spine_animation self); +SPINE_C_API void spine_animation_set_duration(spine_animation self, float inValue); +SPINE_C_API void spine_animation_apply(spine_animation self, 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_API const char* spine_animation_get_name(spine_animation self); +SPINE_C_API spine_array_int spine_animation_get_bones(spine_animation self); +SPINE_C_API int spine_animation_search_1(spine_array_float values, float target); +SPINE_C_API int spine_animation_search_2(spine_array_float values, float target, int step); #ifdef __cplusplus } #endif -#endif // SPINE_C_ANIMATION_H \ No newline at end of file +#endif /* SPINE_SPINE_ANIMATION_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/animation_state.cpp b/spine-c-new/src/generated/animation_state.cpp index c85a3bc18..d9d3f7369 100644 --- a/spine-c-new/src/generated/animation_state.cpp +++ b/spine-c-new/src/generated/animation_state.cpp @@ -1,181 +1,100 @@ -/****************************************************************************** - * 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 "animation_state.h" #include using namespace spine; spine_animation_state spine_animation_state_create(spine_animation_state_data data) { - AnimationState *obj = new (__FILE__, __LINE__) AnimationState((AnimationStateData *) data); - return (spine_animation_state) obj; + return (spine_animation_state) new (__FILE__, __LINE__) AnimationState((AnimationStateData *)data); } -void spine_animation_state_dispose(spine_animation_state obj) { - if (!obj) return; - delete (AnimationState *) obj; +void spine_animation_state_dispose(spine_animation_state self) { + delete (AnimationState*)self; } -void spine_animation_state_update(spine_animation_state obj, float delta) { - if (!obj) return ; - AnimationState *_obj = (AnimationState *) obj; - _obj->update(delta); +void spine_animation_state_update(spine_animation_state self, float delta) { + ((AnimationState*)self)->update(delta); } -bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton) { - if (!obj) return false; - AnimationState *_obj = (AnimationState *) obj; - return _obj->apply(*(Skeleton*) skeleton); +bool spine_animation_state_apply(spine_animation_state self, spine_skeleton skeleton) { + return ((AnimationState*)self)->apply(*((Skeleton*)skeleton)); } -void spine_animation_state_clear_tracks(spine_animation_state obj) { - if (!obj) return ; - AnimationState *_obj = (AnimationState *) obj; - _obj->clearTracks(); +void spine_animation_state_clear_tracks(spine_animation_state self) { + ((AnimationState*)self)->clearTracks(); } -void spine_animation_state_clear_track(spine_animation_state obj, size_t trackIndex) { - if (!obj) return ; - AnimationState *_obj = (AnimationState *) obj; - _obj->clearTrack(trackIndex); +void spine_animation_state_clear_track(spine_animation_state self, size_t trackIndex) { + ((AnimationState*)self)->clearTrack(trackIndex); } -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_1(spine_animation_state self, size_t trackIndex, const char* animationName, bool loop) { + return (spine_track_entry)((AnimationState*)self)->setAnimation(trackIndex, *((const String*)animationName), loop); } -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_set_animation_2(spine_animation_state self, size_t trackIndex, spine_animation animation, bool loop) { + return (spine_track_entry)((AnimationState*)self)->setAnimation(trackIndex, (Animation *)animation, loop); } -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_1(spine_animation_state self, size_t trackIndex, const char* animationName, bool loop, float delay) { + return (spine_track_entry)((AnimationState*)self)->addAnimation(trackIndex, *((const String*)animationName), loop, delay); } -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_add_animation_2(spine_animation_state self, size_t trackIndex, spine_animation animation, bool loop, float delay) { + return (spine_track_entry)((AnimationState*)self)->addAnimation(trackIndex, (Animation *)animation, loop, delay); } -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_set_empty_animation(spine_animation_state self, size_t trackIndex, float mixDuration) { + return (spine_track_entry)((AnimationState*)self)->setEmptyAnimation(trackIndex, mixDuration); } -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); +spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state self, size_t trackIndex, float mixDuration, float delay) { + return (spine_track_entry)((AnimationState*)self)->addEmptyAnimation(trackIndex, mixDuration, delay); } -void spine_animation_state_set_empty_animations(spine_animation_state obj, float value) { - if (!obj) return; - AnimationState *_obj = (AnimationState *) obj; - _obj->setEmptyAnimations(value); +void spine_animation_state_set_empty_animations(spine_animation_state self, float mixDuration) { + ((AnimationState*)self)->setEmptyAnimations(mixDuration); } -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_track_entry spine_animation_state_get_current(spine_animation_state self, size_t trackIndex) { + return (spine_track_entry)((AnimationState*)self)->getCurrent(trackIndex); } -spine_animation_state_data spine_animation_state_get_data(spine_animation_state obj) { - if (!obj) return (spine_animation_state_data) 0; - AnimationState *_obj = (AnimationState *) obj; - return (spine_animation_state_data) _obj->getData(); +spine_animation_state_data spine_animation_state_get_data(spine_animation_state self) { + return (spine_animation_state_data)((AnimationState*)self)->getData(); } -int32_t spine_animation_state_get_num_tracks(spine_animation_state obj) { - if (!obj) return 0; - AnimationState *_obj = (AnimationState *) obj; - return (int32_t) _obj->getTracks().size(); +spine_array_track_entry spine_animation_state_get_tracks(spine_animation_state self) { + return (spine_array_track_entry)&((AnimationState*)self)->getTracks(); } -spine_track_entry *spine_animation_state_get_tracks(spine_animation_state obj) { - if (!obj) return nullptr; - AnimationState *_obj = (AnimationState *) obj; - return (spine_track_entry *) _obj->getTracks().buffer(); +float spine_animation_state_get_time_scale(spine_animation_state self) { + return ((AnimationState*)self)->getTimeScale(); } -float spine_animation_state_get_time_scale(spine_animation_state obj) { - if (!obj) return 0; - AnimationState *_obj = (AnimationState *) obj; - return _obj->getTimeScale(); +void spine_animation_state_set_time_scale(spine_animation_state self, float inValue) { + ((AnimationState*)self)->setTimeScale(inValue); } -void spine_animation_state_set_time_scale(spine_animation_state obj, float value) { - if (!obj) return; - AnimationState *_obj = (AnimationState *) obj; - _obj->setTimeScale(value); +void spine_animation_state_disable_queue(spine_animation_state self) { + ((AnimationState*)self)->disableQueue(); } -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 self) { + ((AnimationState*)self)->enableQueue(); } -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 self, bool inValue) { + ((AnimationState*)self)->setManualTrackEntryDisposal(inValue); } -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 self) { + return ((AnimationState*)self)->getManualTrackEntryDisposal(); } -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 self, spine_track_entry entry) { + ((AnimationState*)self)->disposeTrackEntry((TrackEntry *)entry); } -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); -} - -void * spine_animation_state_get_renderer_object(spine_animation_state obj) { - if (!obj) return nullptr; - AnimationState *_obj = (AnimationState *) obj; - return (void *) _obj->getRendererObject(); +void * spine_animation_state_get_renderer_object(spine_animation_state self) { + return ((HasRendererObject*)(AnimationState*)self)->getRendererObject(); } diff --git a/spine-c-new/src/generated/animation_state.h b/spine-c-new/src/generated/animation_state.h index 34f47a945..68f3b9caf 100644 --- a/spine-c-new/src/generated/animation_state.h +++ b/spine-c-new/src/generated/animation_state.h @@ -1,69 +1,42 @@ -/****************************************************************************** - * 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_SPINE_ANIMATION_STATE_H +#define SPINE_SPINE_ANIMATION_STATE_H -#ifndef SPINE_C_ANIMATIONSTATE_H -#define SPINE_C_ANIMATIONSTATE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_animation_state spine_animation_state_create(spine_animation_state_data data); -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 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, 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, size_t trackIndex); -SPINE_C_EXPORT spine_animation_state_data spine_animation_state_get_data(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 void * spine_animation_state_get_renderer_object(spine_animation_state obj); +SPINE_C_API void spine_animation_state_dispose(spine_animation_state self); + +SPINE_C_API void spine_animation_state_update(spine_animation_state self, float delta); +SPINE_C_API bool spine_animation_state_apply(spine_animation_state self, spine_skeleton skeleton); +SPINE_C_API void spine_animation_state_clear_tracks(spine_animation_state self); +SPINE_C_API void spine_animation_state_clear_track(spine_animation_state self, size_t trackIndex); +SPINE_C_API spine_track_entry spine_animation_state_set_animation_1(spine_animation_state self, size_t trackIndex, const char* animationName, bool loop); +SPINE_C_API spine_track_entry spine_animation_state_set_animation_2(spine_animation_state self, size_t trackIndex, spine_animation animation, bool loop); +SPINE_C_API spine_track_entry spine_animation_state_add_animation_1(spine_animation_state self, size_t trackIndex, const char* animationName, bool loop, float delay); +SPINE_C_API spine_track_entry spine_animation_state_add_animation_2(spine_animation_state self, size_t trackIndex, spine_animation animation, bool loop, float delay); +SPINE_C_API spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state self, size_t trackIndex, float mixDuration); +SPINE_C_API spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state self, size_t trackIndex, float mixDuration, float delay); +SPINE_C_API void spine_animation_state_set_empty_animations(spine_animation_state self, float mixDuration); +SPINE_C_API spine_track_entry spine_animation_state_get_current(spine_animation_state self, size_t trackIndex); +SPINE_C_API spine_animation_state_data spine_animation_state_get_data(spine_animation_state self); +SPINE_C_API spine_array_track_entry spine_animation_state_get_tracks(spine_animation_state self); +SPINE_C_API float spine_animation_state_get_time_scale(spine_animation_state self); +SPINE_C_API void spine_animation_state_set_time_scale(spine_animation_state self, float inValue); +SPINE_C_API void spine_animation_state_disable_queue(spine_animation_state self); +SPINE_C_API void spine_animation_state_enable_queue(spine_animation_state self); +SPINE_C_API void spine_animation_state_set_manual_track_entry_disposal(spine_animation_state self, bool inValue); +SPINE_C_API bool spine_animation_state_get_manual_track_entry_disposal(spine_animation_state self); +SPINE_C_API void spine_animation_state_dispose_track_entry(spine_animation_state self, spine_track_entry entry); +SPINE_C_API void * spine_animation_state_get_renderer_object(spine_animation_state self); #ifdef __cplusplus } #endif -#endif // SPINE_C_ANIMATIONSTATE_H \ No newline at end of file +#endif /* SPINE_SPINE_ANIMATION_STATE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/animation_state_data.cpp b/spine-c-new/src/generated/animation_state_data.cpp index 83a4146ea..29404e33a 100644 --- a/spine-c-new/src/generated/animation_state_data.cpp +++ b/spine-c-new/src/generated/animation_state_data.cpp @@ -1,85 +1,40 @@ -/****************************************************************************** - * 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 "animation_state_data.h" #include using namespace spine; spine_animation_state_data spine_animation_state_data_create(spine_skeleton_data skeletonData) { - AnimationStateData *obj = new (__FILE__, __LINE__) AnimationStateData((SkeletonData *) skeletonData); - return (spine_animation_state_data) obj; + return (spine_animation_state_data) new (__FILE__, __LINE__) AnimationStateData((SkeletonData *)skeletonData); } -void spine_animation_state_data_dispose(spine_animation_state_data obj) { - if (!obj) return; - delete (AnimationStateData *) obj; +void spine_animation_state_data_dispose(spine_animation_state_data self) { + delete (AnimationStateData*)self; } -spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data obj) { - if (!obj) return (spine_skeleton_data) 0; - AnimationStateData *_obj = (AnimationStateData *) obj; - return (spine_skeleton_data) _obj->getSkeletonData(); +spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data self) { + return (spine_skeleton_data)((AnimationStateData*)self)->getSkeletonData(); } -float spine_animation_state_data_get_default_mix(spine_animation_state_data obj) { - if (!obj) return 0; - AnimationStateData *_obj = (AnimationStateData *) obj; - return _obj->getDefaultMix(); +float spine_animation_state_data_get_default_mix(spine_animation_state_data self) { + return ((AnimationStateData*)self)->getDefaultMix(); } -void spine_animation_state_data_set_default_mix(spine_animation_state_data obj, float value) { - if (!obj) return; - AnimationStateData *_obj = (AnimationStateData *) obj; - _obj->setDefaultMix(value); +void spine_animation_state_data_set_default_mix(spine_animation_state_data self, float inValue) { + ((AnimationStateData*)self)->setDefaultMix(inValue); } -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_1(spine_animation_state_data self, const char* fromName, const char* toName, float duration) { + ((AnimationStateData*)self)->setMix(*((const String*)fromName), *((const String*)toName), 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); +void spine_animation_state_data_set_mix_2(spine_animation_state_data self, spine_animation from, spine_animation to, float duration) { + ((AnimationStateData*)self)->setMix((Animation *)from, (Animation *)to, duration); } -float spine_animation_state_data_get_mix(spine_animation_state_data obj, spine_animation from, spine_animation to) { - if (!obj) return 0; - AnimationStateData *_obj = (AnimationStateData *) obj; - return _obj->getMix((Animation *) from, (Animation *) to); +float spine_animation_state_data_get_mix(spine_animation_state_data self, spine_animation from, spine_animation to) { + return ((AnimationStateData*)self)->getMix((Animation *)from, (Animation *)to); } -void spine_animation_state_data_clear(spine_animation_state_data obj) { - if (!obj) return ; - AnimationStateData *_obj = (AnimationStateData *) obj; - _obj->clear(); +void spine_animation_state_data_clear(spine_animation_state_data self) { + ((AnimationStateData*)self)->clear(); } diff --git a/spine-c-new/src/generated/animation_state_data.h b/spine-c-new/src/generated/animation_state_data.h index 0e4840657..a85d2facc 100644 --- a/spine-c-new/src/generated/animation_state_data.h +++ b/spine-c-new/src/generated/animation_state_data.h @@ -1,53 +1,27 @@ -/****************************************************************************** - * 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_SPINE_ANIMATION_STATE_DATA_H +#define SPINE_SPINE_ANIMATION_STATE_DATA_H -#ifndef SPINE_C_ANIMATIONSTATEDATA_H -#define SPINE_C_ANIMATIONSTATEDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_animation_state_data spine_animation_state_data_create(spine_skeleton_data skeletonData); -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 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); +SPINE_C_API void spine_animation_state_data_dispose(spine_animation_state_data self); + +SPINE_C_API spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data self); +SPINE_C_API float spine_animation_state_data_get_default_mix(spine_animation_state_data self); +SPINE_C_API void spine_animation_state_data_set_default_mix(spine_animation_state_data self, float inValue); +SPINE_C_API void spine_animation_state_data_set_mix_1(spine_animation_state_data self, const char* fromName, const char* toName, float duration); +SPINE_C_API void spine_animation_state_data_set_mix_2(spine_animation_state_data self, spine_animation from, spine_animation to, float duration); +SPINE_C_API float spine_animation_state_data_get_mix(spine_animation_state_data self, spine_animation from, spine_animation to); +SPINE_C_API void spine_animation_state_data_clear(spine_animation_state_data self); #ifdef __cplusplus } #endif -#endif // SPINE_C_ANIMATIONSTATEDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_ANIMATION_STATE_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/arrays.cpp b/spine-c-new/src/generated/arrays.cpp index 3c09bfdb0..ce64fc68a 100644 --- a/spine-c-new/src/generated/arrays.cpp +++ b/spine-c-new/src/generated/arrays.cpp @@ -28,2332 +28,1804 @@ *****************************************************************************/ #include "arrays.h" -#include #include using namespace spine; -spine_array_float spine_array_float_create() { +spine_array_float spine_array_float_create(void) { return (spine_array_float) new (__FILE__, __LINE__) Array(); } +spine_array_float spine_array_float_create_with_capacity(size_t initialCapacity) { + return (spine_array_float) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_float_dispose(spine_array_float array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_float_size(spine_array_float array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_float spine_array_float_set_size(spine_array_float array, size_t newSize, float defaultValue) { + return (spine_array_float)&((Array*)array)->setSize(newSize, defaultValue); } void spine_array_float_ensure_capacity(spine_array_float array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add(inValue); +} + +void spine_array_float_add_all(spine_array_float array, spine_array_float inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_float_clear_and_add_all(spine_array_float array, spine_array_float inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_float_remove_at(spine_array_float array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)array)->indexOf(inValue); } -float spine_array_float_buffer(spine_array_float array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->buffer(); +float * spine_array_float_buffer(spine_array_float array) { + return ((Array*)array)->buffer(); } -spine_array_int spine_array_int_create() { +spine_array_int spine_array_int_create(void) { return (spine_array_int) new (__FILE__, __LINE__) Array(); } +spine_array_int spine_array_int_create_with_capacity(size_t initialCapacity) { + return (spine_array_int) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_int_dispose(spine_array_int array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_int_size(spine_array_int array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_int spine_array_int_set_size(spine_array_int array, size_t newSize, int defaultValue) { + return (spine_array_int)&((Array*)array)->setSize(newSize, defaultValue); } void spine_array_int_ensure_capacity(spine_array_int array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add(inValue); +} + +void spine_array_int_add_all(spine_array_int array, spine_array_int inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_int_clear_and_add_all(spine_array_int array, spine_array_int inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_int_remove_at(spine_array_int array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)array)->indexOf(inValue); } -int spine_array_int_buffer(spine_array_int array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->buffer(); +int * spine_array_int_buffer(spine_array_int array) { + return ((Array*)array)->buffer(); } -spine_array_unsigned_short spine_array_unsigned_short_create() { +spine_array_unsigned_short spine_array_unsigned_short_create(void) { return (spine_array_unsigned_short) new (__FILE__, __LINE__) Array(); } +spine_array_unsigned_short spine_array_unsigned_short_create_with_capacity(size_t initialCapacity) { + return (spine_array_unsigned_short) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_unsigned_short_dispose(spine_array_unsigned_short array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_unsigned_short spine_array_unsigned_short_set_size(spine_array_unsigned_short array, size_t newSize, unsigned short defaultValue) { + return (spine_array_unsigned_short)&((Array*)array)->setSize(newSize, defaultValue); } 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); + ((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); + ((Array*)array)->add(inValue); +} + +void spine_array_unsigned_short_add_all(spine_array_unsigned_short array, spine_array_unsigned_short inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_unsigned_short_clear_and_add_all(spine_array_unsigned_short array, spine_array_unsigned_short inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)array)->indexOf(inValue); } -unsigned short spine_array_unsigned_short_buffer(spine_array_unsigned_short array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->buffer(); +unsigned short * spine_array_unsigned_short_buffer(spine_array_unsigned_short array) { + return ((Array*)array)->buffer(); } -spine_array_property_id spine_array_property_id_create() { +spine_array_property_id spine_array_property_id_create(void) { return (spine_array_property_id) new (__FILE__, __LINE__) Array(); } +spine_array_property_id spine_array_property_id_create_with_capacity(size_t initialCapacity) { + return (spine_array_property_id) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_property_id_dispose(spine_array_property_id array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_property_id spine_array_property_id_set_size(spine_array_property_id array, size_t newSize, int64_t defaultValue) { + return (spine_array_property_id)&((Array*)array)->setSize(newSize, *((const PropertyId*)defaultValue)); } 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); + ((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); + ((Array*)array)->add(*((const PropertyId*)inValue)); +} + +void spine_array_property_id_add_all(spine_array_property_id array, spine_array_property_id inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_property_id_clear_and_add_all(spine_array_property_id array, spine_array_property_id inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)array)->contains(*((const PropertyId*)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); + return ((Array*)array)->indexOf(*((const PropertyId*)inValue)); } -int64_t spine_array_property_id_buffer(spine_array_property_id array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->buffer(); +spine_property_id spine_array_property_id_buffer(spine_array_property_id array) { + return (spine_property_id)((Array*)array)->buffer(); } -spine_array_animation spine_array_animation_create() { +spine_array_animation spine_array_animation_create(void) { return (spine_array_animation) new (__FILE__, __LINE__) Array(); } +spine_array_animation spine_array_animation_create_with_capacity(size_t initialCapacity) { + return (spine_array_animation) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_animation_dispose(spine_array_animation array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_animation_size(spine_array_animation array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_animation spine_array_animation_set_size(spine_array_animation array, size_t newSize, spine_animation defaultValue) { + return (spine_array_animation)&((Array*)array)->setSize(newSize, (Animation *)defaultValue); } void spine_array_animation_ensure_capacity(spine_array_animation array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Animation *)inValue); +} + +void spine_array_animation_add_all(spine_array_animation array, spine_array_animation inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_animation_clear_and_add_all(spine_array_animation array, spine_array_animation inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_animation_remove_at(spine_array_animation array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_animation * spine_array_animation_buffer(spine_array_animation array) { + return (spine_animation *)((Array*)array)->buffer(); } -spine_array_atlas_page spine_array_atlas_page_create() { +spine_array_atlas_page spine_array_atlas_page_create(void) { return (spine_array_atlas_page) new (__FILE__, __LINE__) Array(); } +spine_array_atlas_page spine_array_atlas_page_create_with_capacity(size_t initialCapacity) { + return (spine_array_atlas_page) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_atlas_page_dispose(spine_array_atlas_page array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_atlas_page spine_array_atlas_page_set_size(spine_array_atlas_page array, size_t newSize, spine_atlas_page defaultValue) { + return (spine_array_atlas_page)&((Array*)array)->setSize(newSize, (AtlasPage *)defaultValue); } 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); + ((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); + ((Array*)array)->add((AtlasPage *)inValue); +} + +void spine_array_atlas_page_add_all(spine_array_atlas_page array, spine_array_atlas_page inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_atlas_page_clear_and_add_all(spine_array_atlas_page array, spine_array_atlas_page inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_atlas_page * spine_array_atlas_page_buffer(spine_array_atlas_page array) { + return (spine_atlas_page *)((Array*)array)->buffer(); } -spine_array_atlas_region spine_array_atlas_region_create() { +spine_array_atlas_region spine_array_atlas_region_create(void) { return (spine_array_atlas_region) new (__FILE__, __LINE__) Array(); } +spine_array_atlas_region spine_array_atlas_region_create_with_capacity(size_t initialCapacity) { + return (spine_array_atlas_region) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_atlas_region_dispose(spine_array_atlas_region array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_atlas_region spine_array_atlas_region_set_size(spine_array_atlas_region array, size_t newSize, spine_atlas_region defaultValue) { + return (spine_array_atlas_region)&((Array*)array)->setSize(newSize, (AtlasRegion *)defaultValue); } 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); + ((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); + ((Array*)array)->add((AtlasRegion *)inValue); +} + +void spine_array_atlas_region_add_all(spine_array_atlas_region array, spine_array_atlas_region inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_atlas_region_clear_and_add_all(spine_array_atlas_region array, spine_array_atlas_region inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_atlas_region * spine_array_atlas_region_buffer(spine_array_atlas_region array) { + return (spine_atlas_region *)((Array*)array)->buffer(); } -spine_array_attachment spine_array_attachment_create() { +spine_array_attachment spine_array_attachment_create(void) { return (spine_array_attachment) new (__FILE__, __LINE__) Array(); } +spine_array_attachment spine_array_attachment_create_with_capacity(size_t initialCapacity) { + return (spine_array_attachment) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_attachment_dispose(spine_array_attachment array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_attachment_size(spine_array_attachment array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_attachment spine_array_attachment_set_size(spine_array_attachment array, size_t newSize, spine_attachment defaultValue) { + return (spine_array_attachment)&((Array*)array)->setSize(newSize, (Attachment *)defaultValue); } void spine_array_attachment_ensure_capacity(spine_array_attachment array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Attachment *)inValue); +} + +void spine_array_attachment_add_all(spine_array_attachment array, spine_array_attachment inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_attachment_clear_and_add_all(spine_array_attachment array, spine_array_attachment inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_attachment_remove_at(spine_array_attachment array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_attachment * spine_array_attachment_buffer(spine_array_attachment array) { + return (spine_attachment *)((Array*)array)->buffer(); } -spine_array_bone spine_array_bone_create() { +spine_array_bone spine_array_bone_create(void) { return (spine_array_bone) new (__FILE__, __LINE__) Array(); } +spine_array_bone spine_array_bone_create_with_capacity(size_t initialCapacity) { + return (spine_array_bone) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_bone_dispose(spine_array_bone array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_bone_size(spine_array_bone array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_bone spine_array_bone_set_size(spine_array_bone array, size_t newSize, spine_bone defaultValue) { + return (spine_array_bone)&((Array*)array)->setSize(newSize, (Bone *)defaultValue); } void spine_array_bone_ensure_capacity(spine_array_bone array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Bone *)inValue); +} + +void spine_array_bone_add_all(spine_array_bone array, spine_array_bone inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_bone_clear_and_add_all(spine_array_bone array, spine_array_bone inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_bone_remove_at(spine_array_bone array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_bone * spine_array_bone_buffer(spine_array_bone array) { + return (spine_bone *)((Array*)array)->buffer(); } -spine_array_bone_data spine_array_bone_data_create() { +spine_array_bone_data spine_array_bone_data_create(void) { return (spine_array_bone_data) new (__FILE__, __LINE__) Array(); } +spine_array_bone_data spine_array_bone_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_bone_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_bone_data_dispose(spine_array_bone_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_bone_data spine_array_bone_data_set_size(spine_array_bone_data array, size_t newSize, spine_bone_data defaultValue) { + return (spine_array_bone_data)&((Array*)array)->setSize(newSize, (BoneData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((BoneData *)inValue); +} + +void spine_array_bone_data_add_all(spine_array_bone_data array, spine_array_bone_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_bone_data_clear_and_add_all(spine_array_bone_data array, spine_array_bone_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_bone_data * spine_array_bone_data_buffer(spine_array_bone_data array) { + return (spine_bone_data *)((Array*)array)->buffer(); } -spine_array_bone_pose spine_array_bone_pose_create() { +spine_array_bone_pose spine_array_bone_pose_create(void) { return (spine_array_bone_pose) new (__FILE__, __LINE__) Array(); } +spine_array_bone_pose spine_array_bone_pose_create_with_capacity(size_t initialCapacity) { + return (spine_array_bone_pose) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_bone_pose_dispose(spine_array_bone_pose array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_bone_pose spine_array_bone_pose_set_size(spine_array_bone_pose array, size_t newSize, spine_bone_pose defaultValue) { + return (spine_array_bone_pose)&((Array*)array)->setSize(newSize, (BonePose *)defaultValue); } 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); + ((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); + ((Array*)array)->add((BonePose *)inValue); +} + +void spine_array_bone_pose_add_all(spine_array_bone_pose array, spine_array_bone_pose inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_bone_pose_clear_and_add_all(spine_array_bone_pose array, spine_array_bone_pose inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_bone_pose * spine_array_bone_pose_buffer(spine_array_bone_pose array) { + return (spine_bone_pose *)((Array*)array)->buffer(); } -spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create() { +spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create(void) { return (spine_array_bounding_box_attachment) new (__FILE__, __LINE__) Array(); } +spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create_with_capacity(size_t initialCapacity) { + return (spine_array_bounding_box_attachment) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_bounding_box_attachment_dispose(spine_array_bounding_box_attachment array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_bounding_box_attachment spine_array_bounding_box_attachment_set_size(spine_array_bounding_box_attachment array, size_t newSize, spine_bounding_box_attachment defaultValue) { + return (spine_array_bounding_box_attachment)&((Array*)array)->setSize(newSize, (BoundingBoxAttachment *)defaultValue); } 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); + ((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); + ((Array*)array)->add((BoundingBoxAttachment *)inValue); +} + +void spine_array_bounding_box_attachment_add_all(spine_array_bounding_box_attachment array, spine_array_bounding_box_attachment inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_bounding_box_attachment_clear_and_add_all(spine_array_bounding_box_attachment array, spine_array_bounding_box_attachment inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_bounding_box_attachment * spine_array_bounding_box_attachment_buffer(spine_array_bounding_box_attachment array) { + return (spine_bounding_box_attachment *)((Array*)array)->buffer(); } -spine_array_constraint spine_array_constraint_create() { +spine_array_constraint spine_array_constraint_create(void) { return (spine_array_constraint) new (__FILE__, __LINE__) Array(); } +spine_array_constraint spine_array_constraint_create_with_capacity(size_t initialCapacity) { + return (spine_array_constraint) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_constraint_dispose(spine_array_constraint array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_constraint_size(spine_array_constraint array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_constraint spine_array_constraint_set_size(spine_array_constraint array, size_t newSize, spine_constraint defaultValue) { + return (spine_array_constraint)&((Array*)array)->setSize(newSize, (Constraint *)defaultValue); } void spine_array_constraint_ensure_capacity(spine_array_constraint array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Constraint *)inValue); +} + +void spine_array_constraint_add_all(spine_array_constraint array, spine_array_constraint inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_constraint_clear_and_add_all(spine_array_constraint array, spine_array_constraint inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_constraint_remove_at(spine_array_constraint array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_constraint * spine_array_constraint_buffer(spine_array_constraint array) { + return (spine_constraint *)((Array*)array)->buffer(); } -spine_array_constraint_data spine_array_constraint_data_create() { +spine_array_constraint_data spine_array_constraint_data_create(void) { return (spine_array_constraint_data) new (__FILE__, __LINE__) Array(); } +spine_array_constraint_data spine_array_constraint_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_constraint_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_constraint_data_dispose(spine_array_constraint_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_constraint_data spine_array_constraint_data_set_size(spine_array_constraint_data array, size_t newSize, spine_constraint_data defaultValue) { + return (spine_array_constraint_data)&((Array*)array)->setSize(newSize, (ConstraintData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((ConstraintData *)inValue); +} + +void spine_array_constraint_data_add_all(spine_array_constraint_data array, spine_array_constraint_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_constraint_data_clear_and_add_all(spine_array_constraint_data array, spine_array_constraint_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_constraint_data * spine_array_constraint_data_buffer(spine_array_constraint_data array) { + return (spine_constraint_data *)((Array*)array)->buffer(); } -spine_array_event spine_array_event_create() { +spine_array_event spine_array_event_create(void) { return (spine_array_event) new (__FILE__, __LINE__) Array(); } +spine_array_event spine_array_event_create_with_capacity(size_t initialCapacity) { + return (spine_array_event) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_event_dispose(spine_array_event array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_event_size(spine_array_event array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_event spine_array_event_set_size(spine_array_event array, size_t newSize, spine_event defaultValue) { + return (spine_array_event)&((Array*)array)->setSize(newSize, (Event *)defaultValue); } void spine_array_event_ensure_capacity(spine_array_event array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Event *)inValue); +} + +void spine_array_event_add_all(spine_array_event array, spine_array_event inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_event_clear_and_add_all(spine_array_event array, spine_array_event inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_event_remove_at(spine_array_event array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_event * spine_array_event_buffer(spine_array_event array) { + return (spine_event *)((Array*)array)->buffer(); } -spine_array_event_data spine_array_event_data_create() { +spine_array_event_data spine_array_event_data_create(void) { return (spine_array_event_data) new (__FILE__, __LINE__) Array(); } +spine_array_event_data spine_array_event_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_event_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_event_data_dispose(spine_array_event_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_event_data spine_array_event_data_set_size(spine_array_event_data array, size_t newSize, spine_event_data defaultValue) { + return (spine_array_event_data)&((Array*)array)->setSize(newSize, (EventData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((EventData *)inValue); +} + +void spine_array_event_data_add_all(spine_array_event_data array, spine_array_event_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_event_data_clear_and_add_all(spine_array_event_data array, spine_array_event_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_event_data * spine_array_event_data_buffer(spine_array_event_data array) { + return (spine_event_data *)((Array*)array)->buffer(); } -spine_array_from_property spine_array_from_property_create() { - return (spine_array_from_property) new (__FILE__, __LINE__) Array(); +spine_array_from_property spine_array_from_property_create(void) { + return (spine_array_from_property) new (__FILE__, __LINE__) Array(); } +spine_array_from_property spine_array_from_property_create_with_capacity(size_t initialCapacity) { + return (spine_array_from_property) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_from_property_dispose(spine_array_from_property array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_from_property spine_array_from_property_set_size(spine_array_from_property array, size_t newSize, spine_from_property defaultValue) { + return (spine_array_from_property)&((Array*)array)->setSize(newSize, (FromProperty *)defaultValue); } 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); + ((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); + ((Array*)array)->add((FromProperty *)inValue); +} + +void spine_array_from_property_add_all(spine_array_from_property array, spine_array_from_property inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_from_property_clear_and_add_all(spine_array_from_property array, spine_array_from_property inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)array)->contains((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); + return ((Array*)array)->indexOf((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_from_property * spine_array_from_property_buffer(spine_array_from_property array) { + return (spine_from_property *)((Array*)array)->buffer(); } -spine_array_ik_constraint_data spine_array_ik_constraint_data_create() { +spine_array_ik_constraint_data spine_array_ik_constraint_data_create(void) { return (spine_array_ik_constraint_data) new (__FILE__, __LINE__) Array(); } +spine_array_ik_constraint_data spine_array_ik_constraint_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_ik_constraint_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_ik_constraint_data_dispose(spine_array_ik_constraint_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_ik_constraint_data spine_array_ik_constraint_data_set_size(spine_array_ik_constraint_data array, size_t newSize, spine_ik_constraint_data defaultValue) { + return (spine_array_ik_constraint_data)&((Array*)array)->setSize(newSize, (IkConstraintData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((IkConstraintData *)inValue); +} + +void spine_array_ik_constraint_data_add_all(spine_array_ik_constraint_data array, spine_array_ik_constraint_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_ik_constraint_data_clear_and_add_all(spine_array_ik_constraint_data array, spine_array_ik_constraint_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_ik_constraint_data * spine_array_ik_constraint_data_buffer(spine_array_ik_constraint_data array) { + return (spine_ik_constraint_data *)((Array*)array)->buffer(); } -spine_array_path_constraint_data spine_array_path_constraint_data_create() { +spine_array_path_constraint_data spine_array_path_constraint_data_create(void) { return (spine_array_path_constraint_data) new (__FILE__, __LINE__) Array(); } +spine_array_path_constraint_data spine_array_path_constraint_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_path_constraint_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_path_constraint_data_dispose(spine_array_path_constraint_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_path_constraint_data spine_array_path_constraint_data_set_size(spine_array_path_constraint_data array, size_t newSize, spine_path_constraint_data defaultValue) { + return (spine_array_path_constraint_data)&((Array*)array)->setSize(newSize, (PathConstraintData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((PathConstraintData *)inValue); +} + +void spine_array_path_constraint_data_add_all(spine_array_path_constraint_data array, spine_array_path_constraint_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_path_constraint_data_clear_and_add_all(spine_array_path_constraint_data array, spine_array_path_constraint_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_path_constraint_data * spine_array_path_constraint_data_buffer(spine_array_path_constraint_data array) { + return (spine_path_constraint_data *)((Array*)array)->buffer(); } -spine_array_physics_constraint spine_array_physics_constraint_create() { +spine_array_physics_constraint spine_array_physics_constraint_create(void) { return (spine_array_physics_constraint) new (__FILE__, __LINE__) Array(); } +spine_array_physics_constraint spine_array_physics_constraint_create_with_capacity(size_t initialCapacity) { + return (spine_array_physics_constraint) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_physics_constraint_dispose(spine_array_physics_constraint array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_physics_constraint spine_array_physics_constraint_set_size(spine_array_physics_constraint array, size_t newSize, spine_physics_constraint defaultValue) { + return (spine_array_physics_constraint)&((Array*)array)->setSize(newSize, (PhysicsConstraint *)defaultValue); } 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); + ((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); + ((Array*)array)->add((PhysicsConstraint *)inValue); +} + +void spine_array_physics_constraint_add_all(spine_array_physics_constraint array, spine_array_physics_constraint inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_physics_constraint_clear_and_add_all(spine_array_physics_constraint array, spine_array_physics_constraint inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_physics_constraint * spine_array_physics_constraint_buffer(spine_array_physics_constraint array) { + return (spine_physics_constraint *)((Array*)array)->buffer(); } -spine_array_physics_constraint_data spine_array_physics_constraint_data_create() { +spine_array_physics_constraint_data spine_array_physics_constraint_data_create(void) { return (spine_array_physics_constraint_data) new (__FILE__, __LINE__) Array(); } +spine_array_physics_constraint_data spine_array_physics_constraint_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_physics_constraint_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_physics_constraint_data_dispose(spine_array_physics_constraint_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_physics_constraint_data spine_array_physics_constraint_data_set_size(spine_array_physics_constraint_data array, size_t newSize, spine_physics_constraint_data defaultValue) { + return (spine_array_physics_constraint_data)&((Array*)array)->setSize(newSize, (PhysicsConstraintData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((PhysicsConstraintData *)inValue); +} + +void spine_array_physics_constraint_data_add_all(spine_array_physics_constraint_data array, spine_array_physics_constraint_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_physics_constraint_data_clear_and_add_all(spine_array_physics_constraint_data array, spine_array_physics_constraint_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_physics_constraint_data * spine_array_physics_constraint_data_buffer(spine_array_physics_constraint_data array) { + return (spine_physics_constraint_data *)((Array*)array)->buffer(); } -spine_array_polygon spine_array_polygon_create() { +spine_array_polygon spine_array_polygon_create(void) { return (spine_array_polygon) new (__FILE__, __LINE__) Array(); } +spine_array_polygon spine_array_polygon_create_with_capacity(size_t initialCapacity) { + return (spine_array_polygon) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_polygon_dispose(spine_array_polygon array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_polygon_size(spine_array_polygon array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_polygon spine_array_polygon_set_size(spine_array_polygon array, size_t newSize, spine_polygon defaultValue) { + return (spine_array_polygon)&((Array*)array)->setSize(newSize, (Polygon *)defaultValue); } void spine_array_polygon_ensure_capacity(spine_array_polygon array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Polygon *)inValue); +} + +void spine_array_polygon_add_all(spine_array_polygon array, spine_array_polygon inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_polygon_clear_and_add_all(spine_array_polygon array, spine_array_polygon inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_polygon_remove_at(spine_array_polygon array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_polygon * spine_array_polygon_buffer(spine_array_polygon array) { + return (spine_polygon *)((Array*)array)->buffer(); } -spine_array_skin spine_array_skin_create() { +spine_array_skin spine_array_skin_create(void) { return (spine_array_skin) new (__FILE__, __LINE__) Array(); } +spine_array_skin spine_array_skin_create_with_capacity(size_t initialCapacity) { + return (spine_array_skin) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_skin_dispose(spine_array_skin array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_skin_size(spine_array_skin array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_skin spine_array_skin_set_size(spine_array_skin array, size_t newSize, spine_skin defaultValue) { + return (spine_array_skin)&((Array*)array)->setSize(newSize, (Skin *)defaultValue); } void spine_array_skin_ensure_capacity(spine_array_skin array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Skin *)inValue); +} + +void spine_array_skin_add_all(spine_array_skin array, spine_array_skin inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_skin_clear_and_add_all(spine_array_skin array, spine_array_skin inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_skin_remove_at(spine_array_skin array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_skin * spine_array_skin_buffer(spine_array_skin array) { + return (spine_skin *)((Array*)array)->buffer(); } -spine_array_slot spine_array_slot_create() { +spine_array_slot spine_array_slot_create(void) { return (spine_array_slot) new (__FILE__, __LINE__) Array(); } +spine_array_slot spine_array_slot_create_with_capacity(size_t initialCapacity) { + return (spine_array_slot) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_slot_dispose(spine_array_slot array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_slot_size(spine_array_slot array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_slot spine_array_slot_set_size(spine_array_slot array, size_t newSize, spine_slot defaultValue) { + return (spine_array_slot)&((Array*)array)->setSize(newSize, (Slot *)defaultValue); } void spine_array_slot_ensure_capacity(spine_array_slot array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Slot *)inValue); +} + +void spine_array_slot_add_all(spine_array_slot array, spine_array_slot inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_slot_clear_and_add_all(spine_array_slot array, spine_array_slot inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_slot_remove_at(spine_array_slot array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_slot * spine_array_slot_buffer(spine_array_slot array) { + return (spine_slot *)((Array*)array)->buffer(); } -spine_array_slot_data spine_array_slot_data_create() { +spine_array_slot_data spine_array_slot_data_create(void) { return (spine_array_slot_data) new (__FILE__, __LINE__) Array(); } +spine_array_slot_data spine_array_slot_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_slot_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_slot_data_dispose(spine_array_slot_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_slot_data spine_array_slot_data_set_size(spine_array_slot_data array, size_t newSize, spine_slot_data defaultValue) { + return (spine_array_slot_data)&((Array*)array)->setSize(newSize, (SlotData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((SlotData *)inValue); +} + +void spine_array_slot_data_add_all(spine_array_slot_data array, spine_array_slot_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_slot_data_clear_and_add_all(spine_array_slot_data array, spine_array_slot_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_slot_data * spine_array_slot_data_buffer(spine_array_slot_data array) { + return (spine_slot_data *)((Array*)array)->buffer(); } -spine_array_texture_region spine_array_texture_region_create() { +spine_array_texture_region spine_array_texture_region_create(void) { return (spine_array_texture_region) new (__FILE__, __LINE__) Array(); } +spine_array_texture_region spine_array_texture_region_create_with_capacity(size_t initialCapacity) { + return (spine_array_texture_region) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_texture_region_dispose(spine_array_texture_region array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_texture_region spine_array_texture_region_set_size(spine_array_texture_region array, size_t newSize, spine_texture_region defaultValue) { + return (spine_array_texture_region)&((Array*)array)->setSize(newSize, (TextureRegion *)defaultValue); } 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); + ((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); + ((Array*)array)->add((TextureRegion *)inValue); +} + +void spine_array_texture_region_add_all(spine_array_texture_region array, spine_array_texture_region inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_texture_region_clear_and_add_all(spine_array_texture_region array, spine_array_texture_region inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_texture_region * spine_array_texture_region_buffer(spine_array_texture_region array) { + return (spine_texture_region *)((Array*)array)->buffer(); } -spine_array_timeline spine_array_timeline_create() { +spine_array_timeline spine_array_timeline_create(void) { return (spine_array_timeline) new (__FILE__, __LINE__) Array(); } +spine_array_timeline spine_array_timeline_create_with_capacity(size_t initialCapacity) { + return (spine_array_timeline) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_timeline_dispose(spine_array_timeline array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_timeline_size(spine_array_timeline array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_timeline spine_array_timeline_set_size(spine_array_timeline array, size_t newSize, spine_timeline defaultValue) { + return (spine_array_timeline)&((Array*)array)->setSize(newSize, (Timeline *)defaultValue); } void spine_array_timeline_ensure_capacity(spine_array_timeline array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Timeline *)inValue); +} + +void spine_array_timeline_add_all(spine_array_timeline array, spine_array_timeline inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_timeline_clear_and_add_all(spine_array_timeline array, spine_array_timeline inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_timeline_remove_at(spine_array_timeline array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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_timeline * spine_array_timeline_buffer(spine_array_timeline array) { + return (spine_timeline *)((Array*)array)->buffer(); } -spine_array_to_property spine_array_to_property_create() { - return (spine_array_to_property) new (__FILE__, __LINE__) Array(); +spine_array_to_property spine_array_to_property_create(void) { + return (spine_array_to_property) new (__FILE__, __LINE__) Array(); } +spine_array_to_property spine_array_to_property_create_with_capacity(size_t initialCapacity) { + return (spine_array_to_property) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_to_property_dispose(spine_array_to_property array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_to_property spine_array_to_property_set_size(spine_array_to_property array, size_t newSize, spine_to_property defaultValue) { + return (spine_array_to_property)&((Array*)array)->setSize(newSize, (ToProperty *)defaultValue); } 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); + ((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); + ((Array*)array)->add((ToProperty *)inValue); +} + +void spine_array_to_property_add_all(spine_array_to_property array, spine_array_to_property inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_to_property_clear_and_add_all(spine_array_to_property array, spine_array_to_property inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)array)->contains((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); + return ((Array*)array)->indexOf((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_to_property * spine_array_to_property_buffer(spine_array_to_property array) { + return (spine_to_property *)((Array*)array)->buffer(); } -spine_array_track_entry spine_array_track_entry_create() { +spine_array_track_entry spine_array_track_entry_create(void) { return (spine_array_track_entry) new (__FILE__, __LINE__) Array(); } +spine_array_track_entry spine_array_track_entry_create_with_capacity(size_t initialCapacity) { + return (spine_array_track_entry) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_track_entry_dispose(spine_array_track_entry array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_track_entry spine_array_track_entry_set_size(spine_array_track_entry array, size_t newSize, spine_track_entry defaultValue) { + return (spine_array_track_entry)&((Array*)array)->setSize(newSize, (TrackEntry *)defaultValue); } 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); + ((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); + ((Array*)array)->add((TrackEntry *)inValue); +} + +void spine_array_track_entry_add_all(spine_array_track_entry array, spine_array_track_entry inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_track_entry_clear_and_add_all(spine_array_track_entry array, spine_array_track_entry inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_track_entry * spine_array_track_entry_buffer(spine_array_track_entry array) { + return (spine_track_entry *)((Array*)array)->buffer(); } -spine_array_transform_constraint_data spine_array_transform_constraint_data_create() { +spine_array_transform_constraint_data spine_array_transform_constraint_data_create(void) { return (spine_array_transform_constraint_data) new (__FILE__, __LINE__) Array(); } +spine_array_transform_constraint_data spine_array_transform_constraint_data_create_with_capacity(size_t initialCapacity) { + return (spine_array_transform_constraint_data) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_transform_constraint_data_dispose(spine_array_transform_constraint_data array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)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(); + return ((Array*)array)->size(); +} + +spine_array_transform_constraint_data spine_array_transform_constraint_data_set_size(spine_array_transform_constraint_data array, size_t newSize, spine_transform_constraint_data defaultValue) { + return (spine_array_transform_constraint_data)&((Array*)array)->setSize(newSize, (TransformConstraintData *)defaultValue); } 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); + ((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); + ((Array*)array)->add((TransformConstraintData *)inValue); +} + +void spine_array_transform_constraint_data_add_all(spine_array_transform_constraint_data array, spine_array_transform_constraint_data inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_transform_constraint_data_clear_and_add_all(spine_array_transform_constraint_data array, spine_array_transform_constraint_data inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)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); + ((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); + return ((Array*)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); + return ((Array*)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_transform_constraint_data * spine_array_transform_constraint_data_buffer(spine_array_transform_constraint_data array) { + return (spine_transform_constraint_data *)((Array*)array)->buffer(); } -spine_array_update spine_array_update_create() { +spine_array_update spine_array_update_create(void) { return (spine_array_update) new (__FILE__, __LINE__) Array(); } +spine_array_update spine_array_update_create_with_capacity(size_t initialCapacity) { + return (spine_array_update) new (__FILE__, __LINE__) Array(initialCapacity); +} void spine_array_update_dispose(spine_array_update array) { - if (!array) return; - delete (Array*) array; + 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(); + ((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(); + return ((Array*)array)->getCapacity(); } size_t spine_array_update_size(spine_array_update array) { - if (!array) return 0; - Array *_array = (Array*) array; - return _array->size(); + return ((Array*)array)->size(); +} + +spine_array_update spine_array_update_set_size(spine_array_update array, size_t newSize, spine_update defaultValue) { + return (spine_array_update)&((Array*)array)->setSize(newSize, (Update *)defaultValue); } void spine_array_update_ensure_capacity(spine_array_update array, size_t newCapacity) { - if (!array) return; - Array *_array = (Array*) array; - _array->ensureCapacity(newCapacity); + ((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); + ((Array*)array)->add((Update *)inValue); +} + +void spine_array_update_add_all(spine_array_update array, spine_array_update inValue) { + ((Array*)array)->addAll(*((const Array*)inValue)); +} + +void spine_array_update_clear_and_add_all(spine_array_update array, spine_array_update inValue) { + ((Array*)array)->clearAndAddAll(*((const Array*)inValue)); } void spine_array_update_remove_at(spine_array_update array, size_t inIndex) { - if (!array) return; - Array *_array = (Array*) array; - _array->removeAt(inIndex); + ((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); + return ((Array*)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); + return ((Array*)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(); +spine_update * spine_array_update_buffer(spine_array_update array) { + return (spine_update *)((Array*)array)->buffer(); } diff --git a/spine-c-new/src/generated/arrays.h b/spine-c-new/src/generated/arrays.h index c3f346487..f48fbfd73 100644 --- a/spine-c-new/src/generated/arrays.h +++ b/spine-c-new/src/generated/arrays.h @@ -37,535 +37,908 @@ extern "C" { #endif -// 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_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_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 bool spine_array_unsigned_short_contains(spine_array_unsigned_short array, unsigned short inValue); -SPINE_C_EXPORT int spine_array_unsigned_short_index_of(spine_array_unsigned_short array, unsigned short inValue); -SPINE_C_EXPORT unsigned short spine_array_unsigned_short_buffer(spine_array_unsigned_short 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_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_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_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_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_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); +SPINE_C_API spine_array_float spine_array_float_create(void); + +SPINE_C_API spine_array_float spine_array_float_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_float_dispose(spine_array_float array); +SPINE_C_API void spine_array_float_clear(spine_array_float array); + +SPINE_C_API size_t spine_array_float_get_capacity(spine_array_float array); + +SPINE_C_API size_t spine_array_float_size(spine_array_float array); + +SPINE_C_API spine_array_float spine_array_float_set_size(spine_array_float array, size_t newSize, float defaultValue); + +SPINE_C_API void spine_array_float_ensure_capacity(spine_array_float array, size_t newCapacity); + +SPINE_C_API void spine_array_float_add(spine_array_float array, float inValue); + +SPINE_C_API void spine_array_float_add_all(spine_array_float array, spine_array_float inValue); + +SPINE_C_API void spine_array_float_clear_and_add_all(spine_array_float array, spine_array_float inValue); + +SPINE_C_API void spine_array_float_remove_at(spine_array_float array, size_t inIndex); + +SPINE_C_API bool spine_array_float_contains(spine_array_float array, float inValue); + +SPINE_C_API int spine_array_float_index_of(spine_array_float array, float inValue); + +SPINE_C_API float * spine_array_float_buffer(spine_array_float array); + +SPINE_C_API spine_array_int spine_array_int_create(void); + +SPINE_C_API spine_array_int spine_array_int_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_int_dispose(spine_array_int array); +SPINE_C_API void spine_array_int_clear(spine_array_int array); + +SPINE_C_API size_t spine_array_int_get_capacity(spine_array_int array); + +SPINE_C_API size_t spine_array_int_size(spine_array_int array); + +SPINE_C_API spine_array_int spine_array_int_set_size(spine_array_int array, size_t newSize, int defaultValue); + +SPINE_C_API void spine_array_int_ensure_capacity(spine_array_int array, size_t newCapacity); + +SPINE_C_API void spine_array_int_add(spine_array_int array, int inValue); + +SPINE_C_API void spine_array_int_add_all(spine_array_int array, spine_array_int inValue); + +SPINE_C_API void spine_array_int_clear_and_add_all(spine_array_int array, spine_array_int inValue); + +SPINE_C_API void spine_array_int_remove_at(spine_array_int array, size_t inIndex); + +SPINE_C_API bool spine_array_int_contains(spine_array_int array, int inValue); + +SPINE_C_API int spine_array_int_index_of(spine_array_int array, int inValue); + +SPINE_C_API int * spine_array_int_buffer(spine_array_int array); + +SPINE_C_API spine_array_unsigned_short spine_array_unsigned_short_create(void); + +SPINE_C_API spine_array_unsigned_short spine_array_unsigned_short_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_unsigned_short_dispose(spine_array_unsigned_short array); +SPINE_C_API void spine_array_unsigned_short_clear(spine_array_unsigned_short array); + +SPINE_C_API size_t spine_array_unsigned_short_get_capacity(spine_array_unsigned_short array); + +SPINE_C_API size_t spine_array_unsigned_short_size(spine_array_unsigned_short array); + +SPINE_C_API spine_array_unsigned_short spine_array_unsigned_short_set_size(spine_array_unsigned_short array, size_t newSize, unsigned short defaultValue); + +SPINE_C_API void spine_array_unsigned_short_ensure_capacity(spine_array_unsigned_short array, size_t newCapacity); + +SPINE_C_API void spine_array_unsigned_short_add(spine_array_unsigned_short array, unsigned short inValue); + +SPINE_C_API void spine_array_unsigned_short_add_all(spine_array_unsigned_short array, spine_array_unsigned_short inValue); + +SPINE_C_API void spine_array_unsigned_short_clear_and_add_all(spine_array_unsigned_short array, spine_array_unsigned_short inValue); + +SPINE_C_API void spine_array_unsigned_short_remove_at(spine_array_unsigned_short array, size_t inIndex); + +SPINE_C_API bool spine_array_unsigned_short_contains(spine_array_unsigned_short array, unsigned short inValue); + +SPINE_C_API int spine_array_unsigned_short_index_of(spine_array_unsigned_short array, unsigned short inValue); + +SPINE_C_API unsigned short * spine_array_unsigned_short_buffer(spine_array_unsigned_short array); + +SPINE_C_API spine_array_property_id spine_array_property_id_create(void); + +SPINE_C_API spine_array_property_id spine_array_property_id_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_property_id_dispose(spine_array_property_id array); +SPINE_C_API void spine_array_property_id_clear(spine_array_property_id array); + +SPINE_C_API size_t spine_array_property_id_get_capacity(spine_array_property_id array); + +SPINE_C_API size_t spine_array_property_id_size(spine_array_property_id array); + +SPINE_C_API spine_array_property_id spine_array_property_id_set_size(spine_array_property_id array, size_t newSize, int64_t defaultValue); + +SPINE_C_API void spine_array_property_id_ensure_capacity(spine_array_property_id array, size_t newCapacity); + +SPINE_C_API void spine_array_property_id_add(spine_array_property_id array, int64_t inValue); + +SPINE_C_API void spine_array_property_id_add_all(spine_array_property_id array, spine_array_property_id inValue); + +SPINE_C_API void spine_array_property_id_clear_and_add_all(spine_array_property_id array, spine_array_property_id inValue); + +SPINE_C_API void spine_array_property_id_remove_at(spine_array_property_id array, size_t inIndex); + +SPINE_C_API bool spine_array_property_id_contains(spine_array_property_id array, int64_t inValue); + +SPINE_C_API int spine_array_property_id_index_of(spine_array_property_id array, int64_t inValue); + +SPINE_C_API spine_property_id spine_array_property_id_buffer(spine_array_property_id array); + +SPINE_C_API spine_array_animation spine_array_animation_create(void); + +SPINE_C_API spine_array_animation spine_array_animation_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_animation_dispose(spine_array_animation array); +SPINE_C_API void spine_array_animation_clear(spine_array_animation array); + +SPINE_C_API size_t spine_array_animation_get_capacity(spine_array_animation array); + +SPINE_C_API size_t spine_array_animation_size(spine_array_animation array); + +SPINE_C_API spine_array_animation spine_array_animation_set_size(spine_array_animation array, size_t newSize, spine_animation defaultValue); + +SPINE_C_API void spine_array_animation_ensure_capacity(spine_array_animation array, size_t newCapacity); + +SPINE_C_API void spine_array_animation_add(spine_array_animation array, spine_animation inValue); + +SPINE_C_API void spine_array_animation_add_all(spine_array_animation array, spine_array_animation inValue); + +SPINE_C_API void spine_array_animation_clear_and_add_all(spine_array_animation array, spine_array_animation inValue); + +SPINE_C_API void spine_array_animation_remove_at(spine_array_animation array, size_t inIndex); + +SPINE_C_API bool spine_array_animation_contains(spine_array_animation array, spine_animation inValue); + +SPINE_C_API int spine_array_animation_index_of(spine_array_animation array, spine_animation inValue); + +SPINE_C_API spine_animation * spine_array_animation_buffer(spine_array_animation array); + +SPINE_C_API spine_array_atlas_page spine_array_atlas_page_create(void); + +SPINE_C_API spine_array_atlas_page spine_array_atlas_page_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_atlas_page_dispose(spine_array_atlas_page array); +SPINE_C_API void spine_array_atlas_page_clear(spine_array_atlas_page array); + +SPINE_C_API size_t spine_array_atlas_page_get_capacity(spine_array_atlas_page array); + +SPINE_C_API size_t spine_array_atlas_page_size(spine_array_atlas_page array); + +SPINE_C_API spine_array_atlas_page spine_array_atlas_page_set_size(spine_array_atlas_page array, size_t newSize, spine_atlas_page defaultValue); + +SPINE_C_API void spine_array_atlas_page_ensure_capacity(spine_array_atlas_page array, size_t newCapacity); + +SPINE_C_API void spine_array_atlas_page_add(spine_array_atlas_page array, spine_atlas_page inValue); + +SPINE_C_API void spine_array_atlas_page_add_all(spine_array_atlas_page array, spine_array_atlas_page inValue); + +SPINE_C_API void spine_array_atlas_page_clear_and_add_all(spine_array_atlas_page array, spine_array_atlas_page inValue); + +SPINE_C_API void spine_array_atlas_page_remove_at(spine_array_atlas_page array, size_t inIndex); + +SPINE_C_API bool spine_array_atlas_page_contains(spine_array_atlas_page array, spine_atlas_page inValue); + +SPINE_C_API int spine_array_atlas_page_index_of(spine_array_atlas_page array, spine_atlas_page inValue); + +SPINE_C_API spine_atlas_page * spine_array_atlas_page_buffer(spine_array_atlas_page array); + +SPINE_C_API spine_array_atlas_region spine_array_atlas_region_create(void); + +SPINE_C_API spine_array_atlas_region spine_array_atlas_region_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_atlas_region_dispose(spine_array_atlas_region array); +SPINE_C_API void spine_array_atlas_region_clear(spine_array_atlas_region array); + +SPINE_C_API size_t spine_array_atlas_region_get_capacity(spine_array_atlas_region array); + +SPINE_C_API size_t spine_array_atlas_region_size(spine_array_atlas_region array); + +SPINE_C_API spine_array_atlas_region spine_array_atlas_region_set_size(spine_array_atlas_region array, size_t newSize, spine_atlas_region defaultValue); + +SPINE_C_API void spine_array_atlas_region_ensure_capacity(spine_array_atlas_region array, size_t newCapacity); + +SPINE_C_API void spine_array_atlas_region_add(spine_array_atlas_region array, spine_atlas_region inValue); + +SPINE_C_API void spine_array_atlas_region_add_all(spine_array_atlas_region array, spine_array_atlas_region inValue); + +SPINE_C_API void spine_array_atlas_region_clear_and_add_all(spine_array_atlas_region array, spine_array_atlas_region inValue); + +SPINE_C_API void spine_array_atlas_region_remove_at(spine_array_atlas_region array, size_t inIndex); + +SPINE_C_API bool spine_array_atlas_region_contains(spine_array_atlas_region array, spine_atlas_region inValue); + +SPINE_C_API int spine_array_atlas_region_index_of(spine_array_atlas_region array, spine_atlas_region inValue); + +SPINE_C_API spine_atlas_region * spine_array_atlas_region_buffer(spine_array_atlas_region array); + +SPINE_C_API spine_array_attachment spine_array_attachment_create(void); + +SPINE_C_API spine_array_attachment spine_array_attachment_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_attachment_dispose(spine_array_attachment array); +SPINE_C_API void spine_array_attachment_clear(spine_array_attachment array); + +SPINE_C_API size_t spine_array_attachment_get_capacity(spine_array_attachment array); + +SPINE_C_API size_t spine_array_attachment_size(spine_array_attachment array); + +SPINE_C_API spine_array_attachment spine_array_attachment_set_size(spine_array_attachment array, size_t newSize, spine_attachment defaultValue); + +SPINE_C_API void spine_array_attachment_ensure_capacity(spine_array_attachment array, size_t newCapacity); + +SPINE_C_API void spine_array_attachment_add(spine_array_attachment array, spine_attachment inValue); + +SPINE_C_API void spine_array_attachment_add_all(spine_array_attachment array, spine_array_attachment inValue); + +SPINE_C_API void spine_array_attachment_clear_and_add_all(spine_array_attachment array, spine_array_attachment inValue); + +SPINE_C_API void spine_array_attachment_remove_at(spine_array_attachment array, size_t inIndex); + +SPINE_C_API bool spine_array_attachment_contains(spine_array_attachment array, spine_attachment inValue); + +SPINE_C_API int spine_array_attachment_index_of(spine_array_attachment array, spine_attachment inValue); + +SPINE_C_API spine_attachment * spine_array_attachment_buffer(spine_array_attachment array); + +SPINE_C_API spine_array_bone spine_array_bone_create(void); + +SPINE_C_API spine_array_bone spine_array_bone_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_bone_dispose(spine_array_bone array); +SPINE_C_API void spine_array_bone_clear(spine_array_bone array); + +SPINE_C_API size_t spine_array_bone_get_capacity(spine_array_bone array); + +SPINE_C_API size_t spine_array_bone_size(spine_array_bone array); + +SPINE_C_API spine_array_bone spine_array_bone_set_size(spine_array_bone array, size_t newSize, spine_bone defaultValue); + +SPINE_C_API void spine_array_bone_ensure_capacity(spine_array_bone array, size_t newCapacity); + +SPINE_C_API void spine_array_bone_add(spine_array_bone array, spine_bone inValue); + +SPINE_C_API void spine_array_bone_add_all(spine_array_bone array, spine_array_bone inValue); + +SPINE_C_API void spine_array_bone_clear_and_add_all(spine_array_bone array, spine_array_bone inValue); + +SPINE_C_API void spine_array_bone_remove_at(spine_array_bone array, size_t inIndex); + +SPINE_C_API bool spine_array_bone_contains(spine_array_bone array, spine_bone inValue); + +SPINE_C_API int spine_array_bone_index_of(spine_array_bone array, spine_bone inValue); + +SPINE_C_API spine_bone * spine_array_bone_buffer(spine_array_bone array); + +SPINE_C_API spine_array_bone_data spine_array_bone_data_create(void); + +SPINE_C_API spine_array_bone_data spine_array_bone_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_bone_data_dispose(spine_array_bone_data array); +SPINE_C_API void spine_array_bone_data_clear(spine_array_bone_data array); + +SPINE_C_API size_t spine_array_bone_data_get_capacity(spine_array_bone_data array); + +SPINE_C_API size_t spine_array_bone_data_size(spine_array_bone_data array); + +SPINE_C_API spine_array_bone_data spine_array_bone_data_set_size(spine_array_bone_data array, size_t newSize, spine_bone_data defaultValue); + +SPINE_C_API void spine_array_bone_data_ensure_capacity(spine_array_bone_data array, size_t newCapacity); + +SPINE_C_API void spine_array_bone_data_add(spine_array_bone_data array, spine_bone_data inValue); + +SPINE_C_API void spine_array_bone_data_add_all(spine_array_bone_data array, spine_array_bone_data inValue); + +SPINE_C_API void spine_array_bone_data_clear_and_add_all(spine_array_bone_data array, spine_array_bone_data inValue); + +SPINE_C_API void spine_array_bone_data_remove_at(spine_array_bone_data array, size_t inIndex); + +SPINE_C_API bool spine_array_bone_data_contains(spine_array_bone_data array, spine_bone_data inValue); + +SPINE_C_API int spine_array_bone_data_index_of(spine_array_bone_data array, spine_bone_data inValue); + +SPINE_C_API spine_bone_data * spine_array_bone_data_buffer(spine_array_bone_data array); + +SPINE_C_API spine_array_bone_pose spine_array_bone_pose_create(void); + +SPINE_C_API spine_array_bone_pose spine_array_bone_pose_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_bone_pose_dispose(spine_array_bone_pose array); +SPINE_C_API void spine_array_bone_pose_clear(spine_array_bone_pose array); + +SPINE_C_API size_t spine_array_bone_pose_get_capacity(spine_array_bone_pose array); + +SPINE_C_API size_t spine_array_bone_pose_size(spine_array_bone_pose array); + +SPINE_C_API spine_array_bone_pose spine_array_bone_pose_set_size(spine_array_bone_pose array, size_t newSize, spine_bone_pose defaultValue); + +SPINE_C_API void spine_array_bone_pose_ensure_capacity(spine_array_bone_pose array, size_t newCapacity); + +SPINE_C_API void spine_array_bone_pose_add(spine_array_bone_pose array, spine_bone_pose inValue); + +SPINE_C_API void spine_array_bone_pose_add_all(spine_array_bone_pose array, spine_array_bone_pose inValue); + +SPINE_C_API void spine_array_bone_pose_clear_and_add_all(spine_array_bone_pose array, spine_array_bone_pose inValue); + +SPINE_C_API void spine_array_bone_pose_remove_at(spine_array_bone_pose array, size_t inIndex); + +SPINE_C_API bool spine_array_bone_pose_contains(spine_array_bone_pose array, spine_bone_pose inValue); + +SPINE_C_API int spine_array_bone_pose_index_of(spine_array_bone_pose array, spine_bone_pose inValue); + +SPINE_C_API spine_bone_pose * spine_array_bone_pose_buffer(spine_array_bone_pose array); + +SPINE_C_API spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create(void); + +SPINE_C_API spine_array_bounding_box_attachment spine_array_bounding_box_attachment_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_bounding_box_attachment_dispose(spine_array_bounding_box_attachment array); +SPINE_C_API void spine_array_bounding_box_attachment_clear(spine_array_bounding_box_attachment array); + +SPINE_C_API size_t spine_array_bounding_box_attachment_get_capacity(spine_array_bounding_box_attachment array); + +SPINE_C_API size_t spine_array_bounding_box_attachment_size(spine_array_bounding_box_attachment array); + +SPINE_C_API spine_array_bounding_box_attachment spine_array_bounding_box_attachment_set_size(spine_array_bounding_box_attachment array, size_t newSize, spine_bounding_box_attachment defaultValue); + +SPINE_C_API void spine_array_bounding_box_attachment_ensure_capacity(spine_array_bounding_box_attachment array, size_t newCapacity); + +SPINE_C_API void spine_array_bounding_box_attachment_add(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); + +SPINE_C_API void spine_array_bounding_box_attachment_add_all(spine_array_bounding_box_attachment array, spine_array_bounding_box_attachment inValue); + +SPINE_C_API void spine_array_bounding_box_attachment_clear_and_add_all(spine_array_bounding_box_attachment array, spine_array_bounding_box_attachment inValue); + +SPINE_C_API void spine_array_bounding_box_attachment_remove_at(spine_array_bounding_box_attachment array, size_t inIndex); + +SPINE_C_API bool spine_array_bounding_box_attachment_contains(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); + +SPINE_C_API int spine_array_bounding_box_attachment_index_of(spine_array_bounding_box_attachment array, spine_bounding_box_attachment inValue); + +SPINE_C_API spine_bounding_box_attachment * spine_array_bounding_box_attachment_buffer(spine_array_bounding_box_attachment array); + +SPINE_C_API spine_array_constraint spine_array_constraint_create(void); + +SPINE_C_API spine_array_constraint spine_array_constraint_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_constraint_dispose(spine_array_constraint array); +SPINE_C_API void spine_array_constraint_clear(spine_array_constraint array); + +SPINE_C_API size_t spine_array_constraint_get_capacity(spine_array_constraint array); + +SPINE_C_API size_t spine_array_constraint_size(spine_array_constraint array); + +SPINE_C_API spine_array_constraint spine_array_constraint_set_size(spine_array_constraint array, size_t newSize, spine_constraint defaultValue); + +SPINE_C_API void spine_array_constraint_ensure_capacity(spine_array_constraint array, size_t newCapacity); + +SPINE_C_API void spine_array_constraint_add(spine_array_constraint array, spine_constraint inValue); + +SPINE_C_API void spine_array_constraint_add_all(spine_array_constraint array, spine_array_constraint inValue); + +SPINE_C_API void spine_array_constraint_clear_and_add_all(spine_array_constraint array, spine_array_constraint inValue); + +SPINE_C_API void spine_array_constraint_remove_at(spine_array_constraint array, size_t inIndex); + +SPINE_C_API bool spine_array_constraint_contains(spine_array_constraint array, spine_constraint inValue); + +SPINE_C_API int spine_array_constraint_index_of(spine_array_constraint array, spine_constraint inValue); + +SPINE_C_API spine_constraint * spine_array_constraint_buffer(spine_array_constraint array); + +SPINE_C_API spine_array_constraint_data spine_array_constraint_data_create(void); + +SPINE_C_API spine_array_constraint_data spine_array_constraint_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_constraint_data_dispose(spine_array_constraint_data array); +SPINE_C_API void spine_array_constraint_data_clear(spine_array_constraint_data array); + +SPINE_C_API size_t spine_array_constraint_data_get_capacity(spine_array_constraint_data array); + +SPINE_C_API size_t spine_array_constraint_data_size(spine_array_constraint_data array); + +SPINE_C_API spine_array_constraint_data spine_array_constraint_data_set_size(spine_array_constraint_data array, size_t newSize, spine_constraint_data defaultValue); + +SPINE_C_API void spine_array_constraint_data_ensure_capacity(spine_array_constraint_data array, size_t newCapacity); + +SPINE_C_API void spine_array_constraint_data_add(spine_array_constraint_data array, spine_constraint_data inValue); + +SPINE_C_API void spine_array_constraint_data_add_all(spine_array_constraint_data array, spine_array_constraint_data inValue); + +SPINE_C_API void spine_array_constraint_data_clear_and_add_all(spine_array_constraint_data array, spine_array_constraint_data inValue); + +SPINE_C_API void spine_array_constraint_data_remove_at(spine_array_constraint_data array, size_t inIndex); + +SPINE_C_API bool spine_array_constraint_data_contains(spine_array_constraint_data array, spine_constraint_data inValue); + +SPINE_C_API int spine_array_constraint_data_index_of(spine_array_constraint_data array, spine_constraint_data inValue); + +SPINE_C_API spine_constraint_data * spine_array_constraint_data_buffer(spine_array_constraint_data array); + +SPINE_C_API spine_array_event spine_array_event_create(void); + +SPINE_C_API spine_array_event spine_array_event_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_event_dispose(spine_array_event array); +SPINE_C_API void spine_array_event_clear(spine_array_event array); + +SPINE_C_API size_t spine_array_event_get_capacity(spine_array_event array); + +SPINE_C_API size_t spine_array_event_size(spine_array_event array); + +SPINE_C_API spine_array_event spine_array_event_set_size(spine_array_event array, size_t newSize, spine_event defaultValue); + +SPINE_C_API void spine_array_event_ensure_capacity(spine_array_event array, size_t newCapacity); + +SPINE_C_API void spine_array_event_add(spine_array_event array, spine_event inValue); + +SPINE_C_API void spine_array_event_add_all(spine_array_event array, spine_array_event inValue); + +SPINE_C_API void spine_array_event_clear_and_add_all(spine_array_event array, spine_array_event inValue); + +SPINE_C_API void spine_array_event_remove_at(spine_array_event array, size_t inIndex); + +SPINE_C_API bool spine_array_event_contains(spine_array_event array, spine_event inValue); + +SPINE_C_API int spine_array_event_index_of(spine_array_event array, spine_event inValue); + +SPINE_C_API spine_event * spine_array_event_buffer(spine_array_event array); + +SPINE_C_API spine_array_event_data spine_array_event_data_create(void); + +SPINE_C_API spine_array_event_data spine_array_event_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_event_data_dispose(spine_array_event_data array); +SPINE_C_API void spine_array_event_data_clear(spine_array_event_data array); + +SPINE_C_API size_t spine_array_event_data_get_capacity(spine_array_event_data array); + +SPINE_C_API size_t spine_array_event_data_size(spine_array_event_data array); + +SPINE_C_API spine_array_event_data spine_array_event_data_set_size(spine_array_event_data array, size_t newSize, spine_event_data defaultValue); + +SPINE_C_API void spine_array_event_data_ensure_capacity(spine_array_event_data array, size_t newCapacity); + +SPINE_C_API void spine_array_event_data_add(spine_array_event_data array, spine_event_data inValue); + +SPINE_C_API void spine_array_event_data_add_all(spine_array_event_data array, spine_array_event_data inValue); + +SPINE_C_API void spine_array_event_data_clear_and_add_all(spine_array_event_data array, spine_array_event_data inValue); + +SPINE_C_API void spine_array_event_data_remove_at(spine_array_event_data array, size_t inIndex); + +SPINE_C_API bool spine_array_event_data_contains(spine_array_event_data array, spine_event_data inValue); + +SPINE_C_API int spine_array_event_data_index_of(spine_array_event_data array, spine_event_data inValue); + +SPINE_C_API spine_event_data * spine_array_event_data_buffer(spine_array_event_data array); + +SPINE_C_API spine_array_from_property spine_array_from_property_create(void); + +SPINE_C_API spine_array_from_property spine_array_from_property_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_from_property_dispose(spine_array_from_property array); +SPINE_C_API void spine_array_from_property_clear(spine_array_from_property array); + +SPINE_C_API size_t spine_array_from_property_get_capacity(spine_array_from_property array); + +SPINE_C_API size_t spine_array_from_property_size(spine_array_from_property array); + +SPINE_C_API spine_array_from_property spine_array_from_property_set_size(spine_array_from_property array, size_t newSize, spine_from_property defaultValue); + +SPINE_C_API void spine_array_from_property_ensure_capacity(spine_array_from_property array, size_t newCapacity); + +SPINE_C_API void spine_array_from_property_add(spine_array_from_property array, spine_from_property inValue); + +SPINE_C_API void spine_array_from_property_add_all(spine_array_from_property array, spine_array_from_property inValue); + +SPINE_C_API void spine_array_from_property_clear_and_add_all(spine_array_from_property array, spine_array_from_property inValue); + +SPINE_C_API void spine_array_from_property_remove_at(spine_array_from_property array, size_t inIndex); + +SPINE_C_API bool spine_array_from_property_contains(spine_array_from_property array, spine_from_property inValue); + +SPINE_C_API int spine_array_from_property_index_of(spine_array_from_property array, spine_from_property inValue); + +SPINE_C_API spine_from_property * spine_array_from_property_buffer(spine_array_from_property array); + +SPINE_C_API spine_array_ik_constraint_data spine_array_ik_constraint_data_create(void); + +SPINE_C_API spine_array_ik_constraint_data spine_array_ik_constraint_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_ik_constraint_data_dispose(spine_array_ik_constraint_data array); +SPINE_C_API void spine_array_ik_constraint_data_clear(spine_array_ik_constraint_data array); + +SPINE_C_API size_t spine_array_ik_constraint_data_get_capacity(spine_array_ik_constraint_data array); + +SPINE_C_API size_t spine_array_ik_constraint_data_size(spine_array_ik_constraint_data array); + +SPINE_C_API spine_array_ik_constraint_data spine_array_ik_constraint_data_set_size(spine_array_ik_constraint_data array, size_t newSize, spine_ik_constraint_data defaultValue); + +SPINE_C_API void spine_array_ik_constraint_data_ensure_capacity(spine_array_ik_constraint_data array, size_t newCapacity); + +SPINE_C_API void spine_array_ik_constraint_data_add(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); + +SPINE_C_API void spine_array_ik_constraint_data_add_all(spine_array_ik_constraint_data array, spine_array_ik_constraint_data inValue); + +SPINE_C_API void spine_array_ik_constraint_data_clear_and_add_all(spine_array_ik_constraint_data array, spine_array_ik_constraint_data inValue); + +SPINE_C_API void spine_array_ik_constraint_data_remove_at(spine_array_ik_constraint_data array, size_t inIndex); + +SPINE_C_API bool spine_array_ik_constraint_data_contains(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); + +SPINE_C_API int spine_array_ik_constraint_data_index_of(spine_array_ik_constraint_data array, spine_ik_constraint_data inValue); + +SPINE_C_API spine_ik_constraint_data * spine_array_ik_constraint_data_buffer(spine_array_ik_constraint_data array); + +SPINE_C_API spine_array_path_constraint_data spine_array_path_constraint_data_create(void); + +SPINE_C_API spine_array_path_constraint_data spine_array_path_constraint_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_path_constraint_data_dispose(spine_array_path_constraint_data array); +SPINE_C_API void spine_array_path_constraint_data_clear(spine_array_path_constraint_data array); + +SPINE_C_API size_t spine_array_path_constraint_data_get_capacity(spine_array_path_constraint_data array); + +SPINE_C_API size_t spine_array_path_constraint_data_size(spine_array_path_constraint_data array); + +SPINE_C_API spine_array_path_constraint_data spine_array_path_constraint_data_set_size(spine_array_path_constraint_data array, size_t newSize, spine_path_constraint_data defaultValue); + +SPINE_C_API void spine_array_path_constraint_data_ensure_capacity(spine_array_path_constraint_data array, size_t newCapacity); + +SPINE_C_API void spine_array_path_constraint_data_add(spine_array_path_constraint_data array, spine_path_constraint_data inValue); + +SPINE_C_API void spine_array_path_constraint_data_add_all(spine_array_path_constraint_data array, spine_array_path_constraint_data inValue); + +SPINE_C_API void spine_array_path_constraint_data_clear_and_add_all(spine_array_path_constraint_data array, spine_array_path_constraint_data inValue); + +SPINE_C_API void spine_array_path_constraint_data_remove_at(spine_array_path_constraint_data array, size_t inIndex); + +SPINE_C_API bool spine_array_path_constraint_data_contains(spine_array_path_constraint_data array, spine_path_constraint_data inValue); + +SPINE_C_API int spine_array_path_constraint_data_index_of(spine_array_path_constraint_data array, spine_path_constraint_data inValue); + +SPINE_C_API spine_path_constraint_data * spine_array_path_constraint_data_buffer(spine_array_path_constraint_data array); + +SPINE_C_API spine_array_physics_constraint spine_array_physics_constraint_create(void); + +SPINE_C_API spine_array_physics_constraint spine_array_physics_constraint_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_physics_constraint_dispose(spine_array_physics_constraint array); +SPINE_C_API void spine_array_physics_constraint_clear(spine_array_physics_constraint array); + +SPINE_C_API size_t spine_array_physics_constraint_get_capacity(spine_array_physics_constraint array); + +SPINE_C_API size_t spine_array_physics_constraint_size(spine_array_physics_constraint array); + +SPINE_C_API spine_array_physics_constraint spine_array_physics_constraint_set_size(spine_array_physics_constraint array, size_t newSize, spine_physics_constraint defaultValue); + +SPINE_C_API void spine_array_physics_constraint_ensure_capacity(spine_array_physics_constraint array, size_t newCapacity); + +SPINE_C_API void spine_array_physics_constraint_add(spine_array_physics_constraint array, spine_physics_constraint inValue); + +SPINE_C_API void spine_array_physics_constraint_add_all(spine_array_physics_constraint array, spine_array_physics_constraint inValue); + +SPINE_C_API void spine_array_physics_constraint_clear_and_add_all(spine_array_physics_constraint array, spine_array_physics_constraint inValue); + +SPINE_C_API void spine_array_physics_constraint_remove_at(spine_array_physics_constraint array, size_t inIndex); + +SPINE_C_API bool spine_array_physics_constraint_contains(spine_array_physics_constraint array, spine_physics_constraint inValue); + +SPINE_C_API int spine_array_physics_constraint_index_of(spine_array_physics_constraint array, spine_physics_constraint inValue); + +SPINE_C_API spine_physics_constraint * spine_array_physics_constraint_buffer(spine_array_physics_constraint array); + +SPINE_C_API spine_array_physics_constraint_data spine_array_physics_constraint_data_create(void); + +SPINE_C_API spine_array_physics_constraint_data spine_array_physics_constraint_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_physics_constraint_data_dispose(spine_array_physics_constraint_data array); +SPINE_C_API void spine_array_physics_constraint_data_clear(spine_array_physics_constraint_data array); + +SPINE_C_API size_t spine_array_physics_constraint_data_get_capacity(spine_array_physics_constraint_data array); + +SPINE_C_API size_t spine_array_physics_constraint_data_size(spine_array_physics_constraint_data array); + +SPINE_C_API spine_array_physics_constraint_data spine_array_physics_constraint_data_set_size(spine_array_physics_constraint_data array, size_t newSize, spine_physics_constraint_data defaultValue); + +SPINE_C_API void spine_array_physics_constraint_data_ensure_capacity(spine_array_physics_constraint_data array, size_t newCapacity); + +SPINE_C_API void spine_array_physics_constraint_data_add(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); + +SPINE_C_API void spine_array_physics_constraint_data_add_all(spine_array_physics_constraint_data array, spine_array_physics_constraint_data inValue); + +SPINE_C_API void spine_array_physics_constraint_data_clear_and_add_all(spine_array_physics_constraint_data array, spine_array_physics_constraint_data inValue); + +SPINE_C_API void spine_array_physics_constraint_data_remove_at(spine_array_physics_constraint_data array, size_t inIndex); + +SPINE_C_API bool spine_array_physics_constraint_data_contains(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); + +SPINE_C_API int spine_array_physics_constraint_data_index_of(spine_array_physics_constraint_data array, spine_physics_constraint_data inValue); + +SPINE_C_API spine_physics_constraint_data * spine_array_physics_constraint_data_buffer(spine_array_physics_constraint_data array); + +SPINE_C_API spine_array_polygon spine_array_polygon_create(void); + +SPINE_C_API spine_array_polygon spine_array_polygon_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_polygon_dispose(spine_array_polygon array); +SPINE_C_API void spine_array_polygon_clear(spine_array_polygon array); + +SPINE_C_API size_t spine_array_polygon_get_capacity(spine_array_polygon array); + +SPINE_C_API size_t spine_array_polygon_size(spine_array_polygon array); + +SPINE_C_API spine_array_polygon spine_array_polygon_set_size(spine_array_polygon array, size_t newSize, spine_polygon defaultValue); + +SPINE_C_API void spine_array_polygon_ensure_capacity(spine_array_polygon array, size_t newCapacity); + +SPINE_C_API void spine_array_polygon_add(spine_array_polygon array, spine_polygon inValue); + +SPINE_C_API void spine_array_polygon_add_all(spine_array_polygon array, spine_array_polygon inValue); + +SPINE_C_API void spine_array_polygon_clear_and_add_all(spine_array_polygon array, spine_array_polygon inValue); + +SPINE_C_API void spine_array_polygon_remove_at(spine_array_polygon array, size_t inIndex); + +SPINE_C_API bool spine_array_polygon_contains(spine_array_polygon array, spine_polygon inValue); + +SPINE_C_API int spine_array_polygon_index_of(spine_array_polygon array, spine_polygon inValue); + +SPINE_C_API spine_polygon * spine_array_polygon_buffer(spine_array_polygon array); + +SPINE_C_API spine_array_skin spine_array_skin_create(void); + +SPINE_C_API spine_array_skin spine_array_skin_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_skin_dispose(spine_array_skin array); +SPINE_C_API void spine_array_skin_clear(spine_array_skin array); + +SPINE_C_API size_t spine_array_skin_get_capacity(spine_array_skin array); + +SPINE_C_API size_t spine_array_skin_size(spine_array_skin array); + +SPINE_C_API spine_array_skin spine_array_skin_set_size(spine_array_skin array, size_t newSize, spine_skin defaultValue); + +SPINE_C_API void spine_array_skin_ensure_capacity(spine_array_skin array, size_t newCapacity); + +SPINE_C_API void spine_array_skin_add(spine_array_skin array, spine_skin inValue); + +SPINE_C_API void spine_array_skin_add_all(spine_array_skin array, spine_array_skin inValue); + +SPINE_C_API void spine_array_skin_clear_and_add_all(spine_array_skin array, spine_array_skin inValue); + +SPINE_C_API void spine_array_skin_remove_at(spine_array_skin array, size_t inIndex); + +SPINE_C_API bool spine_array_skin_contains(spine_array_skin array, spine_skin inValue); + +SPINE_C_API int spine_array_skin_index_of(spine_array_skin array, spine_skin inValue); + +SPINE_C_API spine_skin * spine_array_skin_buffer(spine_array_skin array); + +SPINE_C_API spine_array_slot spine_array_slot_create(void); + +SPINE_C_API spine_array_slot spine_array_slot_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_slot_dispose(spine_array_slot array); +SPINE_C_API void spine_array_slot_clear(spine_array_slot array); + +SPINE_C_API size_t spine_array_slot_get_capacity(spine_array_slot array); + +SPINE_C_API size_t spine_array_slot_size(spine_array_slot array); + +SPINE_C_API spine_array_slot spine_array_slot_set_size(spine_array_slot array, size_t newSize, spine_slot defaultValue); + +SPINE_C_API void spine_array_slot_ensure_capacity(spine_array_slot array, size_t newCapacity); + +SPINE_C_API void spine_array_slot_add(spine_array_slot array, spine_slot inValue); + +SPINE_C_API void spine_array_slot_add_all(spine_array_slot array, spine_array_slot inValue); + +SPINE_C_API void spine_array_slot_clear_and_add_all(spine_array_slot array, spine_array_slot inValue); + +SPINE_C_API void spine_array_slot_remove_at(spine_array_slot array, size_t inIndex); + +SPINE_C_API bool spine_array_slot_contains(spine_array_slot array, spine_slot inValue); + +SPINE_C_API int spine_array_slot_index_of(spine_array_slot array, spine_slot inValue); + +SPINE_C_API spine_slot * spine_array_slot_buffer(spine_array_slot array); + +SPINE_C_API spine_array_slot_data spine_array_slot_data_create(void); + +SPINE_C_API spine_array_slot_data spine_array_slot_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_slot_data_dispose(spine_array_slot_data array); +SPINE_C_API void spine_array_slot_data_clear(spine_array_slot_data array); + +SPINE_C_API size_t spine_array_slot_data_get_capacity(spine_array_slot_data array); + +SPINE_C_API size_t spine_array_slot_data_size(spine_array_slot_data array); + +SPINE_C_API spine_array_slot_data spine_array_slot_data_set_size(spine_array_slot_data array, size_t newSize, spine_slot_data defaultValue); + +SPINE_C_API void spine_array_slot_data_ensure_capacity(spine_array_slot_data array, size_t newCapacity); + +SPINE_C_API void spine_array_slot_data_add(spine_array_slot_data array, spine_slot_data inValue); + +SPINE_C_API void spine_array_slot_data_add_all(spine_array_slot_data array, spine_array_slot_data inValue); + +SPINE_C_API void spine_array_slot_data_clear_and_add_all(spine_array_slot_data array, spine_array_slot_data inValue); + +SPINE_C_API void spine_array_slot_data_remove_at(spine_array_slot_data array, size_t inIndex); + +SPINE_C_API bool spine_array_slot_data_contains(spine_array_slot_data array, spine_slot_data inValue); + +SPINE_C_API int spine_array_slot_data_index_of(spine_array_slot_data array, spine_slot_data inValue); + +SPINE_C_API spine_slot_data * spine_array_slot_data_buffer(spine_array_slot_data array); + +SPINE_C_API spine_array_texture_region spine_array_texture_region_create(void); + +SPINE_C_API spine_array_texture_region spine_array_texture_region_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_texture_region_dispose(spine_array_texture_region array); +SPINE_C_API void spine_array_texture_region_clear(spine_array_texture_region array); + +SPINE_C_API size_t spine_array_texture_region_get_capacity(spine_array_texture_region array); + +SPINE_C_API size_t spine_array_texture_region_size(spine_array_texture_region array); + +SPINE_C_API spine_array_texture_region spine_array_texture_region_set_size(spine_array_texture_region array, size_t newSize, spine_texture_region defaultValue); + +SPINE_C_API void spine_array_texture_region_ensure_capacity(spine_array_texture_region array, size_t newCapacity); + +SPINE_C_API void spine_array_texture_region_add(spine_array_texture_region array, spine_texture_region inValue); + +SPINE_C_API void spine_array_texture_region_add_all(spine_array_texture_region array, spine_array_texture_region inValue); + +SPINE_C_API void spine_array_texture_region_clear_and_add_all(spine_array_texture_region array, spine_array_texture_region inValue); + +SPINE_C_API void spine_array_texture_region_remove_at(spine_array_texture_region array, size_t inIndex); + +SPINE_C_API bool spine_array_texture_region_contains(spine_array_texture_region array, spine_texture_region inValue); + +SPINE_C_API int spine_array_texture_region_index_of(spine_array_texture_region array, spine_texture_region inValue); + +SPINE_C_API spine_texture_region * spine_array_texture_region_buffer(spine_array_texture_region array); + +SPINE_C_API spine_array_timeline spine_array_timeline_create(void); + +SPINE_C_API spine_array_timeline spine_array_timeline_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_timeline_dispose(spine_array_timeline array); +SPINE_C_API void spine_array_timeline_clear(spine_array_timeline array); + +SPINE_C_API size_t spine_array_timeline_get_capacity(spine_array_timeline array); + +SPINE_C_API size_t spine_array_timeline_size(spine_array_timeline array); + +SPINE_C_API spine_array_timeline spine_array_timeline_set_size(spine_array_timeline array, size_t newSize, spine_timeline defaultValue); + +SPINE_C_API void spine_array_timeline_ensure_capacity(spine_array_timeline array, size_t newCapacity); + +SPINE_C_API void spine_array_timeline_add(spine_array_timeline array, spine_timeline inValue); + +SPINE_C_API void spine_array_timeline_add_all(spine_array_timeline array, spine_array_timeline inValue); + +SPINE_C_API void spine_array_timeline_clear_and_add_all(spine_array_timeline array, spine_array_timeline inValue); + +SPINE_C_API void spine_array_timeline_remove_at(spine_array_timeline array, size_t inIndex); + +SPINE_C_API bool spine_array_timeline_contains(spine_array_timeline array, spine_timeline inValue); + +SPINE_C_API int spine_array_timeline_index_of(spine_array_timeline array, spine_timeline inValue); + +SPINE_C_API spine_timeline * spine_array_timeline_buffer(spine_array_timeline array); + +SPINE_C_API spine_array_to_property spine_array_to_property_create(void); + +SPINE_C_API spine_array_to_property spine_array_to_property_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_to_property_dispose(spine_array_to_property array); +SPINE_C_API void spine_array_to_property_clear(spine_array_to_property array); + +SPINE_C_API size_t spine_array_to_property_get_capacity(spine_array_to_property array); + +SPINE_C_API size_t spine_array_to_property_size(spine_array_to_property array); + +SPINE_C_API spine_array_to_property spine_array_to_property_set_size(spine_array_to_property array, size_t newSize, spine_to_property defaultValue); + +SPINE_C_API void spine_array_to_property_ensure_capacity(spine_array_to_property array, size_t newCapacity); + +SPINE_C_API void spine_array_to_property_add(spine_array_to_property array, spine_to_property inValue); + +SPINE_C_API void spine_array_to_property_add_all(spine_array_to_property array, spine_array_to_property inValue); + +SPINE_C_API void spine_array_to_property_clear_and_add_all(spine_array_to_property array, spine_array_to_property inValue); + +SPINE_C_API void spine_array_to_property_remove_at(spine_array_to_property array, size_t inIndex); + +SPINE_C_API bool spine_array_to_property_contains(spine_array_to_property array, spine_to_property inValue); + +SPINE_C_API int spine_array_to_property_index_of(spine_array_to_property array, spine_to_property inValue); + +SPINE_C_API spine_to_property * spine_array_to_property_buffer(spine_array_to_property array); + +SPINE_C_API spine_array_track_entry spine_array_track_entry_create(void); + +SPINE_C_API spine_array_track_entry spine_array_track_entry_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_track_entry_dispose(spine_array_track_entry array); +SPINE_C_API void spine_array_track_entry_clear(spine_array_track_entry array); + +SPINE_C_API size_t spine_array_track_entry_get_capacity(spine_array_track_entry array); + +SPINE_C_API size_t spine_array_track_entry_size(spine_array_track_entry array); + +SPINE_C_API spine_array_track_entry spine_array_track_entry_set_size(spine_array_track_entry array, size_t newSize, spine_track_entry defaultValue); + +SPINE_C_API void spine_array_track_entry_ensure_capacity(spine_array_track_entry array, size_t newCapacity); + +SPINE_C_API void spine_array_track_entry_add(spine_array_track_entry array, spine_track_entry inValue); + +SPINE_C_API void spine_array_track_entry_add_all(spine_array_track_entry array, spine_array_track_entry inValue); + +SPINE_C_API void spine_array_track_entry_clear_and_add_all(spine_array_track_entry array, spine_array_track_entry inValue); + +SPINE_C_API void spine_array_track_entry_remove_at(spine_array_track_entry array, size_t inIndex); + +SPINE_C_API bool spine_array_track_entry_contains(spine_array_track_entry array, spine_track_entry inValue); + +SPINE_C_API int spine_array_track_entry_index_of(spine_array_track_entry array, spine_track_entry inValue); + +SPINE_C_API spine_track_entry * spine_array_track_entry_buffer(spine_array_track_entry array); + +SPINE_C_API spine_array_transform_constraint_data spine_array_transform_constraint_data_create(void); + +SPINE_C_API spine_array_transform_constraint_data spine_array_transform_constraint_data_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_transform_constraint_data_dispose(spine_array_transform_constraint_data array); +SPINE_C_API void spine_array_transform_constraint_data_clear(spine_array_transform_constraint_data array); + +SPINE_C_API size_t spine_array_transform_constraint_data_get_capacity(spine_array_transform_constraint_data array); + +SPINE_C_API size_t spine_array_transform_constraint_data_size(spine_array_transform_constraint_data array); + +SPINE_C_API spine_array_transform_constraint_data spine_array_transform_constraint_data_set_size(spine_array_transform_constraint_data array, size_t newSize, spine_transform_constraint_data defaultValue); + +SPINE_C_API void spine_array_transform_constraint_data_ensure_capacity(spine_array_transform_constraint_data array, size_t newCapacity); + +SPINE_C_API void spine_array_transform_constraint_data_add(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); + +SPINE_C_API void spine_array_transform_constraint_data_add_all(spine_array_transform_constraint_data array, spine_array_transform_constraint_data inValue); + +SPINE_C_API void spine_array_transform_constraint_data_clear_and_add_all(spine_array_transform_constraint_data array, spine_array_transform_constraint_data inValue); + +SPINE_C_API void spine_array_transform_constraint_data_remove_at(spine_array_transform_constraint_data array, size_t inIndex); + +SPINE_C_API bool spine_array_transform_constraint_data_contains(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); + +SPINE_C_API int spine_array_transform_constraint_data_index_of(spine_array_transform_constraint_data array, spine_transform_constraint_data inValue); + +SPINE_C_API spine_transform_constraint_data * spine_array_transform_constraint_data_buffer(spine_array_transform_constraint_data array); + +SPINE_C_API spine_array_update spine_array_update_create(void); + +SPINE_C_API spine_array_update spine_array_update_create_with_capacity(size_t initialCapacity); +SPINE_C_API void spine_array_update_dispose(spine_array_update array); +SPINE_C_API void spine_array_update_clear(spine_array_update array); + +SPINE_C_API size_t spine_array_update_get_capacity(spine_array_update array); + +SPINE_C_API size_t spine_array_update_size(spine_array_update array); + +SPINE_C_API spine_array_update spine_array_update_set_size(spine_array_update array, size_t newSize, spine_update defaultValue); + +SPINE_C_API void spine_array_update_ensure_capacity(spine_array_update array, size_t newCapacity); + +SPINE_C_API void spine_array_update_add(spine_array_update array, spine_update inValue); + +SPINE_C_API void spine_array_update_add_all(spine_array_update array, spine_array_update inValue); + +SPINE_C_API void spine_array_update_clear_and_add_all(spine_array_update array, spine_array_update inValue); + +SPINE_C_API void spine_array_update_remove_at(spine_array_update array, size_t inIndex); + +SPINE_C_API bool spine_array_update_contains(spine_array_update array, spine_update inValue); + +SPINE_C_API int spine_array_update_index_of(spine_array_update array, spine_update inValue); + +SPINE_C_API spine_update * spine_array_update_buffer(spine_array_update array); #ifdef __cplusplus } #endif -#endif // SPINE_C_ARRAYS_H \ No newline at end of file +#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 15a5aaf02..b58663174 100644 --- a/spine-c-new/src/generated/atlas.cpp +++ b/spine-c-new/src/generated/atlas.cpp @@ -1,84 +1,24 @@ -/****************************************************************************** - * 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 "atlas.h" #include using namespace spine; -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; +void spine_atlas_dispose(spine_atlas self) { + delete (Atlas*)self; } -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; +void spine_atlas_flip_v(spine_atlas self) { + ((Atlas*)self)->flipV(); } -void spine_atlas_dispose(spine_atlas obj) { - if (!obj) return; - delete (Atlas *) obj; +spine_atlas_region spine_atlas_find_region(spine_atlas self, const char* name) { + return (spine_atlas_region)((Atlas*)self)->findRegion(*((const String*)name)); } -void spine_atlas_flip_v(spine_atlas obj) { - if (!obj) return ; - Atlas *_obj = (Atlas *) obj; - _obj->flipV(); +spine_array_atlas_page spine_atlas_get_pages(spine_atlas self) { + return (spine_array_atlas_page)&((Atlas*)self)->getPages(); } -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)); -} - -int32_t spine_atlas_get_num_pages(spine_atlas obj) { - if (!obj) return 0; - Atlas *_obj = (Atlas *) obj; - return (int32_t) _obj->getPages().size(); -} - -spine_atlas_page *spine_atlas_get_pages(spine_atlas obj) { - if (!obj) return nullptr; - Atlas *_obj = (Atlas *) obj; - return (spine_atlas_page *) _obj->getPages().buffer(); -} - -int32_t spine_atlas_get_num_regions(spine_atlas obj) { - if (!obj) return 0; - Atlas *_obj = (Atlas *) obj; - return (int32_t) _obj->getRegions().size(); -} - -spine_atlas_region *spine_atlas_get_regions(spine_atlas obj) { - if (!obj) return nullptr; - Atlas *_obj = (Atlas *) obj; - return (spine_atlas_region *) _obj->getRegions().buffer(); +spine_array_atlas_region spine_atlas_get_regions(spine_atlas self) { + return (spine_array_atlas_region)&((Atlas*)self)->getRegions(); } diff --git a/spine-c-new/src/generated/atlas.h b/spine-c-new/src/generated/atlas.h index 2a692abd5..9da000e5f 100644 --- a/spine-c-new/src/generated/atlas.h +++ b/spine-c-new/src/generated/atlas.h @@ -1,54 +1,22 @@ -/****************************************************************************** - * 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_SPINE_ATLAS_H +#define SPINE_SPINE_ATLAS_H -#ifndef SPINE_C_ATLAS_H -#define SPINE_C_ATLAS_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" -#include "../extensions.h" +SPINE_C_API void spine_atlas_dispose(spine_atlas self); -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 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 int32_t spine_atlas_get_num_regions(spine_atlas obj); -SPINE_C_EXPORT spine_atlas_region *spine_atlas_get_regions(spine_atlas obj); +SPINE_C_API void spine_atlas_flip_v(spine_atlas self); +SPINE_C_API spine_atlas_region spine_atlas_find_region(spine_atlas self, const char* name); +SPINE_C_API spine_array_atlas_page spine_atlas_get_pages(spine_atlas self); +SPINE_C_API spine_array_atlas_region spine_atlas_get_regions(spine_atlas self); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATLAS_H \ No newline at end of file +#endif /* SPINE_SPINE_ATLAS_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/atlas_attachment_loader.cpp b/spine-c-new/src/generated/atlas_attachment_loader.cpp index a58704034..8658ad38b 100644 --- a/spine-c-new/src/generated/atlas_attachment_loader.cpp +++ b/spine-c-new/src/generated/atlas_attachment_loader.cpp @@ -1,85 +1,40 @@ -/****************************************************************************** - * 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 "atlas_attachment_loader.h" #include using namespace spine; spine_atlas_attachment_loader spine_atlas_attachment_loader_create(spine_atlas atlas) { - AtlasAttachmentLoader *obj = new (__FILE__, __LINE__) AtlasAttachmentLoader((Atlas *) atlas); - return (spine_atlas_attachment_loader) obj; + return (spine_atlas_attachment_loader) new (__FILE__, __LINE__) AtlasAttachmentLoader((Atlas *)atlas); } -void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader obj) { - if (!obj) return; - delete (AtlasAttachmentLoader *) obj; +void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader self) { + delete (AtlasAttachmentLoader*)self; } -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*) skin, String(name), String(path), (Sequence *) sequence); +spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + return (spine_region_attachment)((AtlasAttachmentLoader*)self)->newRegionAttachment(*((Skin*)skin), *((const String*)name), *((const String*)path), (Sequence *)sequence); } -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*) skin, String(name), String(path), (Sequence *) sequence); +spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + return (spine_mesh_attachment)((AtlasAttachmentLoader*)self)->newMeshAttachment(*((Skin*)skin), *((const String*)name), *((const 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 char* name) { - if (!obj) return (spine_bounding_box_attachment) 0; - AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj; - return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(*(Skin*) skin, String(name)); +spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name) { + return (spine_bounding_box_attachment)((AtlasAttachmentLoader*)self)->newBoundingBoxAttachment(*((Skin*)skin), *((const String*)name)); } -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*) skin, String(name)); +spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name) { + return (spine_path_attachment)((AtlasAttachmentLoader*)self)->newPathAttachment(*((Skin*)skin), *((const String*)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*) skin, String(name)); +spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name) { + return (spine_point_attachment)((AtlasAttachmentLoader*)self)->newPointAttachment(*((Skin*)skin), *((const String*)name)); } -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*) skin, String(name)); +spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name) { + return (spine_clipping_attachment)((AtlasAttachmentLoader*)self)->newClippingAttachment(*((Skin*)skin), *((const String*)name)); } -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)); +spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader self, const char* name) { + return (spine_atlas_region)((AtlasAttachmentLoader*)self)->findRegion(*((const 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 7cc30ea9b..df5ae2108 100644 --- a/spine-c-new/src/generated/atlas_attachment_loader.h +++ b/spine-c-new/src/generated/atlas_attachment_loader.h @@ -1,53 +1,27 @@ -/****************************************************************************** - * 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_SPINE_ATLAS_ATTACHMENT_LOADER_H +#define SPINE_SPINE_ATLAS_ATTACHMENT_LOADER_H -#ifndef SPINE_C_ATLASATTACHMENTLOADER_H -#define SPINE_C_ATLASATTACHMENTLOADER_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_atlas_attachment_loader spine_atlas_attachment_loader_create(spine_atlas atlas); -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 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); +SPINE_C_API void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader self); + +SPINE_C_API spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_API spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_API spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader self, const char* name); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATLASATTACHMENTLOADER_H \ No newline at end of file +#endif /* SPINE_SPINE_ATLAS_ATTACHMENT_LOADER_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/atlas_page.cpp b/spine-c-new/src/generated/atlas_page.cpp index e57825a1e..78eb7c77a 100644 --- a/spine-c-new/src/generated/atlas_page.cpp +++ b/spine-c-new/src/generated/atlas_page.cpp @@ -1,43 +1,108 @@ -/****************************************************************************** - * 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 "atlas_page.h" #include using namespace spine; spine_atlas_page spine_atlas_page_create(const char* inName) { - AtlasPage *obj = new (__FILE__, __LINE__) AtlasPage(String(inName)); - return (spine_atlas_page) obj; + return (spine_atlas_page) new (__FILE__, __LINE__) AtlasPage(*((const String*)inName)); } -void spine_atlas_page_dispose(spine_atlas_page obj) { - if (!obj) return; - delete (AtlasPage *) obj; +void spine_atlas_page_dispose(spine_atlas_page self) { + delete (AtlasPage*)self; +} + +const char* spine_atlas_page_get_name(spine_atlas_page self) { + return ((AtlasPage*)self)->name.buffer(); +} + +void spine_atlas_page_set_name(spine_atlas_page self, const char* value) { + ((AtlasPage*)self)->name = String(value); +} + +const char* spine_atlas_page_get_texture_path(spine_atlas_page self) { + return ((AtlasPage*)self)->texturePath.buffer(); +} + +void spine_atlas_page_set_texture_path(spine_atlas_page self, const char* value) { + ((AtlasPage*)self)->texturePath = String(value); +} + +spine_format spine_atlas_page_get_format(spine_atlas_page self) { + return (spine_format)((AtlasPage*)self)->format; +} + +void spine_atlas_page_set_format(spine_atlas_page self, spine_format value) { + ((AtlasPage*)self)->format = (Format)value; +} + +spine_texture_filter spine_atlas_page_get_min_filter(spine_atlas_page self) { + return (spine_texture_filter)((AtlasPage*)self)->minFilter; +} + +void spine_atlas_page_set_min_filter(spine_atlas_page self, spine_texture_filter value) { + ((AtlasPage*)self)->minFilter = (TextureFilter)value; +} + +spine_texture_filter spine_atlas_page_get_mag_filter(spine_atlas_page self) { + return (spine_texture_filter)((AtlasPage*)self)->magFilter; +} + +void spine_atlas_page_set_mag_filter(spine_atlas_page self, spine_texture_filter value) { + ((AtlasPage*)self)->magFilter = (TextureFilter)value; +} + +spine_texture_wrap spine_atlas_page_get_u_wrap(spine_atlas_page self) { + return (spine_texture_wrap)((AtlasPage*)self)->uWrap; +} + +void spine_atlas_page_set_u_wrap(spine_atlas_page self, spine_texture_wrap value) { + ((AtlasPage*)self)->uWrap = (TextureWrap)value; +} + +spine_texture_wrap spine_atlas_page_get_v_wrap(spine_atlas_page self) { + return (spine_texture_wrap)((AtlasPage*)self)->vWrap; +} + +void spine_atlas_page_set_v_wrap(spine_atlas_page self, spine_texture_wrap value) { + ((AtlasPage*)self)->vWrap = (TextureWrap)value; +} + +int spine_atlas_page_get_width(spine_atlas_page self) { + return ((AtlasPage*)self)->width; +} + +void spine_atlas_page_set_width(spine_atlas_page self, int value) { + ((AtlasPage*)self)->width = value; +} + +int spine_atlas_page_get_height(spine_atlas_page self) { + return ((AtlasPage*)self)->height; +} + +void spine_atlas_page_set_height(spine_atlas_page self, int value) { + ((AtlasPage*)self)->height = value; +} + +bool spine_atlas_page_get_pma(spine_atlas_page self) { + return ((AtlasPage*)self)->pma; +} + +void spine_atlas_page_set_pma(spine_atlas_page self, bool value) { + ((AtlasPage*)self)->pma = value; +} + +int spine_atlas_page_get_index(spine_atlas_page self) { + return ((AtlasPage*)self)->index; +} + +void spine_atlas_page_set_index(spine_atlas_page self, int value) { + ((AtlasPage*)self)->index = value; +} + +void * spine_atlas_page_get_texture(spine_atlas_page self) { + return ((AtlasPage*)self)->texture; +} + +void spine_atlas_page_set_texture(spine_atlas_page self, void * value) { + ((AtlasPage*)self)->texture = (void*)value; } diff --git a/spine-c-new/src/generated/atlas_page.h b/spine-c-new/src/generated/atlas_page.h index 3de455b47..e960c3f88 100644 --- a/spine-c-new/src/generated/atlas_page.h +++ b/spine-c-new/src/generated/atlas_page.h @@ -1,46 +1,44 @@ -/****************************************************************************** - * 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_SPINE_ATLAS_PAGE_H +#define SPINE_SPINE_ATLAS_PAGE_H -#ifndef SPINE_C_ATLASPAGE_H -#define SPINE_C_ATLASPAGE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_atlas_page spine_atlas_page_create(const char* 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); +SPINE_C_API void spine_atlas_page_dispose(spine_atlas_page self); + +SPINE_C_API const char* spine_atlas_page_get_name(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_name(spine_atlas_page self, const char* value); +SPINE_C_API const char* spine_atlas_page_get_texture_path(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_texture_path(spine_atlas_page self, const char* value); +SPINE_C_API spine_format spine_atlas_page_get_format(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_format(spine_atlas_page self, spine_format value); +SPINE_C_API spine_texture_filter spine_atlas_page_get_min_filter(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_min_filter(spine_atlas_page self, spine_texture_filter value); +SPINE_C_API spine_texture_filter spine_atlas_page_get_mag_filter(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_mag_filter(spine_atlas_page self, spine_texture_filter value); +SPINE_C_API spine_texture_wrap spine_atlas_page_get_u_wrap(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_u_wrap(spine_atlas_page self, spine_texture_wrap value); +SPINE_C_API spine_texture_wrap spine_atlas_page_get_v_wrap(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_v_wrap(spine_atlas_page self, spine_texture_wrap value); +SPINE_C_API int spine_atlas_page_get_width(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_width(spine_atlas_page self, int value); +SPINE_C_API int spine_atlas_page_get_height(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_height(spine_atlas_page self, int value); +SPINE_C_API bool spine_atlas_page_get_pma(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_pma(spine_atlas_page self, bool value); +SPINE_C_API int spine_atlas_page_get_index(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_index(spine_atlas_page self, int value); +SPINE_C_API void * spine_atlas_page_get_texture(spine_atlas_page self); +SPINE_C_API void spine_atlas_page_set_texture(spine_atlas_page self, void * value); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATLASPAGE_H \ No newline at end of file +#endif /* SPINE_SPINE_ATLAS_PAGE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/atlas_region.cpp b/spine-c-new/src/generated/atlas_region.cpp index 34f6f9faa..4dd0c5cce 100644 --- a/spine-c-new/src/generated/atlas_region.cpp +++ b/spine-c-new/src/generated/atlas_region.cpp @@ -1,38 +1,76 @@ -/****************************************************************************** - * 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 "atlas_region.h" #include using namespace spine; -void spine_atlas_region_dispose(spine_atlas_region obj) { - if (!obj) return; - delete (AtlasRegion *) obj; +spine_atlas_region spine_atlas_region_create(void) { + return (spine_atlas_region) new (__FILE__, __LINE__) AtlasRegion(); +} + +void spine_atlas_region_dispose(spine_atlas_region self) { + delete (AtlasRegion*)self; +} + +spine_atlas_page spine_atlas_region_get_page(spine_atlas_region self) { + return (spine_atlas_page)((AtlasRegion*)self)->page; +} + +void spine_atlas_region_set_page(spine_atlas_region self, spine_atlas_page value) { + ((AtlasRegion*)self)->page = (AtlasPage*)value; +} + +const char* spine_atlas_region_get_name(spine_atlas_region self) { + return ((AtlasRegion*)self)->name.buffer(); +} + +void spine_atlas_region_set_name(spine_atlas_region self, const char* value) { + ((AtlasRegion*)self)->name = String(value); +} + +int spine_atlas_region_get_index(spine_atlas_region self) { + return ((AtlasRegion*)self)->index; +} + +void spine_atlas_region_set_index(spine_atlas_region self, int value) { + ((AtlasRegion*)self)->index = value; +} + +int spine_atlas_region_get_x(spine_atlas_region self) { + return ((AtlasRegion*)self)->x; +} + +void spine_atlas_region_set_x(spine_atlas_region self, int value) { + ((AtlasRegion*)self)->x = value; +} + +int spine_atlas_region_get_y(spine_atlas_region self) { + return ((AtlasRegion*)self)->y; +} + +void spine_atlas_region_set_y(spine_atlas_region self, int value) { + ((AtlasRegion*)self)->y = value; +} + +spine_array_int spine_atlas_region_get_splits(spine_atlas_region self) { + return (spine_array_int)&((AtlasRegion*)self)->splits; +} + +void spine_atlas_region_set_splits(spine_atlas_region self, spine_array_int value) { + ((AtlasRegion*)self)->splits = *((Array*)value); +} + +spine_array_int spine_atlas_region_get_pads(spine_atlas_region self) { + return (spine_array_int)&((AtlasRegion*)self)->pads; +} + +void spine_atlas_region_set_pads(spine_atlas_region self, spine_array_int value) { + ((AtlasRegion*)self)->pads = *((Array*)value); +} + +spine_array_float spine_atlas_region_get_values(spine_atlas_region self) { + return (spine_array_float)&((AtlasRegion*)self)->values; +} + +void spine_atlas_region_set_values(spine_atlas_region self, spine_array_float value) { + ((AtlasRegion*)self)->values = *((Array*)value); } diff --git a/spine-c-new/src/generated/atlas_region.h b/spine-c-new/src/generated/atlas_region.h index 476707d84..b5491d607 100644 --- a/spine-c-new/src/generated/atlas_region.h +++ b/spine-c-new/src/generated/atlas_region.h @@ -1,45 +1,36 @@ -/****************************************************************************** - * 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_SPINE_ATLAS_REGION_H +#define SPINE_SPINE_ATLAS_REGION_H -#ifndef SPINE_C_ATLASREGION_H -#define SPINE_C_ATLASREGION_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_atlas_region spine_atlas_region_create(void); -SPINE_C_EXPORT void spine_atlas_region_dispose(spine_atlas_region obj); +SPINE_C_API void spine_atlas_region_dispose(spine_atlas_region self); + +SPINE_C_API spine_atlas_page spine_atlas_region_get_page(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_page(spine_atlas_region self, spine_atlas_page value); +SPINE_C_API const char* spine_atlas_region_get_name(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_name(spine_atlas_region self, const char* value); +SPINE_C_API int spine_atlas_region_get_index(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_index(spine_atlas_region self, int value); +SPINE_C_API int spine_atlas_region_get_x(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_x(spine_atlas_region self, int value); +SPINE_C_API int spine_atlas_region_get_y(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_y(spine_atlas_region self, int value); +SPINE_C_API spine_array_int spine_atlas_region_get_splits(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_splits(spine_atlas_region self, spine_array_int value); +SPINE_C_API spine_array_int spine_atlas_region_get_pads(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_pads(spine_atlas_region self, spine_array_int value); +SPINE_C_API spine_array_float spine_atlas_region_get_values(spine_atlas_region self); +SPINE_C_API void spine_atlas_region_set_values(spine_atlas_region self, spine_array_float value); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATLASREGION_H \ No newline at end of file +#endif /* SPINE_SPINE_ATLAS_REGION_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/attachment.cpp b/spine-c-new/src/generated/attachment.cpp index 25a594d60..24b74e217 100644 --- a/spine-c-new/src/generated/attachment.cpp +++ b/spine-c-new/src/generated/attachment.cpp @@ -1,72 +1,36 @@ -/****************************************************************************** - * 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 "attachment.h" #include using namespace spine; -void spine_attachment_dispose(spine_attachment obj) { - if (!obj) return; - delete (Attachment *) obj; +void spine_attachment_dispose(spine_attachment self) { + delete (Attachment*)self; } -spine_rtti spine_attachment_get_rtti() { - return (spine_rtti) &Attachment::rtti; +spine_rtti spine_attachment_get_rtti(spine_attachment self) { + return (spine_rtti)&((Attachment*)self)->getRTTI(); } -const char* spine_attachment_get_name(spine_attachment obj) { - if (!obj) return nullptr; - Attachment *_obj = (Attachment *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_attachment_get_name(spine_attachment self) { + return (const char*)&((Attachment*)self)->getName(); } -spine_attachment spine_attachment_copy(spine_attachment obj) { - if (!obj) return (spine_attachment) 0; - Attachment *_obj = (Attachment *) obj; - return (spine_attachment) _obj->copy(); +spine_attachment spine_attachment_copy(spine_attachment self) { + return (spine_attachment)((Attachment*)self)->copy(); } -int spine_attachment_get_ref_count(spine_attachment obj) { - if (!obj) return 0; - Attachment *_obj = (Attachment *) obj; - return _obj->getRefCount(); +int spine_attachment_get_ref_count(spine_attachment self) { + return ((Attachment*)self)->getRefCount(); } -void spine_attachment_reference(spine_attachment obj) { - if (!obj) return ; - Attachment *_obj = (Attachment *) obj; - _obj->reference(); +void spine_attachment_reference(spine_attachment self) { + ((Attachment*)self)->reference(); } -void spine_attachment_dereference(spine_attachment obj) { - if (!obj) return ; - Attachment *_obj = (Attachment *) obj; - _obj->dereference(); +void spine_attachment_dereference(spine_attachment self) { + ((Attachment*)self)->dereference(); +} + +spine_rtti spine_attachment_rtti(void) { + return (spine_rtti)&Attachment::rtti; } diff --git a/spine-c-new/src/generated/attachment.h b/spine-c-new/src/generated/attachment.h index 5d01a440d..7bc464ae7 100644 --- a/spine-c-new/src/generated/attachment.h +++ b/spine-c-new/src/generated/attachment.h @@ -1,51 +1,25 @@ -/****************************************************************************** - * 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_SPINE_ATTACHMENT_H +#define SPINE_SPINE_ATTACHMENT_H -#ifndef SPINE_C_ATTACHMENT_H -#define SPINE_C_ATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_attachment_dispose(spine_attachment self); -SPINE_C_EXPORT void spine_attachment_dispose(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 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); +SPINE_C_API spine_rtti spine_attachment_get_rtti(spine_attachment self); +SPINE_C_API const char* spine_attachment_get_name(spine_attachment self); +SPINE_C_API spine_attachment spine_attachment_copy(spine_attachment self); +SPINE_C_API int spine_attachment_get_ref_count(spine_attachment self); +SPINE_C_API void spine_attachment_reference(spine_attachment self); +SPINE_C_API void spine_attachment_dereference(spine_attachment self); +SPINE_C_API spine_rtti spine_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/attachment_loader.cpp b/spine-c-new/src/generated/attachment_loader.cpp index 5fe91dc53..eb5994757 100644 --- a/spine-c-new/src/generated/attachment_loader.cpp +++ b/spine-c-new/src/generated/attachment_loader.cpp @@ -1,74 +1,32 @@ -/****************************************************************************** - * 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 "attachment_loader.h" #include using namespace spine; -void spine_attachment_loader_dispose(spine_attachment_loader obj) { - if (!obj) return; - delete (AttachmentLoader *) obj; +void spine_attachment_loader_dispose(spine_attachment_loader self) { + delete (AttachmentLoader*)self; } -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*) skin, String(name), String(path), (Sequence *) sequence); +spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + return (spine_region_attachment)((AttachmentLoader*)self)->newRegionAttachment(*((Skin*)skin), *((const String*)name), *((const String*)path), (Sequence *)sequence); } -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*) skin, String(name), String(path), (Sequence *) sequence); +spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence) { + return (spine_mesh_attachment)((AttachmentLoader*)self)->newMeshAttachment(*((Skin*)skin), *((const String*)name), *((const String*)path), (Sequence *)sequence); } -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*) skin, String(name)); +spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader self, spine_skin skin, const char* name) { + return (spine_bounding_box_attachment)((AttachmentLoader*)self)->newBoundingBoxAttachment(*((Skin*)skin), *((const String*)name)); } -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*) skin, String(name)); +spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader self, spine_skin skin, const char* name) { + return (spine_path_attachment)((AttachmentLoader*)self)->newPathAttachment(*((Skin*)skin), *((const String*)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*) skin, String(name)); +spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader self, spine_skin skin, const char* name) { + return (spine_point_attachment)((AttachmentLoader*)self)->newPointAttachment(*((Skin*)skin), *((const String*)name)); } -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*) skin, String(name)); +spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader self, spine_skin skin, const char* name) { + return (spine_clipping_attachment)((AttachmentLoader*)self)->newClippingAttachment(*((Skin*)skin), *((const String*)name)); } diff --git a/spine-c-new/src/generated/attachment_loader.h b/spine-c-new/src/generated/attachment_loader.h index 5dcfe76ed..24eecaf4c 100644 --- a/spine-c-new/src/generated/attachment_loader.h +++ b/spine-c-new/src/generated/attachment_loader.h @@ -1,51 +1,24 @@ -/****************************************************************************** - * 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_SPINE_ATTACHMENT_LOADER_H +#define SPINE_SPINE_ATTACHMENT_LOADER_H -#ifndef SPINE_C_ATTACHMENTLOADER_H -#define SPINE_C_ATTACHMENTLOADER_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_attachment_loader_dispose(spine_attachment_loader self); -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 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); +SPINE_C_API spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_API spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader self, spine_skin skin, const char* name, const char* path, spine_sequence sequence); +SPINE_C_API spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader self, spine_skin skin, const char* name); +SPINE_C_API spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader self, spine_skin skin, const char* name); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATTACHMENTLOADER_H \ No newline at end of file +#endif /* SPINE_SPINE_ATTACHMENT_LOADER_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/attachment_timeline.cpp b/spine-c-new/src/generated/attachment_timeline.cpp index f90b5a894..acdb6c325 100644 --- a/spine-c-new/src/generated/attachment_timeline.cpp +++ b/spine-c-new/src/generated/attachment_timeline.cpp @@ -1,125 +1,56 @@ -/****************************************************************************** - * 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 "attachment_timeline.h" #include using namespace spine; 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; + return (spine_attachment_timeline) new (__FILE__, __LINE__) AttachmentTimeline(frameCount, slotIndex); } -void spine_attachment_timeline_dispose(spine_attachment_timeline obj) { - if (!obj) return; - delete (AttachmentTimeline *) obj; +void spine_attachment_timeline_dispose(spine_attachment_timeline self) { + delete (AttachmentTimeline*)self; } -spine_rtti spine_attachment_timeline_get_rtti() { - return (spine_rtti) &AttachmentTimeline::rtti; +spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline self) { + return (spine_rtti)&((AttachmentTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_attachment_timeline_apply(spine_attachment_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((AttachmentTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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_set_frame(spine_attachment_timeline self, int frame, float time, const char* attachmentName) { + ((AttachmentTimeline*)self)->setFrame(frame, time, *((const String*)attachmentName)); } -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(); +size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline self) { + return ((Timeline*)(AttachmentTimeline*)self)->getFrameEntries(); } -const char * *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (const char * *) _obj->getAttachmentNames().buffer(); +size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline self) { + return ((Timeline*)(AttachmentTimeline*)self)->getFrameCount(); } -size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj) { - if (!obj) return 0; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getFrameEntries(); +spine_array_float spine_attachment_timeline_get_frames(spine_attachment_timeline self) { + return (spine_array_float)&((Timeline*)(AttachmentTimeline*)self)->getFrames(); } -size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj) { - if (!obj) return 0; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getFrameCount(); +float spine_attachment_timeline_get_duration(spine_attachment_timeline self) { + return ((Timeline*)(AttachmentTimeline*)self)->getDuration(); } -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_array_property_id spine_attachment_timeline_get_property_ids(spine_attachment_timeline self) { + return (spine_array_property_id)&((Timeline*)(AttachmentTimeline*)self)->getPropertyIds(); } -float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +int spine_attachment_timeline_get_slot_index(spine_attachment_timeline self) { + return ((SlotTimeline*)(AttachmentTimeline*)self)->getSlotIndex(); } -float spine_attachment_timeline_get_duration(spine_attachment_timeline obj) { - if (!obj) return 0; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return _obj->getDuration(); +void spine_attachment_timeline_set_slot_index(spine_attachment_timeline self, int inValue) { + ((SlotTimeline*)(AttachmentTimeline*)self)->setSlotIndex(inValue); } -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(); -} - -int64_t *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) { - if (!obj) return nullptr; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - AttachmentTimeline *_obj = (AttachmentTimeline *) obj; - _obj->setSlotIndex(value); +spine_rtti spine_attachment_timeline_rtti(void) { + return (spine_rtti)&AttachmentTimeline::rtti; } diff --git a/spine-c-new/src/generated/attachment_timeline.h b/spine-c-new/src/generated/attachment_timeline.h index d5e159d45..c3002aba5 100644 --- a/spine-c-new/src/generated/attachment_timeline.h +++ b/spine-c-new/src/generated/attachment_timeline.h @@ -1,60 +1,31 @@ -/****************************************************************************** - * 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_SPINE_ATTACHMENT_TIMELINE_H +#define SPINE_SPINE_ATTACHMENT_TIMELINE_H -#ifndef SPINE_C_ATTACHMENTTIMELINE_H -#define SPINE_C_ATTACHMENTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_attachment_timeline spine_attachment_timeline_create(size_t frameCount, int 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_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 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 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 int32_t spine_attachment_timeline_get_num_property_ids(spine_attachment_timeline obj); -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); +SPINE_C_API void spine_attachment_timeline_dispose(spine_attachment_timeline self); + +SPINE_C_API spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline self); +SPINE_C_API void spine_attachment_timeline_apply(spine_attachment_timeline self, 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_API void spine_attachment_timeline_set_frame(spine_attachment_timeline self, int frame, float time, const char* attachmentName); +SPINE_C_API size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline self); +SPINE_C_API size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline self); +SPINE_C_API spine_array_float spine_attachment_timeline_get_frames(spine_attachment_timeline self); +SPINE_C_API float spine_attachment_timeline_get_duration(spine_attachment_timeline self); +SPINE_C_API spine_array_property_id spine_attachment_timeline_get_property_ids(spine_attachment_timeline self); +SPINE_C_API int spine_attachment_timeline_get_slot_index(spine_attachment_timeline self); +SPINE_C_API void spine_attachment_timeline_set_slot_index(spine_attachment_timeline self, int inValue); +SPINE_C_API spine_rtti spine_attachment_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_ATTACHMENTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_ATTACHMENT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/attachment_type.h b/spine-c-new/src/generated/attachment_type.h index 526eae813..3709bb12a 100644 --- a/spine-c-new/src/generated/attachment_type.h +++ b/spine-c-new/src/generated/attachment_type.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_ATTACHMENTTYPE_H -#define SPINE_C_ATTACHMENTTYPE_H - -#include "../base.h" +#ifndef SPINE_SPINE_ATTACHMENT_TYPE_H +#define SPINE_SPINE_ATTACHMENT_TYPE_H #ifdef __cplusplus extern "C" { @@ -50,4 +19,4 @@ typedef enum spine_attachment_type { } #endif -#endif // SPINE_C_ATTACHMENTTYPE_H \ No newline at end of file +#endif /* SPINE_SPINE_ATTACHMENT_TYPE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/blend_mode.h b/spine-c-new/src/generated/blend_mode.h index b6e5d56f1..68723b93e 100644 --- a/spine-c-new/src/generated/blend_mode.h +++ b/spine-c-new/src/generated/blend_mode.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_BLENDMODE_H -#define SPINE_C_BLENDMODE_H - -#include "../base.h" +#ifndef SPINE_SPINE_BLEND_MODE_H +#define SPINE_SPINE_BLEND_MODE_H #ifdef __cplusplus extern "C" { @@ -47,4 +16,4 @@ typedef enum spine_blend_mode { } #endif -#endif // SPINE_C_BLENDMODE_H \ No newline at end of file +#endif /* SPINE_SPINE_BLEND_MODE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/block.cpp b/spine-c-new/src/generated/block.cpp deleted file mode 100644 index 4914f564f..000000000 --- a/spine-c-new/src/generated/block.cpp +++ /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. - *****************************************************************************/ - -#include "block.h" -#include - -using namespace spine; - -void spine_block_dispose(spine_block obj) { - if (!obj) return; - delete (Block *) obj; -} - -int spine_block_free(spine_block obj) { - if (!obj) return 0; - Block *_obj = (Block *) obj; - return _obj->free(); -} - -bool spine_block_can_fit(spine_block obj, int numBytes) { - if (!obj) return false; - Block *_obj = (Block *) obj; - return _obj->canFit(numBytes); -} - -uint8_t * spine_block_allocate(spine_block obj, int numBytes) { - if (!obj) return 0; - Block *_obj = (Block *) obj; - return (uint8_t *) _obj->allocate(numBytes); -} diff --git a/spine-c-new/src/generated/block.h b/spine-c-new/src/generated/block.h deleted file mode 100644 index 9c442dc62..000000000 --- a/spine-c-new/src/generated/block.h +++ /dev/null @@ -1,48 +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_BLOCK_H -#define SPINE_C_BLOCK_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "types.h" - -SPINE_C_EXPORT void spine_block_dispose(spine_block obj); -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 -} -#endif - -#endif // SPINE_C_BLOCK_H \ No newline at end of file diff --git a/spine-c-new/src/generated/bone.cpp b/spine-c-new/src/generated/bone.cpp index 8ecbee799..fa18fa09e 100644 --- a/spine-c-new/src/generated/bone.cpp +++ b/spine-c-new/src/generated/bone.cpp @@ -1,130 +1,72 @@ -/****************************************************************************** - * 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 "bone.h" #include using namespace spine; spine_bone spine_bone_create(spine_bone_data data, spine_bone parent) { - Bone *obj = new (__FILE__, __LINE__) Bone(*(BoneData*) data, (Bone *) parent); - return (spine_bone) obj; + return (spine_bone) new (__FILE__, __LINE__) Bone(*((BoneData*)data), (Bone *)parent); } -spine_bone spine_bone_create_with_bone_bone(spine_bone bone, spine_bone parent) { - Bone *obj = new (__FILE__, __LINE__) Bone(*(Bone*) bone, (Bone *) parent); - return (spine_bone) obj; +spine_bone spine_bone_create2(spine_bone bone, spine_bone parent) { + return (spine_bone) new (__FILE__, __LINE__) Bone(*((Bone*)bone), (Bone *)parent); } -void spine_bone_dispose(spine_bone obj) { - if (!obj) return; - delete (Bone *) obj; +void spine_bone_dispose(spine_bone self) { + delete (Bone*)self; } -spine_rtti spine_bone_get_rtti() { - return (spine_rtti) &Bone::rtti; +spine_rtti spine_bone_get_rtti(spine_bone self) { + return (spine_rtti)&((Bone*)self)->getRTTI(); } -spine_bone spine_bone_get_parent(spine_bone obj) { - if (!obj) return (spine_bone) 0; - Bone *_obj = (Bone *) obj; - return (spine_bone) _obj->getParent(); +spine_bone spine_bone_get_parent(spine_bone self) { + return (spine_bone)((Bone*)self)->getParent(); } -int32_t spine_bone_get_num_children(spine_bone obj) { - if (!obj) return 0; - Bone *_obj = (Bone *) obj; - return (int32_t) _obj->getChildren().size(); +spine_array_bone spine_bone_get_children(spine_bone self) { + return (spine_array_bone)&((Bone*)self)->getChildren(); } -spine_bone *spine_bone_get_children(spine_bone obj) { - if (!obj) return nullptr; - Bone *_obj = (Bone *) obj; - return (spine_bone *) _obj->getChildren().buffer(); +bool spine_bone_is_y_down(void) { + return Bone::isYDown(); } -void spine_bone_setup_pose(spine_bone obj) { - if (!obj) return ; - Bone *_obj = (Bone *) obj; - _obj->setupPose(); +void spine_bone_set_y_down(bool value) { + Bone::setYDown(value); } -spine_bone_data spine_bone_get_data(spine_bone obj) { - if (!obj) return (spine_bone_data) 0; - Bone *_obj = (Bone *) obj; - return (spine_bone_data) &_obj->getData(); +spine_bone_data spine_bone_get_data(spine_bone self) { + return (spine_bone_data)&((PosedGeneric*)(Bone*)self)->getData(); } -spine_bone_local spine_bone_get_pose(spine_bone obj) { - if (!obj) return (spine_bone_local) 0; - Bone *_obj = (Bone *) obj; - return (spine_bone_local) &_obj->getPose(); +spine_bone_local spine_bone_get_pose(spine_bone self) { + return (spine_bone_local)&((PosedGeneric*)(Bone*)self)->getPose(); } -spine_bone_pose spine_bone_get_applied_pose(spine_bone obj) { - if (!obj) return (spine_bone_pose) 0; - Bone *_obj = (Bone *) obj; - return (spine_bone_pose) &_obj->getAppliedPose(); +spine_bone_pose spine_bone_get_applied_pose(spine_bone self) { + return (spine_bone_pose)&((PosedGeneric*)(Bone*)self)->getAppliedPose(); } -void spine_bone_reset_constrained(spine_bone obj) { - if (!obj) return ; - Bone *_obj = (Bone *) obj; - _obj->resetConstrained(); +void spine_bone_reset_constrained(spine_bone self) { + ((PosedGeneric*)(Bone*)self)->resetConstrained(); } -void spine_bone_update_pose(spine_bone obj) { - if (!obj) return ; - Bone *_obj = (Bone *) obj; - _obj->pose(); +void spine_bone_constrained(spine_bone self) { + ((PosedGeneric*)(Bone*)self)->constrained(); } -void spine_bone_constrained(spine_bone obj) { - if (!obj) return ; - Bone *_obj = (Bone *) obj; - _obj->constrained(); +bool spine_bone_is_pose_equal_to_applied(spine_bone self) { + return ((PosedGeneric*)(Bone*)self)->isPoseEqualToApplied(); } -bool spine_bone_is_pose_equal_to_applied(spine_bone obj) { - if (!obj) return false; - Bone *_obj = (Bone *) obj; - return _obj->isPoseEqualToApplied(); +bool spine_bone_is_active(spine_bone self) { + return ((PosedActive*)(Bone*)self)->isActive(); } -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 self, bool active) { + ((PosedActive*)(Bone*)self)->setActive(active); } -void spine_bone_set_active(spine_bone obj, bool value) { - if (!obj) return; - Bone *_obj = (Bone *) obj; - _obj->setActive(value); +spine_rtti spine_bone_rtti(void) { + return (spine_rtti)&Bone::rtti; } diff --git a/spine-c-new/src/generated/bone.h b/spine-c-new/src/generated/bone.h index aa65ffd46..668ac3796 100644 --- a/spine-c-new/src/generated/bone.h +++ b/spine-c-new/src/generated/bone.h @@ -1,61 +1,35 @@ -/****************************************************************************** - * 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_SPINE_BONE_H +#define SPINE_SPINE_BONE_H -#ifndef SPINE_C_BONE_H -#define SPINE_C_BONE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_bone spine_bone_create(spine_bone_data data, spine_bone parent); +SPINE_C_API spine_bone spine_bone_create2(spine_bone bone, spine_bone parent); -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_C_EXPORT spine_bone spine_bone_get_parent(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); -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_update_pose(spine_bone obj); -SPINE_C_EXPORT void spine_bone_constrained(spine_bone obj); -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); +SPINE_C_API void spine_bone_dispose(spine_bone self); + +SPINE_C_API spine_rtti spine_bone_get_rtti(spine_bone self); +SPINE_C_API spine_bone spine_bone_get_parent(spine_bone self); +SPINE_C_API spine_array_bone spine_bone_get_children(spine_bone self); +SPINE_C_API bool spine_bone_is_y_down(void); +SPINE_C_API void spine_bone_set_y_down(bool value); +SPINE_C_API spine_bone_data spine_bone_get_data(spine_bone self); +SPINE_C_API spine_bone_local spine_bone_get_pose(spine_bone self); +SPINE_C_API spine_bone_pose spine_bone_get_applied_pose(spine_bone self); +SPINE_C_API void spine_bone_reset_constrained(spine_bone self); +SPINE_C_API void spine_bone_constrained(spine_bone self); +SPINE_C_API bool spine_bone_is_pose_equal_to_applied(spine_bone self); +SPINE_C_API bool spine_bone_is_active(spine_bone self); +SPINE_C_API void spine_bone_set_active(spine_bone self, bool active); +SPINE_C_API spine_rtti spine_bone_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONE_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_data.cpp b/spine-c-new/src/generated/bone_data.cpp index 5189d94ab..e3b45e6db 100644 --- a/spine-c-new/src/generated/bone_data.cpp +++ b/spine-c-new/src/generated/bone_data.cpp @@ -1,103 +1,64 @@ -/****************************************************************************** - * 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 "bone_data.h" #include using namespace spine; 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; + return (spine_bone_data) new (__FILE__, __LINE__) BoneData(index, *((const String*)name), (BoneData *)parent); } -void spine_bone_data_dispose(spine_bone_data obj) { - if (!obj) return; - delete (BoneData *) obj; +void spine_bone_data_dispose(spine_bone_data self) { + delete (BoneData*)self; } -int spine_bone_data_get_index(spine_bone_data obj) { - if (!obj) return 0; - BoneData *_obj = (BoneData *) obj; - return _obj->getIndex(); +int spine_bone_data_get_index(spine_bone_data self) { + return ((BoneData*)self)->getIndex(); } -spine_bone_data spine_bone_data_get_parent(spine_bone_data obj) { - if (!obj) return (spine_bone_data) 0; - BoneData *_obj = (BoneData *) obj; - return (spine_bone_data) _obj->getParent(); +spine_bone_data spine_bone_data_get_parent(spine_bone_data self) { + return (spine_bone_data)((BoneData*)self)->getParent(); } -float spine_bone_data_get_length(spine_bone_data obj) { - if (!obj) return 0; - BoneData *_obj = (BoneData *) obj; - return _obj->getLength(); +float spine_bone_data_get_length(spine_bone_data self) { + return ((BoneData*)self)->getLength(); } -void spine_bone_data_set_length(spine_bone_data obj, float value) { - if (!obj) return; - BoneData *_obj = (BoneData *) obj; - _obj->setLength(value); +void spine_bone_data_set_length(spine_bone_data self, float inValue) { + ((BoneData*)self)->setLength(inValue); } -spine_color spine_bone_data_get_color(spine_bone_data obj) { - if (!obj) return (spine_color) 0; - BoneData *_obj = (BoneData *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_bone_data_get_color(spine_bone_data self) { + return (spine_color)&((BoneData*)self)->getColor(); } -const char* spine_bone_data_get_icon(spine_bone_data obj) { - if (!obj) return nullptr; - BoneData *_obj = (BoneData *) obj; - return (const char *) _obj->getIcon().buffer(); +const char* spine_bone_data_get_icon(spine_bone_data self) { + return (const char*)&((BoneData*)self)->getIcon(); } -void spine_bone_data_set_icon(spine_bone_data obj, const char* value) { - if (!obj) return; - BoneData *_obj = (BoneData *) obj; - _obj->setIcon(String(value)); +void spine_bone_data_set_icon(spine_bone_data self, const char* icon) { + ((BoneData*)self)->setIcon(*((const String*)icon)); } -bool spine_bone_data_get_visible(spine_bone_data obj) { - if (!obj) return false; - BoneData *_obj = (BoneData *) obj; - return _obj->getVisible(); +bool spine_bone_data_get_visible(spine_bone_data self) { + return ((BoneData*)self)->getVisible(); } -void spine_bone_data_set_visible(spine_bone_data obj, bool value) { - if (!obj) return; - BoneData *_obj = (BoneData *) obj; - _obj->setVisible(value); +void spine_bone_data_set_visible(spine_bone_data self, bool inValue) { + ((BoneData*)self)->setVisible(inValue); } -spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj) { - if (!obj) return (spine_bone_local) 0; - BoneData *_obj = (BoneData *) obj; - return (spine_bone_local) &_obj->getSetupPose(); +spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data self) { + return (spine_bone_local)&((PosedDataGeneric*)(BoneData*)self)->getSetupPose(); +} + +const char* spine_bone_data_get_name(spine_bone_data self) { + return (const char*)&((PosedDataGeneric*)(BoneData*)self)->getName(); +} + +bool spine_bone_data_is_skin_required(spine_bone_data self) { + return ((PosedDataGeneric*)(BoneData*)self)->isSkinRequired(); +} + +void spine_bone_data_set_skin_required(spine_bone_data self, bool skinRequired) { + ((PosedDataGeneric*)(BoneData*)self)->setSkinRequired(skinRequired); } diff --git a/spine-c-new/src/generated/bone_data.h b/spine-c-new/src/generated/bone_data.h index b353803de..48ad2f95a 100644 --- a/spine-c-new/src/generated/bone_data.h +++ b/spine-c-new/src/generated/bone_data.h @@ -1,56 +1,33 @@ -/****************************************************************************** - * 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_SPINE_BONE_DATA_H +#define SPINE_SPINE_BONE_DATA_H -#ifndef SPINE_C_BONEDATA_H -#define SPINE_C_BONEDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_bone_data spine_bone_data_create(int index, const char* 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 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 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); +SPINE_C_API void spine_bone_data_dispose(spine_bone_data self); + +SPINE_C_API int spine_bone_data_get_index(spine_bone_data self); +SPINE_C_API spine_bone_data spine_bone_data_get_parent(spine_bone_data self); +SPINE_C_API float spine_bone_data_get_length(spine_bone_data self); +SPINE_C_API void spine_bone_data_set_length(spine_bone_data self, float inValue); +SPINE_C_API spine_color spine_bone_data_get_color(spine_bone_data self); +SPINE_C_API const char* spine_bone_data_get_icon(spine_bone_data self); +SPINE_C_API void spine_bone_data_set_icon(spine_bone_data self, const char* icon); +SPINE_C_API bool spine_bone_data_get_visible(spine_bone_data self); +SPINE_C_API void spine_bone_data_set_visible(spine_bone_data self, bool inValue); +SPINE_C_API spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data self); +SPINE_C_API const char* spine_bone_data_get_name(spine_bone_data self); +SPINE_C_API bool spine_bone_data_is_skin_required(spine_bone_data self); +SPINE_C_API void spine_bone_data_set_skin_required(spine_bone_data self, bool skinRequired); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONEDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_local.cpp b/spine-c-new/src/generated/bone_local.cpp index c33fd217f..161a292bc 100644 --- a/spine-c-new/src/generated/bone_local.cpp +++ b/spine-c-new/src/generated/bone_local.cpp @@ -1,163 +1,92 @@ -/****************************************************************************** - * 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 "bone_local.h" #include using namespace spine; spine_bone_local spine_bone_local_create(void) { - BoneLocal *obj = new (__FILE__, __LINE__) BoneLocal(); - return (spine_bone_local) obj; + return (spine_bone_local) new (__FILE__, __LINE__) BoneLocal(); } -void spine_bone_local_dispose(spine_bone_local obj) { - if (!obj) return; - delete (BoneLocal *) obj; +void spine_bone_local_dispose(spine_bone_local self) { + delete (BoneLocal*)self; } -void spine_bone_local_set(spine_bone_local obj, spine_bone_local value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->set(*((BoneLocal*) value)); +void spine_bone_local_set(spine_bone_local self, spine_bone_local pose) { + ((BoneLocal*)self)->set(*((BoneLocal*)pose)); } -float spine_bone_local_get_x(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getX(); +float spine_bone_local_get_x(spine_bone_local self) { + return ((BoneLocal*)self)->getX(); } -void spine_bone_local_set_x(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setX(value); +void spine_bone_local_set_x(spine_bone_local self, float x) { + ((BoneLocal*)self)->setX(x); } -float spine_bone_local_get_y(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getY(); +float spine_bone_local_get_y(spine_bone_local self) { + return ((BoneLocal*)self)->getY(); } -void spine_bone_local_set_y(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setY(value); +void spine_bone_local_set_y(spine_bone_local self, float y) { + ((BoneLocal*)self)->setY(y); } -void spine_bone_local_set_position(spine_bone_local obj, float x, float y) { - if (!obj) return ; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setPosition(x, y); +void spine_bone_local_set_position(spine_bone_local self, float x, float y) { + ((BoneLocal*)self)->setPosition(x, y); } -float spine_bone_local_get_rotation(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getRotation(); +float spine_bone_local_get_rotation(spine_bone_local self) { + return ((BoneLocal*)self)->getRotation(); } -void spine_bone_local_set_rotation(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setRotation(value); +void spine_bone_local_set_rotation(spine_bone_local self, float rotation) { + ((BoneLocal*)self)->setRotation(rotation); } -float spine_bone_local_get_scale_x(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getScaleX(); +float spine_bone_local_get_scale_x(spine_bone_local self) { + return ((BoneLocal*)self)->getScaleX(); } -void spine_bone_local_set_scale_x(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setScaleX(value); +void spine_bone_local_set_scale_x(spine_bone_local self, float scaleX) { + ((BoneLocal*)self)->setScaleX(scaleX); } -float spine_bone_local_get_scale_y(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getScaleY(); +float spine_bone_local_get_scale_y(spine_bone_local self) { + return ((BoneLocal*)self)->getScaleY(); } -void spine_bone_local_set_scale_y(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setScaleY(value); +void spine_bone_local_set_scale_y(spine_bone_local self, float scaleY) { + ((BoneLocal*)self)->setScaleY(scaleY); } -void spine_bone_local_set_scale(spine_bone_local obj, float scaleX, float scaleY) { - if (!obj) return ; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setScale(scaleX, scaleY); +void spine_bone_local_set_scale_1(spine_bone_local self, float scaleX, float scaleY) { + ((BoneLocal*)self)->setScale(scaleX, scaleY); } -void spine_bone_local_set_scale(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setScale(value); +void spine_bone_local_set_scale_2(spine_bone_local self, float scale) { + ((BoneLocal*)self)->setScale(scale); } -float spine_bone_local_get_shear_x(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getShearX(); +float spine_bone_local_get_shear_x(spine_bone_local self) { + return ((BoneLocal*)self)->getShearX(); } -void spine_bone_local_set_shear_x(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setShearX(value); +void spine_bone_local_set_shear_x(spine_bone_local self, float shearX) { + ((BoneLocal*)self)->setShearX(shearX); } -float spine_bone_local_get_shear_y(spine_bone_local obj) { - if (!obj) return 0; - BoneLocal *_obj = (BoneLocal *) obj; - return _obj->getShearY(); +float spine_bone_local_get_shear_y(spine_bone_local self) { + return ((BoneLocal*)self)->getShearY(); } -void spine_bone_local_set_shear_y(spine_bone_local obj, float value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setShearY(value); +void spine_bone_local_set_shear_y(spine_bone_local self, float shearY) { + ((BoneLocal*)self)->setShearY(shearY); } -spine_inherit spine_bone_local_get_inherit(spine_bone_local obj) { - if (!obj) return (spine_inherit) 0; - BoneLocal *_obj = (BoneLocal *) obj; - return (spine_inherit) _obj->getInherit(); +spine_inherit spine_bone_local_get_inherit(spine_bone_local self) { + return (spine_inherit)((BoneLocal*)self)->getInherit(); } -void spine_bone_local_set_inherit(spine_bone_local obj, spine_inherit value) { - if (!obj) return; - BoneLocal *_obj = (BoneLocal *) obj; - _obj->setInherit((Inherit) value); +void spine_bone_local_set_inherit(spine_bone_local self, spine_inherit inherit) { + ((BoneLocal*)self)->setInherit((Inherit)inherit); } diff --git a/spine-c-new/src/generated/bone_local.h b/spine-c-new/src/generated/bone_local.h index 0faffb2cb..4db1ecb89 100644 --- a/spine-c-new/src/generated/bone_local.h +++ b/spine-c-new/src/generated/bone_local.h @@ -1,66 +1,40 @@ -/****************************************************************************** - * 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_SPINE_BONE_LOCAL_H +#define SPINE_SPINE_BONE_LOCAL_H -#ifndef SPINE_C_BONELOCAL_H -#define SPINE_C_BONELOCAL_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_bone_local spine_bone_local_create(void); -SPINE_C_EXPORT spine_bone_local spine_bone_local_create(void); -SPINE_C_EXPORT void spine_bone_local_dispose(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set(spine_bone_local obj, spine_bone_local value); -SPINE_C_EXPORT float spine_bone_local_get_x(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_x(spine_bone_local obj, float value); -SPINE_C_EXPORT float spine_bone_local_get_y(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_y(spine_bone_local obj, float value); -SPINE_C_EXPORT void spine_bone_local_set_position(spine_bone_local obj, float x, float y); -SPINE_C_EXPORT float spine_bone_local_get_rotation(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_rotation(spine_bone_local obj, float value); -SPINE_C_EXPORT float spine_bone_local_get_scale_x(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_scale_x(spine_bone_local obj, float value); -SPINE_C_EXPORT float spine_bone_local_get_scale_y(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_scale_y(spine_bone_local obj, float value); -SPINE_C_EXPORT void spine_bone_local_set_scale(spine_bone_local obj, float scaleX, float scaleY); -SPINE_C_EXPORT void spine_bone_local_set_scale(spine_bone_local obj, float value); -SPINE_C_EXPORT float spine_bone_local_get_shear_x(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_shear_x(spine_bone_local obj, float value); -SPINE_C_EXPORT float spine_bone_local_get_shear_y(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_shear_y(spine_bone_local obj, float value); -SPINE_C_EXPORT spine_inherit spine_bone_local_get_inherit(spine_bone_local obj); -SPINE_C_EXPORT void spine_bone_local_set_inherit(spine_bone_local obj, spine_inherit value); +SPINE_C_API void spine_bone_local_dispose(spine_bone_local self); + +SPINE_C_API void spine_bone_local_set(spine_bone_local self, spine_bone_local pose); +SPINE_C_API float spine_bone_local_get_x(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_x(spine_bone_local self, float x); +SPINE_C_API float spine_bone_local_get_y(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_y(spine_bone_local self, float y); +SPINE_C_API void spine_bone_local_set_position(spine_bone_local self, float x, float y); +SPINE_C_API float spine_bone_local_get_rotation(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_rotation(spine_bone_local self, float rotation); +SPINE_C_API float spine_bone_local_get_scale_x(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_scale_x(spine_bone_local self, float scaleX); +SPINE_C_API float spine_bone_local_get_scale_y(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_scale_y(spine_bone_local self, float scaleY); +SPINE_C_API void spine_bone_local_set_scale_1(spine_bone_local self, float scaleX, float scaleY); +SPINE_C_API void spine_bone_local_set_scale_2(spine_bone_local self, float scale); +SPINE_C_API float spine_bone_local_get_shear_x(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_shear_x(spine_bone_local self, float shearX); +SPINE_C_API float spine_bone_local_get_shear_y(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_shear_y(spine_bone_local self, float shearY); +SPINE_C_API spine_inherit spine_bone_local_get_inherit(spine_bone_local self); +SPINE_C_API void spine_bone_local_set_inherit(spine_bone_local self, spine_inherit inherit); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONELOCAL_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_LOCAL_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_pose.cpp b/spine-c-new/src/generated/bone_pose.cpp index 24c0f060e..ee5308b17 100644 --- a/spine-c-new/src/generated/bone_pose.cpp +++ b/spine-c-new/src/generated/bone_pose.cpp @@ -1,347 +1,220 @@ -/****************************************************************************** - * 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 "bone_pose.h" #include using namespace spine; spine_bone_pose spine_bone_pose_create(void) { - BonePose *obj = new (__FILE__, __LINE__) BonePose(); - return (spine_bone_pose) obj; + return (spine_bone_pose) new (__FILE__, __LINE__) BonePose(); } -void spine_bone_pose_dispose(spine_bone_pose obj) { - if (!obj) return; - delete (BonePose *) obj; +void spine_bone_pose_dispose(spine_bone_pose self) { + delete (BonePose*)self; } -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*) skeleton, (Physics) physics); +void spine_bone_pose_update(spine_bone_pose self, spine_skeleton skeleton, spine_physics physics) { + ((BonePose*)self)->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*) skeleton); +void spine_bone_pose_update_world_transform(spine_bone_pose self, spine_skeleton skeleton) { + ((BonePose*)self)->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*) skeleton); +void spine_bone_pose_update_local_transform(spine_bone_pose self, spine_skeleton skeleton) { + ((BonePose*)self)->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*) skeleton); +void spine_bone_pose_validate_local_transform(spine_bone_pose self, spine_skeleton skeleton) { + ((BonePose*)self)->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*) skeleton); +void spine_bone_pose_modify_local(spine_bone_pose self, spine_skeleton skeleton) { + ((BonePose*)self)->modifyLocal(*((Skeleton*)skeleton)); } -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_modify_world(spine_bone_pose self, int update) { + ((BonePose*)self)->modifyWorld(update); } -void spine_bone_pose_reset_world(spine_bone_pose obj, int update) { - if (!obj) return ; - BonePose *_obj = (BonePose *) obj; - _obj->resetWorld(update); +void spine_bone_pose_reset_world(spine_bone_pose self, int update) { + ((BonePose*)self)->resetWorld(update); } -float spine_bone_pose_get_a(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getA(); +float spine_bone_pose_get_a(spine_bone_pose self) { + return ((BonePose*)self)->getA(); } -void spine_bone_pose_set_a(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setA(value); +void spine_bone_pose_set_a(spine_bone_pose self, float a) { + ((BonePose*)self)->setA(a); } -float spine_bone_pose_get_b(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getB(); +float spine_bone_pose_get_b(spine_bone_pose self) { + return ((BonePose*)self)->getB(); } -void spine_bone_pose_set_b(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setB(value); +void spine_bone_pose_set_b(spine_bone_pose self, float b) { + ((BonePose*)self)->setB(b); } -float spine_bone_pose_get_c(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getC(); +float spine_bone_pose_get_c(spine_bone_pose self) { + return ((BonePose*)self)->getC(); } -void spine_bone_pose_set_c(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setC(value); +void spine_bone_pose_set_c(spine_bone_pose self, float c) { + ((BonePose*)self)->setC(c); } -float spine_bone_pose_get_d(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getD(); +float spine_bone_pose_get_d(spine_bone_pose self) { + return ((BonePose*)self)->getD(); } -void spine_bone_pose_set_d(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setD(value); +void spine_bone_pose_set_d(spine_bone_pose self, float d) { + ((BonePose*)self)->setD(d); } -float spine_bone_pose_get_world_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldX(); +float spine_bone_pose_get_world_x(spine_bone_pose self) { + return ((BonePose*)self)->getWorldX(); } -void spine_bone_pose_set_world_x(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setWorldX(value); +void spine_bone_pose_set_world_x(spine_bone_pose self, float worldX) { + ((BonePose*)self)->setWorldX(worldX); } -float spine_bone_pose_get_world_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldY(); +float spine_bone_pose_get_world_y(spine_bone_pose self) { + return ((BonePose*)self)->getWorldY(); } -void spine_bone_pose_set_world_y(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setWorldY(value); +void spine_bone_pose_set_world_y(spine_bone_pose self, float worldY) { + ((BonePose*)self)->setWorldY(worldY); } -float spine_bone_pose_get_world_rotation_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldRotationX(); +float spine_bone_pose_get_world_rotation_x(spine_bone_pose self) { + return ((BonePose*)self)->getWorldRotationX(); } -float spine_bone_pose_get_world_rotation_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldRotationY(); +float spine_bone_pose_get_world_rotation_y(spine_bone_pose self) { + return ((BonePose*)self)->getWorldRotationY(); } -float spine_bone_pose_get_world_scale_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldScaleX(); +float spine_bone_pose_get_world_scale_x(spine_bone_pose self) { + return ((BonePose*)self)->getWorldScaleX(); } -float spine_bone_pose_get_world_scale_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getWorldScaleY(); +float spine_bone_pose_get_world_scale_y(spine_bone_pose self) { + return ((BonePose*)self)->getWorldScaleY(); } -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); +void spine_bone_pose_world_to_local(spine_bone_pose self, float worldX, float worldY, float* outLocalX, float* outLocalY) { + ((BonePose*)self)->worldToLocal(worldX, worldY, *outLocalX, *outLocalY); } -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); +void spine_bone_pose_local_to_world(spine_bone_pose self, float localX, float localY, float* outWorldX, float* outWorldY) { + ((BonePose*)self)->localToWorld(localX, localY, *outWorldX, *outWorldY); } -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); +void spine_bone_pose_world_to_parent(spine_bone_pose self, float worldX, float worldY, float* outParentX, float* outParentY) { + ((BonePose*)self)->worldToParent(worldX, worldY, *outParentX, *outParentY); } -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); +void spine_bone_pose_parent_to_world(spine_bone_pose self, float parentX, float parentY, float* outWorldX, float* outWorldY) { + ((BonePose*)self)->parentToWorld(parentX, parentY, *outWorldX, *outWorldY); } -float spine_bone_pose_world_to_local_rotation(spine_bone_pose obj, float worldRotation) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->worldToLocalRotation(worldRotation); +float spine_bone_pose_world_to_local_rotation(spine_bone_pose self, float worldRotation) { + return ((BonePose*)self)->worldToLocalRotation(worldRotation); } -float spine_bone_pose_local_to_world_rotation(spine_bone_pose obj, float localRotation) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->localToWorldRotation(localRotation); +float spine_bone_pose_local_to_world_rotation(spine_bone_pose self, float localRotation) { + return ((BonePose*)self)->localToWorldRotation(localRotation); } -void spine_bone_pose_rotate_world(spine_bone_pose obj, float degrees) { - if (!obj) return ; - BonePose *_obj = (BonePose *) obj; - _obj->rotateWorld(degrees); +void spine_bone_pose_rotate_world(spine_bone_pose self, float degrees) { + ((BonePose*)self)->rotateWorld(degrees); } -void spine_bone_pose_set(spine_bone_pose obj, spine_bone_local value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->set(*((BoneLocal*) value)); +void spine_bone_pose_set(spine_bone_pose self, spine_bone_local pose) { + ((BoneLocal*)(BonePose*)self)->set(*((BoneLocal*)pose)); } -float spine_bone_pose_get_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getX(); +float spine_bone_pose_get_x(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getX(); } -void spine_bone_pose_set_x(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setX(value); +void spine_bone_pose_set_x(spine_bone_pose self, float x) { + ((BoneLocal*)(BonePose*)self)->setX(x); } -float spine_bone_pose_get_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getY(); +float spine_bone_pose_get_y(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getY(); } -void spine_bone_pose_set_y(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setY(value); +void spine_bone_pose_set_y(spine_bone_pose self, float y) { + ((BoneLocal*)(BonePose*)self)->setY(y); } -void spine_bone_pose_set_position(spine_bone_pose obj, float x, float y) { - if (!obj) return ; - BonePose *_obj = (BonePose *) obj; - _obj->setPosition(x, y); +void spine_bone_pose_set_position(spine_bone_pose self, float x, float y) { + ((BoneLocal*)(BonePose*)self)->setPosition(x, y); } -float spine_bone_pose_get_rotation(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getRotation(); +float spine_bone_pose_get_rotation(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getRotation(); } -void spine_bone_pose_set_rotation(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setRotation(value); +void spine_bone_pose_set_rotation(spine_bone_pose self, float rotation) { + ((BoneLocal*)(BonePose*)self)->setRotation(rotation); } -float spine_bone_pose_get_scale_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getScaleX(); +float spine_bone_pose_get_scale_x(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getScaleX(); } -void spine_bone_pose_set_scale_x(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setScaleX(value); +void spine_bone_pose_set_scale_x(spine_bone_pose self, float scaleX) { + ((BoneLocal*)(BonePose*)self)->setScaleX(scaleX); } -float spine_bone_pose_get_scale_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getScaleY(); +float spine_bone_pose_get_scale_y(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getScaleY(); } -void spine_bone_pose_set_scale_y(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setScaleY(value); +void spine_bone_pose_set_scale_y(spine_bone_pose self, float scaleY) { + ((BoneLocal*)(BonePose*)self)->setScaleY(scaleY); } -void spine_bone_pose_set_scale(spine_bone_pose obj, float scaleX, float scaleY) { - if (!obj) return ; - BonePose *_obj = (BonePose *) obj; - _obj->setScale(scaleX, scaleY); +void spine_bone_pose_set_scale_1(spine_bone_pose self, float scaleX, float scaleY) { + ((BoneLocal*)(BonePose*)self)->setScale(scaleX, scaleY); } -void spine_bone_pose_set_scale(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setScale(value); +void spine_bone_pose_set_scale_2(spine_bone_pose self, float scale) { + ((BoneLocal*)(BonePose*)self)->setScale(scale); } -float spine_bone_pose_get_shear_x(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getShearX(); +float spine_bone_pose_get_shear_x(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getShearX(); } -void spine_bone_pose_set_shear_x(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setShearX(value); +void spine_bone_pose_set_shear_x(spine_bone_pose self, float shearX) { + ((BoneLocal*)(BonePose*)self)->setShearX(shearX); } -float spine_bone_pose_get_shear_y(spine_bone_pose obj) { - if (!obj) return 0; - BonePose *_obj = (BonePose *) obj; - return _obj->getShearY(); +float spine_bone_pose_get_shear_y(spine_bone_pose self) { + return ((BoneLocal*)(BonePose*)self)->getShearY(); } -void spine_bone_pose_set_shear_y(spine_bone_pose obj, float value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setShearY(value); +void spine_bone_pose_set_shear_y(spine_bone_pose self, float shearY) { + ((BoneLocal*)(BonePose*)self)->setShearY(shearY); } -spine_inherit spine_bone_pose_get_inherit(spine_bone_pose obj) { - if (!obj) return (spine_inherit) 0; - BonePose *_obj = (BonePose *) obj; - return (spine_inherit) _obj->getInherit(); +spine_inherit spine_bone_pose_get_inherit(spine_bone_pose self) { + return (spine_inherit)((BoneLocal*)(BonePose*)self)->getInherit(); } -void spine_bone_pose_set_inherit(spine_bone_pose obj, spine_inherit value) { - if (!obj) return; - BonePose *_obj = (BonePose *) obj; - _obj->setInherit((Inherit) value); +void spine_bone_pose_set_inherit(spine_bone_pose self, spine_inherit inherit) { + ((BoneLocal*)(BonePose*)self)->setInherit((Inherit)inherit); } -spine_rtti spine_bone_pose_get_rtti() { - return (spine_rtti) &BonePose::rtti; +spine_rtti spine_bone_pose_get_rtti(spine_bone_pose self) { + return (spine_rtti)&((Update*)(BonePose*)self)->getRTTI(); +} + +spine_rtti spine_bone_pose_rtti(void) { + 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 89fc1e6e0..a3771db0b 100644 --- a/spine-c-new/src/generated/bone_pose.h +++ b/spine-c-new/src/generated/bone_pose.h @@ -1,97 +1,72 @@ -/****************************************************************************** - * 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_SPINE_BONE_POSE_H +#define SPINE_SPINE_BONE_POSE_H -#ifndef SPINE_C_BONEPOSE_H -#define SPINE_C_BONEPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_bone_pose spine_bone_pose_create(void); -SPINE_C_EXPORT spine_bone_pose spine_bone_pose_create(void); -SPINE_C_EXPORT void spine_bone_pose_dispose(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_update(spine_bone_pose obj, spine_skeleton skeleton, spine_physics physics); -SPINE_C_EXPORT void spine_bone_pose_update_world_transform(spine_bone_pose obj, spine_skeleton skeleton); -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, 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); -SPINE_C_EXPORT void spine_bone_pose_set_b(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_c(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_c(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_d(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_d(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_world_x(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_world_x(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_world_y(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_world_y(spine_bone_pose obj, float value); -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 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); -SPINE_C_EXPORT void spine_bone_pose_set(spine_bone_pose obj, spine_bone_local value); -SPINE_C_EXPORT float spine_bone_pose_get_x(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_x(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_y(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_y(spine_bone_pose obj, float value); -SPINE_C_EXPORT void spine_bone_pose_set_position(spine_bone_pose obj, float x, float y); -SPINE_C_EXPORT float spine_bone_pose_get_rotation(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_rotation(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_scale_x(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_scale_x(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_scale_y(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_scale_y(spine_bone_pose obj, float value); -SPINE_C_EXPORT void spine_bone_pose_set_scale(spine_bone_pose obj, float scaleX, float scaleY); -SPINE_C_EXPORT void spine_bone_pose_set_scale(spine_bone_pose obj, float value); -SPINE_C_EXPORT float spine_bone_pose_get_shear_x(spine_bone_pose obj); -SPINE_C_EXPORT void spine_bone_pose_set_shear_x(spine_bone_pose obj, float value); -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_C_API void spine_bone_pose_dispose(spine_bone_pose self); + +SPINE_C_API void spine_bone_pose_update(spine_bone_pose self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_bone_pose_update_world_transform(spine_bone_pose self, spine_skeleton skeleton); +SPINE_C_API void spine_bone_pose_update_local_transform(spine_bone_pose self, spine_skeleton skeleton); +SPINE_C_API void spine_bone_pose_validate_local_transform(spine_bone_pose self, spine_skeleton skeleton); +SPINE_C_API void spine_bone_pose_modify_local(spine_bone_pose self, spine_skeleton skeleton); +SPINE_C_API void spine_bone_pose_modify_world(spine_bone_pose self, int update); +SPINE_C_API void spine_bone_pose_reset_world(spine_bone_pose self, int update); +SPINE_C_API float spine_bone_pose_get_a(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_a(spine_bone_pose self, float a); +SPINE_C_API float spine_bone_pose_get_b(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_b(spine_bone_pose self, float b); +SPINE_C_API float spine_bone_pose_get_c(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_c(spine_bone_pose self, float c); +SPINE_C_API float spine_bone_pose_get_d(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_d(spine_bone_pose self, float d); +SPINE_C_API float spine_bone_pose_get_world_x(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_world_x(spine_bone_pose self, float worldX); +SPINE_C_API float spine_bone_pose_get_world_y(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_world_y(spine_bone_pose self, float worldY); +SPINE_C_API float spine_bone_pose_get_world_rotation_x(spine_bone_pose self); +SPINE_C_API float spine_bone_pose_get_world_rotation_y(spine_bone_pose self); +SPINE_C_API float spine_bone_pose_get_world_scale_x(spine_bone_pose self); +SPINE_C_API float spine_bone_pose_get_world_scale_y(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_world_to_local(spine_bone_pose self, float worldX, float worldY, float* outLocalX, float* outLocalY); +SPINE_C_API void spine_bone_pose_local_to_world(spine_bone_pose self, float localX, float localY, float* outWorldX, float* outWorldY); +SPINE_C_API void spine_bone_pose_world_to_parent(spine_bone_pose self, float worldX, float worldY, float* outParentX, float* outParentY); +SPINE_C_API void spine_bone_pose_parent_to_world(spine_bone_pose self, float parentX, float parentY, float* outWorldX, float* outWorldY); +SPINE_C_API float spine_bone_pose_world_to_local_rotation(spine_bone_pose self, float worldRotation); +SPINE_C_API float spine_bone_pose_local_to_world_rotation(spine_bone_pose self, float localRotation); +SPINE_C_API void spine_bone_pose_rotate_world(spine_bone_pose self, float degrees); +SPINE_C_API void spine_bone_pose_set(spine_bone_pose self, spine_bone_local pose); +SPINE_C_API float spine_bone_pose_get_x(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_x(spine_bone_pose self, float x); +SPINE_C_API float spine_bone_pose_get_y(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_y(spine_bone_pose self, float y); +SPINE_C_API void spine_bone_pose_set_position(spine_bone_pose self, float x, float y); +SPINE_C_API float spine_bone_pose_get_rotation(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_rotation(spine_bone_pose self, float rotation); +SPINE_C_API float spine_bone_pose_get_scale_x(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_scale_x(spine_bone_pose self, float scaleX); +SPINE_C_API float spine_bone_pose_get_scale_y(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_scale_y(spine_bone_pose self, float scaleY); +SPINE_C_API void spine_bone_pose_set_scale_1(spine_bone_pose self, float scaleX, float scaleY); +SPINE_C_API void spine_bone_pose_set_scale_2(spine_bone_pose self, float scale); +SPINE_C_API float spine_bone_pose_get_shear_x(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_shear_x(spine_bone_pose self, float shearX); +SPINE_C_API float spine_bone_pose_get_shear_y(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_shear_y(spine_bone_pose self, float shearY); +SPINE_C_API spine_inherit spine_bone_pose_get_inherit(spine_bone_pose self); +SPINE_C_API void spine_bone_pose_set_inherit(spine_bone_pose self, spine_inherit inherit); +SPINE_C_API spine_rtti spine_bone_pose_get_rtti(spine_bone_pose self); +SPINE_C_API spine_rtti spine_bone_pose_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONEPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_POSE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_timeline.cpp b/spine-c-new/src/generated/bone_timeline.cpp index 2498a8b08..7b5506818 100644 --- a/spine-c-new/src/generated/bone_timeline.cpp +++ b/spine-c-new/src/generated/bone_timeline.cpp @@ -1,59 +1,24 @@ -/****************************************************************************** - * 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 "bone_timeline.h" #include using namespace spine; -spine_bone_timeline spine_bone_timeline_create(int boneIndex) { - BoneTimeline *obj = new (__FILE__, __LINE__) BoneTimeline(boneIndex); - return (spine_bone_timeline) obj; +void spine_bone_timeline_dispose(spine_bone_timeline self) { + delete (BoneTimeline*)self; } -void spine_bone_timeline_dispose(spine_bone_timeline obj) { - if (!obj) return; - delete (BoneTimeline *) obj; +spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline self) { + return (spine_rtti)&((BoneTimeline*)self)->getRTTI(); } -spine_rtti spine_bone_timeline_get_rtti() { - return (spine_rtti) &BoneTimeline::rtti; +int spine_bone_timeline_get_bone_index(spine_bone_timeline self) { + return ((BoneTimeline*)self)->getBoneIndex(); } -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 self, int inValue) { + ((BoneTimeline*)self)->setBoneIndex(inValue); } -void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int value) { - if (!obj) return; - BoneTimeline *_obj = (BoneTimeline *) obj; - _obj->setBoneIndex(value); +spine_rtti spine_bone_timeline_rtti(void) { + return (spine_rtti)&BoneTimeline::rtti; } diff --git a/spine-c-new/src/generated/bone_timeline.h b/spine-c-new/src/generated/bone_timeline.h index 5011cb561..07b7f5c4f 100644 --- a/spine-c-new/src/generated/bone_timeline.h +++ b/spine-c-new/src/generated/bone_timeline.h @@ -1,49 +1,22 @@ -/****************************************************************************** - * 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_SPINE_BONE_TIMELINE_H +#define SPINE_SPINE_BONE_TIMELINE_H -#ifndef SPINE_C_BONETIMELINE_H -#define SPINE_C_BONETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_bone_timeline_dispose(spine_bone_timeline self); -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_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); +SPINE_C_API spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline self); +SPINE_C_API int spine_bone_timeline_get_bone_index(spine_bone_timeline self); +SPINE_C_API void spine_bone_timeline_set_bone_index(spine_bone_timeline self, int inValue); +SPINE_C_API spine_rtti spine_bone_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_timeline1.cpp b/spine-c-new/src/generated/bone_timeline1.cpp index 8aa640529..5d0f99a71 100644 --- a/spine-c-new/src/generated/bone_timeline1.cpp +++ b/spine-c-new/src/generated/bone_timeline1.cpp @@ -1,101 +1,92 @@ -/****************************************************************************** - * 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 "bone_timeline1.h" #include using namespace spine; -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; +void spine_bone_timeline1_dispose(spine_bone_timeline1 self) { + delete (BoneTimeline1*)self; } -void spine_bone_timeline1_dispose(spine_bone_timeline1 obj) { - if (!obj) return; - delete (BoneTimeline1 *) obj; +spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 self) { + return (spine_rtti)&((BoneTimeline1*)self)->getRTTI(); } -spine_rtti spine_bone_timeline1_get_rtti() { - return (spine_rtti) &BoneTimeline1::rtti; +void spine_bone_timeline1_apply(spine_bone_timeline1 self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_bone_timeline1_set_frame(spine_bone_timeline1 self, size_t frame, float time, float value) { + ((CurveTimeline1*)(BoneTimeline1*)self)->setFrame(frame, time, 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); +float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 self, float time) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getCurveValue(time); } -float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 obj, float time) { - if (!obj) return 0; - BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getCurveValue(time); +float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getRelativeValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup); +float spine_bone_timeline1_get_absolute_value_1(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->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) { - if (!obj) return 0; - BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); +float spine_bone_timeline1_get_absolute_value_2(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup, 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, (MixBlend) blend, current, setup, value); +float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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, (MixBlend) blend, (MixDirection) direction, current, setup); +void spine_bone_timeline1_set_linear(spine_bone_timeline1 self, size_t frame) { + ((CurveTimeline1*)(BoneTimeline1*)self)->setLinear(frame); } -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_stepped(spine_bone_timeline1 self, size_t frame) { + ((CurveTimeline1*)(BoneTimeline1*)self)->setStepped(frame); } -void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int value) { - if (!obj) return; - BoneTimeline1 *_obj = (BoneTimeline1 *) obj; - _obj->setBoneIndex(value); +void spine_bone_timeline1_set_bezier(spine_bone_timeline1 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline1*)(BoneTimeline1*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_bone_timeline1_get_bezier_value(spine_bone_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_bone_timeline1_get_curves(spine_bone_timeline1 self) { + return (spine_array_float)&((CurveTimeline1*)(BoneTimeline1*)self)->getCurves(); +} + +size_t spine_bone_timeline1_get_frame_entries(spine_bone_timeline1 self) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getFrameEntries(); +} + +size_t spine_bone_timeline1_get_frame_count(spine_bone_timeline1 self) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getFrameCount(); +} + +spine_array_float spine_bone_timeline1_get_frames(spine_bone_timeline1 self) { + return (spine_array_float)&((CurveTimeline1*)(BoneTimeline1*)self)->getFrames(); +} + +float spine_bone_timeline1_get_duration(spine_bone_timeline1 self) { + return ((CurveTimeline1*)(BoneTimeline1*)self)->getDuration(); +} + +spine_array_property_id spine_bone_timeline1_get_property_ids(spine_bone_timeline1 self) { + return (spine_array_property_id)&((CurveTimeline1*)(BoneTimeline1*)self)->getPropertyIds(); +} + +int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 self) { + return ((BoneTimeline*)(BoneTimeline1*)self)->getBoneIndex(); +} + +void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 self, int inValue) { + ((BoneTimeline*)(BoneTimeline1*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_bone_timeline1_rtti(void) { + return (spine_rtti)&BoneTimeline1::rtti; } diff --git a/spine-c-new/src/generated/bone_timeline1.h b/spine-c-new/src/generated/bone_timeline1.h index 91f48e2d5..1e05db091 100644 --- a/spine-c-new/src/generated/bone_timeline1.h +++ b/spine-c-new/src/generated/bone_timeline1.h @@ -1,56 +1,39 @@ -/****************************************************************************** - * 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_SPINE_BONE_TIMELINE1_H +#define SPINE_SPINE_BONE_TIMELINE1_H -#ifndef SPINE_C_BONETIMELINE1_H -#define SPINE_C_BONETIMELINE1_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_bone_timeline1_dispose(spine_bone_timeline1 self); -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_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_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 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); +SPINE_C_API spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 self); +SPINE_C_API void spine_bone_timeline1_apply(spine_bone_timeline1 self, 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_API void spine_bone_timeline1_set_frame(spine_bone_timeline1 self, size_t frame, float time, float value); +SPINE_C_API float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 self, float time); +SPINE_C_API float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_bone_timeline1_get_absolute_value_1(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_bone_timeline1_get_absolute_value_2(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_bone_timeline1_set_linear(spine_bone_timeline1 self, size_t frame); +SPINE_C_API void spine_bone_timeline1_set_stepped(spine_bone_timeline1 self, size_t frame); +SPINE_C_API void spine_bone_timeline1_set_bezier(spine_bone_timeline1 self, 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_API float spine_bone_timeline1_get_bezier_value(spine_bone_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_bone_timeline1_get_curves(spine_bone_timeline1 self); +SPINE_C_API size_t spine_bone_timeline1_get_frame_entries(spine_bone_timeline1 self); +SPINE_C_API size_t spine_bone_timeline1_get_frame_count(spine_bone_timeline1 self); +SPINE_C_API spine_array_float spine_bone_timeline1_get_frames(spine_bone_timeline1 self); +SPINE_C_API float spine_bone_timeline1_get_duration(spine_bone_timeline1 self); +SPINE_C_API spine_array_property_id spine_bone_timeline1_get_property_ids(spine_bone_timeline1 self); +SPINE_C_API int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 self); +SPINE_C_API void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 self, int inValue); +SPINE_C_API spine_rtti spine_bone_timeline1_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONETIMELINE1_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_TIMELINE1_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bone_timeline2.cpp b/spine-c-new/src/generated/bone_timeline2.cpp index 80c9e6739..5b2cb6123 100644 --- a/spine-c-new/src/generated/bone_timeline2.cpp +++ b/spine-c-new/src/generated/bone_timeline2.cpp @@ -1,77 +1,76 @@ -/****************************************************************************** - * 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 "bone_timeline2.h" #include using namespace spine; -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; +void spine_bone_timeline2_dispose(spine_bone_timeline2 self) { + delete (BoneTimeline2*)self; } -void spine_bone_timeline2_dispose(spine_bone_timeline2 obj) { - if (!obj) return; - delete (BoneTimeline2 *) obj; +spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 self) { + return (spine_rtti)&((BoneTimeline2*)self)->getRTTI(); } -spine_rtti spine_bone_timeline2_get_rtti() { - return (spine_rtti) &BoneTimeline2::rtti; +void spine_bone_timeline2_apply(spine_bone_timeline2 self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline2*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_bone_timeline2_set_frame(spine_bone_timeline2 self, size_t frame, float time, float value1, float value2) { + ((CurveTimeline2*)(BoneTimeline2*)self)->setFrame(frame, time, value1, 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); +float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 self, float time) { + return ((CurveTimeline2*)(BoneTimeline2*)self)->getCurveValue(time); } -float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 obj, float time) { - if (!obj) return 0; - BoneTimeline2 *_obj = (BoneTimeline2 *) obj; - return _obj->getCurveValue(time); +void spine_bone_timeline2_set_linear(spine_bone_timeline2 self, size_t frame) { + ((CurveTimeline2*)(BoneTimeline2*)self)->setLinear(frame); } -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_stepped(spine_bone_timeline2 self, size_t frame) { + ((CurveTimeline2*)(BoneTimeline2*)self)->setStepped(frame); } -void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int value) { - if (!obj) return; - BoneTimeline2 *_obj = (BoneTimeline2 *) obj; - _obj->setBoneIndex(value); +void spine_bone_timeline2_set_bezier(spine_bone_timeline2 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline2*)(BoneTimeline2*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_bone_timeline2_get_bezier_value(spine_bone_timeline2 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline2*)(BoneTimeline2*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_bone_timeline2_get_curves(spine_bone_timeline2 self) { + return (spine_array_float)&((CurveTimeline2*)(BoneTimeline2*)self)->getCurves(); +} + +size_t spine_bone_timeline2_get_frame_entries(spine_bone_timeline2 self) { + return ((CurveTimeline2*)(BoneTimeline2*)self)->getFrameEntries(); +} + +size_t spine_bone_timeline2_get_frame_count(spine_bone_timeline2 self) { + return ((CurveTimeline2*)(BoneTimeline2*)self)->getFrameCount(); +} + +spine_array_float spine_bone_timeline2_get_frames(spine_bone_timeline2 self) { + return (spine_array_float)&((CurveTimeline2*)(BoneTimeline2*)self)->getFrames(); +} + +float spine_bone_timeline2_get_duration(spine_bone_timeline2 self) { + return ((CurveTimeline2*)(BoneTimeline2*)self)->getDuration(); +} + +spine_array_property_id spine_bone_timeline2_get_property_ids(spine_bone_timeline2 self) { + return (spine_array_property_id)&((CurveTimeline2*)(BoneTimeline2*)self)->getPropertyIds(); +} + +int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 self) { + return ((BoneTimeline*)(BoneTimeline2*)self)->getBoneIndex(); +} + +void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 self, int inValue) { + ((BoneTimeline*)(BoneTimeline2*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_bone_timeline2_rtti(void) { + return (spine_rtti)&BoneTimeline2::rtti; } diff --git a/spine-c-new/src/generated/bone_timeline2.h b/spine-c-new/src/generated/bone_timeline2.h index bd5337ad0..d1f98f768 100644 --- a/spine-c-new/src/generated/bone_timeline2.h +++ b/spine-c-new/src/generated/bone_timeline2.h @@ -1,52 +1,35 @@ -/****************************************************************************** - * 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_SPINE_BONE_TIMELINE2_H +#define SPINE_SPINE_BONE_TIMELINE2_H -#ifndef SPINE_C_BONETIMELINE2_H -#define SPINE_C_BONETIMELINE2_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_bone_timeline2_dispose(spine_bone_timeline2 self); -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_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 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); +SPINE_C_API spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 self); +SPINE_C_API void spine_bone_timeline2_apply(spine_bone_timeline2 self, 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_API void spine_bone_timeline2_set_frame(spine_bone_timeline2 self, size_t frame, float time, float value1, float value2); +SPINE_C_API float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 self, float time); +SPINE_C_API void spine_bone_timeline2_set_linear(spine_bone_timeline2 self, size_t frame); +SPINE_C_API void spine_bone_timeline2_set_stepped(spine_bone_timeline2 self, size_t frame); +SPINE_C_API void spine_bone_timeline2_set_bezier(spine_bone_timeline2 self, 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_API float spine_bone_timeline2_get_bezier_value(spine_bone_timeline2 self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_bone_timeline2_get_curves(spine_bone_timeline2 self); +SPINE_C_API size_t spine_bone_timeline2_get_frame_entries(spine_bone_timeline2 self); +SPINE_C_API size_t spine_bone_timeline2_get_frame_count(spine_bone_timeline2 self); +SPINE_C_API spine_array_float spine_bone_timeline2_get_frames(spine_bone_timeline2 self); +SPINE_C_API float spine_bone_timeline2_get_duration(spine_bone_timeline2 self); +SPINE_C_API spine_array_property_id spine_bone_timeline2_get_property_ids(spine_bone_timeline2 self); +SPINE_C_API int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 self); +SPINE_C_API void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 self, int inValue); +SPINE_C_API spine_rtti spine_bone_timeline2_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BONETIMELINE2_H \ No newline at end of file +#endif /* SPINE_SPINE_BONE_TIMELINE2_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/bounding_box_attachment.cpp b/spine-c-new/src/generated/bounding_box_attachment.cpp index 8b70fbdae..29523f744 100644 --- a/spine-c-new/src/generated/bounding_box_attachment.cpp +++ b/spine-c-new/src/generated/bounding_box_attachment.cpp @@ -1,143 +1,92 @@ -/****************************************************************************** - * 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 "bounding_box_attachment.h" #include using namespace spine; 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; + return (spine_bounding_box_attachment) new (__FILE__, __LINE__) BoundingBoxAttachment(*((const String*)name)); } -void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment obj) { - if (!obj) return; - delete (BoundingBoxAttachment *) obj; +void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment self) { + delete (BoundingBoxAttachment*)self; } -spine_rtti spine_bounding_box_attachment_get_rtti() { - return (spine_rtti) &BoundingBoxAttachment::rtti; +spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment self) { + return (spine_rtti)&((BoundingBoxAttachment*)self)->getRTTI(); } -spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment obj) { - if (!obj) return (spine_color) 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment self) { + return (spine_color)&((BoundingBoxAttachment*)self)->getColor(); } -spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment obj) { - if (!obj) return (spine_attachment) 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (spine_attachment) _obj->copy(); +spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment self) { + return (spine_attachment)((BoundingBoxAttachment*)self)->copy(); } -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*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); +void spine_bounding_box_attachment_compute_world_vertices_1(spine_bounding_box_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, worldVertices, offset, 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*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); +void spine_bounding_box_attachment_compute_world_vertices_2(spine_bounding_box_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, *((Array*)worldVertices), offset, stride); } -int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj) { - if (!obj) return 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return _obj->getId(); +int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment self) { + return ((VertexAttachment*)(BoundingBoxAttachment*)self)->getId(); } -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(); +spine_array_int spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment self) { + return (spine_array_int)&((VertexAttachment*)(BoundingBoxAttachment*)self)->getBones(); } -int *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (int *) _obj->getBones().buffer(); +void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment self, spine_array_int bones) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->setBones(*((Array*)bones)); } -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((Array &) value); +spine_array_float spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment self) { + return (spine_array_float)&((VertexAttachment*)(BoundingBoxAttachment*)self)->getVertices(); } -int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attachment obj) { - if (!obj) return 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (int32_t) _obj->getVertices().size(); +void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment self, spine_array_float vertices) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->setVertices(*((Array*)vertices)); } -float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) { - if (!obj) return nullptr; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (float *) _obj->getVertices().buffer(); +size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment self) { + return ((VertexAttachment*)(BoundingBoxAttachment*)self)->getWorldVerticesLength(); } -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((Array &) value); +void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment self, size_t inValue) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->setWorldVerticesLength(inValue); } -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(); +spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment self) { + return (spine_attachment)((VertexAttachment*)(BoundingBoxAttachment*)self)->getTimelineAttachment(); } -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); +void spine_bounding_box_attachment_set_timeline_attachment(spine_bounding_box_attachment self, spine_attachment attachment) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->setTimelineAttachment((Attachment *)attachment); } -spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment obj) { - if (!obj) return (spine_attachment) 0; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - return (spine_attachment) _obj->getTimelineAttachment(); +void spine_bounding_box_attachment_copy_to(spine_bounding_box_attachment self, spine_vertex_attachment other) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->copyTo((VertexAttachment *)other); } -void spine_bounding_box_attachment_set_timeline_attachment(spine_bounding_box_attachment obj, spine_attachment value) { - if (!obj) return; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->setTimelineAttachment((Attachment *) value); +const char* spine_bounding_box_attachment_get_name(spine_bounding_box_attachment self) { + return (const char*)&((VertexAttachment*)(BoundingBoxAttachment*)self)->getName(); } -void spine_bounding_box_attachment_copy_to(spine_bounding_box_attachment obj, spine_vertex_attachment other) { - if (!obj) return ; - BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj; - _obj->copyTo((VertexAttachment *) other); +int spine_bounding_box_attachment_get_ref_count(spine_bounding_box_attachment self) { + return ((VertexAttachment*)(BoundingBoxAttachment*)self)->getRefCount(); +} + +void spine_bounding_box_attachment_reference(spine_bounding_box_attachment self) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->reference(); +} + +void spine_bounding_box_attachment_dereference(spine_bounding_box_attachment self) { + ((VertexAttachment*)(BoundingBoxAttachment*)self)->dereference(); +} + +spine_rtti spine_bounding_box_attachment_rtti(void) { + return (spine_rtti)&BoundingBoxAttachment::rtti; } diff --git a/spine-c-new/src/generated/bounding_box_attachment.h b/spine-c-new/src/generated/bounding_box_attachment.h index 7f94146d9..d5331f466 100644 --- a/spine-c-new/src/generated/bounding_box_attachment.h +++ b/spine-c-new/src/generated/bounding_box_attachment.h @@ -1,63 +1,40 @@ -/****************************************************************************** - * 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_SPINE_BOUNDING_BOX_ATTACHMENT_H +#define SPINE_SPINE_BOUNDING_BOX_ATTACHMENT_H -#ifndef SPINE_C_BOUNDINGBOXATTACHMENT_H -#define SPINE_C_BOUNDINGBOXATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_bounding_box_attachment spine_bounding_box_attachment_create(const char* 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_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, 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 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 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); +SPINE_C_API void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment self); + +SPINE_C_API spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment self); +SPINE_C_API spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment self); +SPINE_C_API spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_compute_world_vertices_1(spine_bounding_box_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_bounding_box_attachment_compute_world_vertices_2(spine_bounding_box_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment self); +SPINE_C_API spine_array_int spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment self, spine_array_int bones); +SPINE_C_API spine_array_float spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment self, spine_array_float vertices); +SPINE_C_API size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment self, size_t inValue); +SPINE_C_API spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_set_timeline_attachment(spine_bounding_box_attachment self, spine_attachment attachment); +SPINE_C_API void spine_bounding_box_attachment_copy_to(spine_bounding_box_attachment self, spine_vertex_attachment other); +SPINE_C_API const char* spine_bounding_box_attachment_get_name(spine_bounding_box_attachment self); +SPINE_C_API int spine_bounding_box_attachment_get_ref_count(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_reference(spine_bounding_box_attachment self); +SPINE_C_API void spine_bounding_box_attachment_dereference(spine_bounding_box_attachment self); +SPINE_C_API spine_rtti spine_bounding_box_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_BOUNDINGBOXATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_BOUNDING_BOX_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/clipping_attachment.cpp b/spine-c-new/src/generated/clipping_attachment.cpp index d016888df..404369713 100644 --- a/spine-c-new/src/generated/clipping_attachment.cpp +++ b/spine-c-new/src/generated/clipping_attachment.cpp @@ -1,155 +1,100 @@ -/****************************************************************************** - * 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 "clipping_attachment.h" #include using namespace spine; spine_clipping_attachment spine_clipping_attachment_create(const char* name) { - ClippingAttachment *obj = new (__FILE__, __LINE__) ClippingAttachment(String(name)); - return (spine_clipping_attachment) obj; + return (spine_clipping_attachment) new (__FILE__, __LINE__) ClippingAttachment(*((const String*)name)); } -void spine_clipping_attachment_dispose(spine_clipping_attachment obj) { - if (!obj) return; - delete (ClippingAttachment *) obj; +void spine_clipping_attachment_dispose(spine_clipping_attachment self) { + delete (ClippingAttachment*)self; } -spine_rtti spine_clipping_attachment_get_rtti() { - return (spine_rtti) &ClippingAttachment::rtti; +spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment self) { + return (spine_rtti)&((ClippingAttachment*)self)->getRTTI(); } -spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment obj) { - if (!obj) return (spine_slot_data) 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_slot_data) _obj->getEndSlot(); +spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment self) { + return (spine_slot_data)((ClippingAttachment*)self)->getEndSlot(); } -void spine_clipping_attachment_set_end_slot(spine_clipping_attachment obj, spine_slot_data value) { - if (!obj) return; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setEndSlot((SlotData *) value); +void spine_clipping_attachment_set_end_slot(spine_clipping_attachment self, spine_slot_data inValue) { + ((ClippingAttachment*)self)->setEndSlot((SlotData *)inValue); } -spine_color spine_clipping_attachment_get_color(spine_clipping_attachment obj) { - if (!obj) return (spine_color) 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_clipping_attachment_get_color(spine_clipping_attachment self) { + return (spine_color)&((ClippingAttachment*)self)->getColor(); } -spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment obj) { - if (!obj) return (spine_attachment) 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_attachment) _obj->copy(); +spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment self) { + return (spine_attachment)((ClippingAttachment*)self)->copy(); } -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*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); +void spine_clipping_attachment_compute_world_vertices_1(spine_clipping_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(ClippingAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, worldVertices, offset, 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*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); +void spine_clipping_attachment_compute_world_vertices_2(spine_clipping_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(ClippingAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, *((Array*)worldVertices), offset, stride); } -int spine_clipping_attachment_get_id(spine_clipping_attachment obj) { - if (!obj) return 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return _obj->getId(); +int spine_clipping_attachment_get_id(spine_clipping_attachment self) { + return ((VertexAttachment*)(ClippingAttachment*)self)->getId(); } -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(); +spine_array_int spine_clipping_attachment_get_bones(spine_clipping_attachment self) { + return (spine_array_int)&((VertexAttachment*)(ClippingAttachment*)self)->getBones(); } -int *spine_clipping_attachment_get_bones(spine_clipping_attachment obj) { - if (!obj) return nullptr; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (int *) _obj->getBones().buffer(); +void spine_clipping_attachment_set_bones(spine_clipping_attachment self, spine_array_int bones) { + ((VertexAttachment*)(ClippingAttachment*)self)->setBones(*((Array*)bones)); } -void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, spine_array_int value) { - if (!obj) return; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setBones((Array &) value); +spine_array_float spine_clipping_attachment_get_vertices(spine_clipping_attachment self) { + return (spine_array_float)&((VertexAttachment*)(ClippingAttachment*)self)->getVertices(); } -int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj) { - if (!obj) return 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (int32_t) _obj->getVertices().size(); +void spine_clipping_attachment_set_vertices(spine_clipping_attachment self, spine_array_float vertices) { + ((VertexAttachment*)(ClippingAttachment*)self)->setVertices(*((Array*)vertices)); } -float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) { - if (!obj) return nullptr; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (float *) _obj->getVertices().buffer(); +size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment self) { + return ((VertexAttachment*)(ClippingAttachment*)self)->getWorldVerticesLength(); } -void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, spine_array_float value) { - if (!obj) return; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setVertices((Array &) value); +void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment self, size_t inValue) { + ((VertexAttachment*)(ClippingAttachment*)self)->setWorldVerticesLength(inValue); } -size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj) { - if (!obj) return 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return _obj->getWorldVerticesLength(); +spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment self) { + return (spine_attachment)((VertexAttachment*)(ClippingAttachment*)self)->getTimelineAttachment(); } -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); +void spine_clipping_attachment_set_timeline_attachment(spine_clipping_attachment self, spine_attachment attachment) { + ((VertexAttachment*)(ClippingAttachment*)self)->setTimelineAttachment((Attachment *)attachment); } -spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment obj) { - if (!obj) return (spine_attachment) 0; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - return (spine_attachment) _obj->getTimelineAttachment(); +void spine_clipping_attachment_copy_to(spine_clipping_attachment self, spine_vertex_attachment other) { + ((VertexAttachment*)(ClippingAttachment*)self)->copyTo((VertexAttachment *)other); } -void spine_clipping_attachment_set_timeline_attachment(spine_clipping_attachment obj, spine_attachment value) { - if (!obj) return; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->setTimelineAttachment((Attachment *) value); +const char* spine_clipping_attachment_get_name(spine_clipping_attachment self) { + return (const char*)&((VertexAttachment*)(ClippingAttachment*)self)->getName(); } -void spine_clipping_attachment_copy_to(spine_clipping_attachment obj, spine_vertex_attachment other) { - if (!obj) return ; - ClippingAttachment *_obj = (ClippingAttachment *) obj; - _obj->copyTo((VertexAttachment *) other); +int spine_clipping_attachment_get_ref_count(spine_clipping_attachment self) { + return ((VertexAttachment*)(ClippingAttachment*)self)->getRefCount(); +} + +void spine_clipping_attachment_reference(spine_clipping_attachment self) { + ((VertexAttachment*)(ClippingAttachment*)self)->reference(); +} + +void spine_clipping_attachment_dereference(spine_clipping_attachment self) { + ((VertexAttachment*)(ClippingAttachment*)self)->dereference(); +} + +spine_rtti spine_clipping_attachment_rtti(void) { + return (spine_rtti)&ClippingAttachment::rtti; } diff --git a/spine-c-new/src/generated/clipping_attachment.h b/spine-c-new/src/generated/clipping_attachment.h index 44e6ad402..b5ec79643 100644 --- a/spine-c-new/src/generated/clipping_attachment.h +++ b/spine-c-new/src/generated/clipping_attachment.h @@ -1,65 +1,42 @@ -/****************************************************************************** - * 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_SPINE_CLIPPING_ATTACHMENT_H +#define SPINE_SPINE_CLIPPING_ATTACHMENT_H -#ifndef SPINE_C_CLIPPINGATTACHMENT_H -#define SPINE_C_CLIPPINGATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_clipping_attachment spine_clipping_attachment_create(const char* 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_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, 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 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 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); +SPINE_C_API void spine_clipping_attachment_dispose(spine_clipping_attachment self); + +SPINE_C_API spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment self); +SPINE_C_API spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_set_end_slot(spine_clipping_attachment self, spine_slot_data inValue); +SPINE_C_API spine_color spine_clipping_attachment_get_color(spine_clipping_attachment self); +SPINE_C_API spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_compute_world_vertices_1(spine_clipping_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_clipping_attachment_compute_world_vertices_2(spine_clipping_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API int spine_clipping_attachment_get_id(spine_clipping_attachment self); +SPINE_C_API spine_array_int spine_clipping_attachment_get_bones(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_set_bones(spine_clipping_attachment self, spine_array_int bones); +SPINE_C_API spine_array_float spine_clipping_attachment_get_vertices(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_set_vertices(spine_clipping_attachment self, spine_array_float vertices); +SPINE_C_API size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment self, size_t inValue); +SPINE_C_API spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_set_timeline_attachment(spine_clipping_attachment self, spine_attachment attachment); +SPINE_C_API void spine_clipping_attachment_copy_to(spine_clipping_attachment self, spine_vertex_attachment other); +SPINE_C_API const char* spine_clipping_attachment_get_name(spine_clipping_attachment self); +SPINE_C_API int spine_clipping_attachment_get_ref_count(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_reference(spine_clipping_attachment self); +SPINE_C_API void spine_clipping_attachment_dereference(spine_clipping_attachment self); +SPINE_C_API spine_rtti spine_clipping_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CLIPPINGATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_CLIPPING_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/color.cpp b/spine-c-new/src/generated/color.cpp index 1ede6bbdb..05991c520 100644 --- a/spine-c-new/src/generated/color.cpp +++ b/spine-c-new/src/generated/color.cpp @@ -1,90 +1,88 @@ -/****************************************************************************** - * 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 "color.h" #include using namespace spine; spine_color spine_color_create(void) { - Color *obj = new (__FILE__, __LINE__) Color(); - return (spine_color) obj; + return (spine_color) new (__FILE__, __LINE__) Color(); } -spine_color spine_color_create_with_float_float_float_float(float r, float g, float b, float a) { - Color *obj = new (__FILE__, __LINE__) Color(r, g, b, a); - return (spine_color) obj; +spine_color spine_color_create2(float r, float g, float b, float a) { + return (spine_color) new (__FILE__, __LINE__) Color(r, g, b, a); } -void spine_color_dispose(spine_color obj) { - if (!obj) return; - delete (Color *) obj; +void spine_color_dispose(spine_color self) { + delete (Color*)self; } -spine_color spine_color_set(spine_color obj, float _r, float _g, float _b, float _a) { - if (!obj) return (spine_color) 0; - Color *_obj = (Color *) obj; - return (spine_color) &_obj->set(_r, _g, _b, _a); +spine_color spine_color_set_1(spine_color self, float _r, float _g, float _b, float _a) { + return (spine_color)&((Color*)self)->set(_r, _g, _b, _a); } -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); +spine_color spine_color_set_2(spine_color self, float _r, float _g, float _b) { + return (spine_color)&((Color*)self)->set(_r, _g, _b); } -void spine_color_set(spine_color obj, spine_color value) { - if (!obj) return; - Color *_obj = (Color *) obj; - _obj->set(value); +spine_color spine_color_set_3(spine_color self, spine_color other) { + return (spine_color)&((Color*)self)->set(*((const Color*)other)); } -spine_color spine_color_add(spine_color obj, float _r, float _g, float _b, float _a) { - if (!obj) return (spine_color) 0; - Color *_obj = (Color *) obj; - return (spine_color) &_obj->add(_r, _g, _b, _a); +spine_color spine_color_add_1(spine_color self, float _r, float _g, float _b, float _a) { + return (spine_color)&((Color*)self)->add(_r, _g, _b, _a); } -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_2(spine_color self, float _r, float _g, float _b) { + return (spine_color)&((Color*)self)->add(_r, _g, _b); } -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(*(Color*) other); +spine_color spine_color_add_3(spine_color self, spine_color other) { + return (spine_color)&((Color*)self)->add(*((const Color*)other)); } -spine_color spine_color_clamp(spine_color obj) { - if (!obj) return (spine_color) 0; - Color *_obj = (Color *) obj; - return (spine_color) &_obj->clamp(); +spine_color spine_color_clamp(spine_color self) { + return (spine_color)&((Color*)self)->clamp(); +} + +float spine_color_parse_hex(const char * value, size_t index) { + return Color::parseHex(value, index); +} + +void spine_color_rgba8888_to_color(spine_color color, int value) { + Color::rgba8888ToColor(*((Color*)color), value); +} + +void spine_color_rgb888_to_color(spine_color color, int value) { + Color::rgb888ToColor(*((Color*)color), value); +} + +float spine_color_get_r(spine_color self) { + return ((Color*)self)->r; +} + +void spine_color_set_r(spine_color self, float value) { + ((Color*)self)->r = value; +} + +float spine_color_get_g(spine_color self) { + return ((Color*)self)->g; +} + +void spine_color_set_g(spine_color self, float value) { + ((Color*)self)->g = value; +} + +float spine_color_get_b(spine_color self) { + return ((Color*)self)->b; +} + +void spine_color_set_b(spine_color self, float value) { + ((Color*)self)->b = value; +} + +float spine_color_get_a(spine_color self) { + return ((Color*)self)->a; +} + +void spine_color_set_a(spine_color self, float value) { + ((Color*)self)->a = value; } diff --git a/spine-c-new/src/generated/color.h b/spine-c-new/src/generated/color.h index c7745a496..e7960e98c 100644 --- a/spine-c-new/src/generated/color.h +++ b/spine-c-new/src/generated/color.h @@ -1,54 +1,39 @@ -/****************************************************************************** - * 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_SPINE_COLOR_H +#define SPINE_SPINE_COLOR_H -#ifndef SPINE_C_COLOR_H -#define SPINE_C_COLOR_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_color spine_color_create(void); +SPINE_C_API spine_color spine_color_create2(float r, float g, float b, float a); -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_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_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); +SPINE_C_API void spine_color_dispose(spine_color self); + +SPINE_C_API spine_color spine_color_set_1(spine_color self, float _r, float _g, float _b, float _a); +SPINE_C_API spine_color spine_color_set_2(spine_color self, float _r, float _g, float _b); +SPINE_C_API spine_color spine_color_set_3(spine_color self, spine_color other); +SPINE_C_API spine_color spine_color_add_1(spine_color self, float _r, float _g, float _b, float _a); +SPINE_C_API spine_color spine_color_add_2(spine_color self, float _r, float _g, float _b); +SPINE_C_API spine_color spine_color_add_3(spine_color self, spine_color other); +SPINE_C_API spine_color spine_color_clamp(spine_color self); +SPINE_C_API float spine_color_parse_hex(const char * value, size_t index); +SPINE_C_API void spine_color_rgba8888_to_color(spine_color color, int value); +SPINE_C_API void spine_color_rgb888_to_color(spine_color color, int value); +SPINE_C_API float spine_color_get_r(spine_color self); +SPINE_C_API void spine_color_set_r(spine_color self, float value); +SPINE_C_API float spine_color_get_g(spine_color self); +SPINE_C_API void spine_color_set_g(spine_color self, float value); +SPINE_C_API float spine_color_get_b(spine_color self); +SPINE_C_API void spine_color_set_b(spine_color self, float value); +SPINE_C_API float spine_color_get_a(spine_color self); +SPINE_C_API void spine_color_set_a(spine_color self, float value); #ifdef __cplusplus } #endif -#endif // SPINE_C_COLOR_H \ No newline at end of file +#endif /* SPINE_SPINE_COLOR_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/constraint.cpp b/spine-c-new/src/generated/constraint.cpp index a724081d3..0590b0603 100644 --- a/spine-c-new/src/generated/constraint.cpp +++ b/spine-c-new/src/generated/constraint.cpp @@ -1,78 +1,32 @@ -/****************************************************************************** - * 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.h" #include using namespace spine; -void spine_constraint_dispose(spine_constraint obj) { - if (!obj) return; - delete (Constraint *) obj; +void spine_constraint_dispose(spine_constraint self) { + delete (Constraint*)self; } -spine_rtti spine_constraint_get_rtti() { - return (spine_rtti) &Constraint::rtti; +spine_rtti spine_constraint_get_rtti(spine_constraint self) { + return (spine_rtti)&((Constraint*)self)->getRTTI(); } -spine_constraint_data spine_constraint_get_data(spine_constraint obj) { - if (!obj) return 0; - Constraint *_obj = (Constraint *) obj; - return (spine_constraint_data) &_obj->getData(); +spine_constraint_data spine_constraint_get_data(spine_constraint self) { + return (spine_constraint_data)&((Constraint*)self)->getData(); } -void spine_constraint_sort(spine_constraint obj, spine_skeleton skeleton) { - if (!obj) return ; - Constraint *_obj = (Constraint *) obj; - _obj->sort(*(Skeleton*) skeleton); +void spine_constraint_sort(spine_constraint self, spine_skeleton skeleton) { + ((Constraint*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_constraint_is_source_active(spine_constraint obj) { - if (!obj) return false; - Constraint *_obj = (Constraint *) obj; - return _obj->isSourceActive(); +bool spine_constraint_is_source_active(spine_constraint self) { + return ((Constraint*)self)->isSourceActive(); } -void spine_constraint_pose(spine_constraint obj) { - if (!obj) return ; - Constraint *_obj = (Constraint *) obj; - _obj->pose(); +void spine_constraint_update(spine_constraint self, spine_skeleton skeleton, spine_physics physics) { + ((Constraint*)self)->update(*((Skeleton*)skeleton), (Physics)physics); } -void spine_constraint_setup_pose(spine_constraint obj) { - if (!obj) return ; - Constraint *_obj = (Constraint *) obj; - _obj->setupPose(); -} - -void spine_constraint_update(spine_constraint obj, spine_skeleton skeleton, spine_physics physics) { - if (!obj) return ; - Constraint *_obj = (Constraint *) obj; - _obj->update(*(Skeleton*) skeleton, (Physics) physics); +spine_rtti spine_constraint_rtti(void) { + return (spine_rtti)&Constraint::rtti; } diff --git a/spine-c-new/src/generated/constraint.h b/spine-c-new/src/generated/constraint.h index 17094bfcf..0e9ab880a 100644 --- a/spine-c-new/src/generated/constraint.h +++ b/spine-c-new/src/generated/constraint.h @@ -1,52 +1,24 @@ -/****************************************************************************** - * 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_SPINE_CONSTRAINT_H +#define SPINE_SPINE_CONSTRAINT_H -#ifndef SPINE_C_CONSTRAINT_H -#define SPINE_C_CONSTRAINT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_constraint_dispose(spine_constraint self); -SPINE_C_EXPORT void spine_constraint_dispose(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 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); +SPINE_C_API spine_rtti spine_constraint_get_rtti(spine_constraint self); +SPINE_C_API spine_constraint_data spine_constraint_get_data(spine_constraint self); +SPINE_C_API void spine_constraint_sort(spine_constraint self, spine_skeleton skeleton); +SPINE_C_API bool spine_constraint_is_source_active(spine_constraint self); +SPINE_C_API void spine_constraint_update(spine_constraint self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API spine_rtti spine_constraint_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CONSTRAINT_H \ No newline at end of file +#endif /* SPINE_SPINE_CONSTRAINT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/constraint_data.cpp b/spine-c-new/src/generated/constraint_data.cpp index 30e6df16e..f981678cd 100644 --- a/spine-c-new/src/generated/constraint_data.cpp +++ b/spine-c-new/src/generated/constraint_data.cpp @@ -1,60 +1,28 @@ -/****************************************************************************** - * 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.h" #include using namespace spine; -void spine_constraint_data_dispose(spine_constraint_data obj) { - if (!obj) return; - delete (ConstraintData *) obj; +void spine_constraint_data_dispose(spine_constraint_data self) { + delete (ConstraintData*)self; } -spine_rtti spine_constraint_data_get_rtti() { - return (spine_rtti) &ConstraintData::rtti; +spine_rtti spine_constraint_data_get_rtti(spine_constraint_data self) { + return (spine_rtti)&((ConstraintData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_constraint_data_create_method(spine_constraint_data self, spine_skeleton skeleton) { + return (spine_constraint)((ConstraintData*)self)->create(*((Skeleton*)skeleton)); } -const char* spine_constraint_data_get_name(spine_constraint_data obj) { - if (!obj) return nullptr; - ConstraintData *_obj = (ConstraintData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_constraint_data_get_name(spine_constraint_data self) { + return (const char*)&((ConstraintData*)self)->getName(); } -bool spine_constraint_data_is_skin_required(spine_constraint_data obj) { - if (!obj) return false; - ConstraintData *_obj = (ConstraintData *) obj; - return _obj->isSkinRequired(); +bool spine_constraint_data_is_skin_required(spine_constraint_data self) { + return ((ConstraintData*)self)->isSkinRequired(); +} + +spine_rtti spine_constraint_data_rtti(void) { + return (spine_rtti)&ConstraintData::rtti; } diff --git a/spine-c-new/src/generated/constraint_data.h b/spine-c-new/src/generated/constraint_data.h index d910c5d86..e4ae11486 100644 --- a/spine-c-new/src/generated/constraint_data.h +++ b/spine-c-new/src/generated/constraint_data.h @@ -1,49 +1,23 @@ -/****************************************************************************** - * 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_SPINE_CONSTRAINT_DATA_H +#define SPINE_SPINE_CONSTRAINT_DATA_H -#ifndef SPINE_C_CONSTRAINTDATA_H -#define SPINE_C_CONSTRAINTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_constraint_data_dispose(spine_constraint_data self); -SPINE_C_EXPORT void spine_constraint_data_dispose(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 char* spine_constraint_data_get_name(spine_constraint_data obj); -SPINE_C_EXPORT bool spine_constraint_data_is_skin_required(spine_constraint_data obj); +SPINE_C_API spine_rtti spine_constraint_data_get_rtti(spine_constraint_data self); +SPINE_C_API spine_constraint spine_constraint_data_create_method(spine_constraint_data self, spine_skeleton skeleton); +SPINE_C_API const char* spine_constraint_data_get_name(spine_constraint_data self); +SPINE_C_API bool spine_constraint_data_is_skin_required(spine_constraint_data self); +SPINE_C_API spine_rtti spine_constraint_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CONSTRAINTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_CONSTRAINT_DATA_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 cea4a6e4d..0b2dcb0f4 100644 --- a/spine-c-new/src/generated/constraint_timeline.cpp +++ b/spine-c-new/src/generated/constraint_timeline.cpp @@ -1,59 +1,24 @@ -/****************************************************************************** - * 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_timeline.h" #include using namespace spine; -spine_constraint_timeline spine_constraint_timeline_create(int constraintIndex) { - ConstraintTimeline *obj = new (__FILE__, __LINE__) ConstraintTimeline(constraintIndex); - return (spine_constraint_timeline) obj; +void spine_constraint_timeline_dispose(spine_constraint_timeline self) { + delete (ConstraintTimeline*)self; } -void spine_constraint_timeline_dispose(spine_constraint_timeline obj) { - if (!obj) return; - delete (ConstraintTimeline *) obj; +spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline self) { + return (spine_rtti)&((ConstraintTimeline*)self)->getRTTI(); } -spine_rtti spine_constraint_timeline_get_rtti() { - return (spine_rtti) &ConstraintTimeline::rtti; +int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline self) { + return ((ConstraintTimeline*)self)->getConstraintIndex(); } -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 self, int inValue) { + ((ConstraintTimeline*)self)->setConstraintIndex(inValue); } -void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int value) { - if (!obj) return; - ConstraintTimeline *_obj = (ConstraintTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_constraint_timeline_rtti(void) { + return (spine_rtti)&ConstraintTimeline::rtti; } diff --git a/spine-c-new/src/generated/constraint_timeline.h b/spine-c-new/src/generated/constraint_timeline.h index ef837fe8d..07e5a01d7 100644 --- a/spine-c-new/src/generated/constraint_timeline.h +++ b/spine-c-new/src/generated/constraint_timeline.h @@ -1,49 +1,22 @@ -/****************************************************************************** - * 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_SPINE_CONSTRAINT_TIMELINE_H +#define SPINE_SPINE_CONSTRAINT_TIMELINE_H -#ifndef SPINE_C_CONSTRAINTTIMELINE_H -#define SPINE_C_CONSTRAINTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_constraint_timeline_dispose(spine_constraint_timeline self); -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_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); +SPINE_C_API spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline self); +SPINE_C_API int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline self); +SPINE_C_API void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline self, int inValue); +SPINE_C_API spine_rtti spine_constraint_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CONSTRAINTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_CONSTRAINT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/constraint_timeline1.cpp b/spine-c-new/src/generated/constraint_timeline1.cpp index ee2f6a3c6..d1e0158dc 100644 --- a/spine-c-new/src/generated/constraint_timeline1.cpp +++ b/spine-c-new/src/generated/constraint_timeline1.cpp @@ -1,95 +1,92 @@ -/****************************************************************************** - * 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_timeline1.h" #include using namespace spine; -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; +void spine_constraint_timeline1_dispose(spine_constraint_timeline1 self) { + delete (ConstraintTimeline1*)self; } -void spine_constraint_timeline1_dispose(spine_constraint_timeline1 obj) { - if (!obj) return; - delete (ConstraintTimeline1 *) obj; +spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 self) { + return (spine_rtti)&((ConstraintTimeline1*)self)->getRTTI(); } -spine_rtti spine_constraint_timeline1_get_rtti() { - return (spine_rtti) &ConstraintTimeline1::rtti; +void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 self, size_t frame, float time, float value) { + ((CurveTimeline1*)(ConstraintTimeline1*)self)->setFrame(frame, time, 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); +float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 self, float time) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getCurveValue(time); } -float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 obj, float time) { - if (!obj) return 0; - ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getCurveValue(time); +float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getRelativeValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup); +float spine_constraint_timeline1_get_absolute_value_1(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->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) { - if (!obj) return 0; - ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); +float spine_constraint_timeline1_get_absolute_value_2(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup, 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, (MixBlend) blend, current, setup, value); +float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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, (MixBlend) blend, (MixDirection) direction, current, setup); +void spine_constraint_timeline1_set_linear(spine_constraint_timeline1 self, size_t frame) { + ((CurveTimeline1*)(ConstraintTimeline1*)self)->setLinear(frame); } -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_stepped(spine_constraint_timeline1 self, size_t frame) { + ((CurveTimeline1*)(ConstraintTimeline1*)self)->setStepped(frame); } -void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int value) { - if (!obj) return; - ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj; - _obj->setConstraintIndex(value); +void spine_constraint_timeline1_set_bezier(spine_constraint_timeline1 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline1*)(ConstraintTimeline1*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_constraint_timeline1_get_bezier_value(spine_constraint_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_constraint_timeline1_get_curves(spine_constraint_timeline1 self) { + return (spine_array_float)&((CurveTimeline1*)(ConstraintTimeline1*)self)->getCurves(); +} + +void spine_constraint_timeline1_apply(spine_constraint_timeline1 self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((CurveTimeline1*)(ConstraintTimeline1*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); +} + +size_t spine_constraint_timeline1_get_frame_entries(spine_constraint_timeline1 self) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getFrameEntries(); +} + +size_t spine_constraint_timeline1_get_frame_count(spine_constraint_timeline1 self) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getFrameCount(); +} + +spine_array_float spine_constraint_timeline1_get_frames(spine_constraint_timeline1 self) { + return (spine_array_float)&((CurveTimeline1*)(ConstraintTimeline1*)self)->getFrames(); +} + +float spine_constraint_timeline1_get_duration(spine_constraint_timeline1 self) { + return ((CurveTimeline1*)(ConstraintTimeline1*)self)->getDuration(); +} + +spine_array_property_id spine_constraint_timeline1_get_property_ids(spine_constraint_timeline1 self) { + return (spine_array_property_id)&((CurveTimeline1*)(ConstraintTimeline1*)self)->getPropertyIds(); +} + +int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 self) { + return ((ConstraintTimeline*)(ConstraintTimeline1*)self)->getConstraintIndex(); +} + +void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 self, int inValue) { + ((ConstraintTimeline*)(ConstraintTimeline1*)self)->setConstraintIndex(inValue); +} + +spine_rtti spine_constraint_timeline1_rtti(void) { + return (spine_rtti)&ConstraintTimeline1::rtti; } diff --git a/spine-c-new/src/generated/constraint_timeline1.h b/spine-c-new/src/generated/constraint_timeline1.h index 90d4ec429..dc764a1d7 100644 --- a/spine-c-new/src/generated/constraint_timeline1.h +++ b/spine-c-new/src/generated/constraint_timeline1.h @@ -1,55 +1,39 @@ -/****************************************************************************** - * 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_SPINE_CONSTRAINT_TIMELINE1_H +#define SPINE_SPINE_CONSTRAINT_TIMELINE1_H -#ifndef SPINE_C_CONSTRAINTTIMELINE1_H -#define SPINE_C_CONSTRAINTTIMELINE1_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_constraint_timeline1_dispose(spine_constraint_timeline1 self); -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_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_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 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); +SPINE_C_API spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 self); +SPINE_C_API void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 self, size_t frame, float time, float value); +SPINE_C_API float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 self, float time); +SPINE_C_API float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_constraint_timeline1_get_absolute_value_1(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_constraint_timeline1_get_absolute_value_2(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_constraint_timeline1_set_linear(spine_constraint_timeline1 self, size_t frame); +SPINE_C_API void spine_constraint_timeline1_set_stepped(spine_constraint_timeline1 self, size_t frame); +SPINE_C_API void spine_constraint_timeline1_set_bezier(spine_constraint_timeline1 self, 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_API float spine_constraint_timeline1_get_bezier_value(spine_constraint_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_constraint_timeline1_get_curves(spine_constraint_timeline1 self); +SPINE_C_API void spine_constraint_timeline1_apply(spine_constraint_timeline1 self, 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_API size_t spine_constraint_timeline1_get_frame_entries(spine_constraint_timeline1 self); +SPINE_C_API size_t spine_constraint_timeline1_get_frame_count(spine_constraint_timeline1 self); +SPINE_C_API spine_array_float spine_constraint_timeline1_get_frames(spine_constraint_timeline1 self); +SPINE_C_API float spine_constraint_timeline1_get_duration(spine_constraint_timeline1 self); +SPINE_C_API spine_array_property_id spine_constraint_timeline1_get_property_ids(spine_constraint_timeline1 self); +SPINE_C_API int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 self); +SPINE_C_API void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 self, int inValue); +SPINE_C_API spine_rtti spine_constraint_timeline1_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CONSTRAINTTIMELINE1_H \ No newline at end of file +#endif /* SPINE_SPINE_CONSTRAINT_TIMELINE1_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/curve_timeline.cpp b/spine-c-new/src/generated/curve_timeline.cpp index 0ff3d3348..05f049040 100644 --- a/spine-c-new/src/generated/curve_timeline.cpp +++ b/spine-c-new/src/generated/curve_timeline.cpp @@ -1,126 +1,60 @@ -/****************************************************************************** - * 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 "curve_timeline.h" #include using namespace spine; -void spine_curve_timeline_dispose(spine_curve_timeline obj) { - if (!obj) return; - delete (CurveTimeline *) obj; +void spine_curve_timeline_dispose(spine_curve_timeline self) { + delete (CurveTimeline*)self; } -spine_rtti spine_curve_timeline_get_rtti() { - return (spine_rtti) &CurveTimeline::rtti; +spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline self) { + return (spine_rtti)&((CurveTimeline*)self)->getRTTI(); } -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_linear(spine_curve_timeline self, size_t frame) { + ((CurveTimeline*)self)->setLinear(frame); } -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_stepped(spine_curve_timeline self, size_t frame) { + ((CurveTimeline*)self)->setStepped(frame); } -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); +void spine_curve_timeline_set_bezier(spine_curve_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_curve_timeline_get_bezier_value(spine_curve_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_curve_timeline_get_curves(spine_curve_timeline self) { + return (spine_array_float)&((CurveTimeline*)self)->getCurves(); } -float *spine_curve_timeline_get_curves(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +void spine_curve_timeline_apply(spine_curve_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((Timeline*)(CurveTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline self) { + return ((Timeline*)(CurveTimeline*)self)->getFrameEntries(); } -size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj) { - if (!obj) return 0; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getFrameEntries(); +size_t spine_curve_timeline_get_frame_count(spine_curve_timeline self) { + return ((Timeline*)(CurveTimeline*)self)->getFrameCount(); } -size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj) { - if (!obj) return 0; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getFrameCount(); +spine_array_float spine_curve_timeline_get_frames(spine_curve_timeline self) { + return (spine_array_float)&((Timeline*)(CurveTimeline*)self)->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(); +float spine_curve_timeline_get_duration(spine_curve_timeline self) { + return ((Timeline*)(CurveTimeline*)self)->getDuration(); } -float *spine_curve_timeline_get_frames(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_curve_timeline_get_property_ids(spine_curve_timeline self) { + return (spine_array_property_id)&((Timeline*)(CurveTimeline*)self)->getPropertyIds(); } -float spine_curve_timeline_get_duration(spine_curve_timeline obj) { - if (!obj) return 0; - CurveTimeline *_obj = (CurveTimeline *) obj; - return _obj->getDuration(); -} - -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(); -} - -int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj) { - if (!obj) return nullptr; - CurveTimeline *_obj = (CurveTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_curve_timeline_rtti(void) { + return (spine_rtti)&CurveTimeline::rtti; } diff --git a/spine-c-new/src/generated/curve_timeline.h b/spine-c-new/src/generated/curve_timeline.h index ad810e12c..d574ec439 100644 --- a/spine-c-new/src/generated/curve_timeline.h +++ b/spine-c-new/src/generated/curve_timeline.h @@ -1,60 +1,31 @@ -/****************************************************************************** - * 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_SPINE_CURVE_TIMELINE_H +#define SPINE_SPINE_CURVE_TIMELINE_H -#ifndef SPINE_C_CURVETIMELINE_H -#define SPINE_C_CURVETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_curve_timeline_dispose(spine_curve_timeline self); -SPINE_C_EXPORT void spine_curve_timeline_dispose(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 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 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 int32_t spine_curve_timeline_get_num_property_ids(spine_curve_timeline obj); -SPINE_C_EXPORT int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj); +SPINE_C_API spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline self); +SPINE_C_API void spine_curve_timeline_set_linear(spine_curve_timeline self, size_t frame); +SPINE_C_API void spine_curve_timeline_set_stepped(spine_curve_timeline self, size_t frame); +SPINE_C_API void spine_curve_timeline_set_bezier(spine_curve_timeline self, 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_API float spine_curve_timeline_get_bezier_value(spine_curve_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_curve_timeline_get_curves(spine_curve_timeline self); +SPINE_C_API void spine_curve_timeline_apply(spine_curve_timeline self, 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_API size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline self); +SPINE_C_API size_t spine_curve_timeline_get_frame_count(spine_curve_timeline self); +SPINE_C_API spine_array_float spine_curve_timeline_get_frames(spine_curve_timeline self); +SPINE_C_API float spine_curve_timeline_get_duration(spine_curve_timeline self); +SPINE_C_API spine_array_property_id spine_curve_timeline_get_property_ids(spine_curve_timeline self); +SPINE_C_API spine_rtti spine_curve_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CURVETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_CURVE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/curve_timeline1.cpp b/spine-c-new/src/generated/curve_timeline1.cpp index d8110236c..ac6f10b4a 100644 --- a/spine-c-new/src/generated/curve_timeline1.cpp +++ b/spine-c-new/src/generated/curve_timeline1.cpp @@ -1,162 +1,84 @@ -/****************************************************************************** - * 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 "curve_timeline1.h" #include using namespace spine; -void spine_curve_timeline1_dispose(spine_curve_timeline1 obj) { - if (!obj) return; - delete (CurveTimeline1 *) obj; +void spine_curve_timeline1_dispose(spine_curve_timeline1 self) { + delete (CurveTimeline1*)self; } -spine_rtti spine_curve_timeline1_get_rtti() { - return (spine_rtti) &CurveTimeline1::rtti; +spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 self) { + return (spine_rtti)&((CurveTimeline1*)self)->getRTTI(); } -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); +void spine_curve_timeline1_set_frame(spine_curve_timeline1 self, size_t frame, float time, float value) { + ((CurveTimeline1*)self)->setFrame(frame, time, value); } -float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 obj, float time) { - if (!obj) return 0; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getCurveValue(time); +float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 self, float time) { + return ((CurveTimeline1*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)self)->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, (MixBlend) blend, current, setup); +float spine_curve_timeline1_get_absolute_value_1(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_curve_timeline1_get_absolute_value_2(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((CurveTimeline1*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((CurveTimeline1*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_curve_timeline1 self, size_t frame) { + ((CurveTimeline*)(CurveTimeline1*)self)->setLinear(frame); } -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_stepped(spine_curve_timeline1 self, size_t frame) { + ((CurveTimeline*)(CurveTimeline1*)self)->setStepped(frame); } -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); +void spine_curve_timeline1_set_bezier(spine_curve_timeline1 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(CurveTimeline1*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(CurveTimeline1*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_curve_timeline1_get_curves(spine_curve_timeline1 self) { + return (spine_array_float)&((CurveTimeline*)(CurveTimeline1*)self)->getCurves(); } -float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (float *) _obj->getCurves().buffer(); +void spine_curve_timeline1_apply(spine_curve_timeline1 self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((CurveTimeline*)(CurveTimeline1*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 self) { + return ((CurveTimeline*)(CurveTimeline1*)self)->getFrameEntries(); } -size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj) { - if (!obj) return 0; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getFrameEntries(); +size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 self) { + return ((CurveTimeline*)(CurveTimeline1*)self)->getFrameCount(); } -size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj) { - if (!obj) return 0; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getFrameCount(); +spine_array_float spine_curve_timeline1_get_frames(spine_curve_timeline1 self) { + return (spine_array_float)&((CurveTimeline*)(CurveTimeline1*)self)->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(); +float spine_curve_timeline1_get_duration(spine_curve_timeline1 self) { + return ((CurveTimeline*)(CurveTimeline1*)self)->getDuration(); } -float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_curve_timeline1_get_property_ids(spine_curve_timeline1 self) { + return (spine_array_property_id)&((CurveTimeline*)(CurveTimeline1*)self)->getPropertyIds(); } -float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj) { - if (!obj) return 0; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return _obj->getDuration(); -} - -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(); -} - -int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) { - if (!obj) return nullptr; - CurveTimeline1 *_obj = (CurveTimeline1 *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_curve_timeline1_rtti(void) { + return (spine_rtti)&CurveTimeline1::rtti; } diff --git a/spine-c-new/src/generated/curve_timeline1.h b/spine-c-new/src/generated/curve_timeline1.h index bedcae65a..fae33c302 100644 --- a/spine-c-new/src/generated/curve_timeline1.h +++ b/spine-c-new/src/generated/curve_timeline1.h @@ -1,66 +1,37 @@ -/****************************************************************************** - * 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_SPINE_CURVE_TIMELINE1_H +#define SPINE_SPINE_CURVE_TIMELINE1_H -#ifndef SPINE_C_CURVETIMELINE1_H -#define SPINE_C_CURVETIMELINE1_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_curve_timeline1_dispose(spine_curve_timeline1 self); -SPINE_C_EXPORT void spine_curve_timeline1_dispose(spine_curve_timeline1 obj); -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_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, 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 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 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 int32_t spine_curve_timeline1_get_num_property_ids(spine_curve_timeline1 obj); -SPINE_C_EXPORT int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj); +SPINE_C_API spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 self); +SPINE_C_API void spine_curve_timeline1_set_frame(spine_curve_timeline1 self, size_t frame, float time, float value); +SPINE_C_API float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 self, float time); +SPINE_C_API float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_curve_timeline1_get_absolute_value_1(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_curve_timeline1_get_absolute_value_2(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_curve_timeline1_set_linear(spine_curve_timeline1 self, size_t frame); +SPINE_C_API void spine_curve_timeline1_set_stepped(spine_curve_timeline1 self, size_t frame); +SPINE_C_API void spine_curve_timeline1_set_bezier(spine_curve_timeline1 self, 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_API float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_curve_timeline1_get_curves(spine_curve_timeline1 self); +SPINE_C_API void spine_curve_timeline1_apply(spine_curve_timeline1 self, 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_API size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 self); +SPINE_C_API size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 self); +SPINE_C_API spine_array_float spine_curve_timeline1_get_frames(spine_curve_timeline1 self); +SPINE_C_API float spine_curve_timeline1_get_duration(spine_curve_timeline1 self); +SPINE_C_API spine_array_property_id spine_curve_timeline1_get_property_ids(spine_curve_timeline1 self); +SPINE_C_API spine_rtti spine_curve_timeline1_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CURVETIMELINE1_H \ No newline at end of file +#endif /* SPINE_SPINE_CURVE_TIMELINE1_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/curve_timeline2.cpp b/spine-c-new/src/generated/curve_timeline2.cpp index 5ab3d3359..530e5fa89 100644 --- a/spine-c-new/src/generated/curve_timeline2.cpp +++ b/spine-c-new/src/generated/curve_timeline2.cpp @@ -1,138 +1,68 @@ -/****************************************************************************** - * 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 "curve_timeline2.h" #include using namespace spine; -void spine_curve_timeline2_dispose(spine_curve_timeline2 obj) { - if (!obj) return; - delete (CurveTimeline2 *) obj; +void spine_curve_timeline2_dispose(spine_curve_timeline2 self) { + delete (CurveTimeline2*)self; } -spine_rtti spine_curve_timeline2_get_rtti() { - return (spine_rtti) &CurveTimeline2::rtti; +spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 self) { + return (spine_rtti)&((CurveTimeline2*)self)->getRTTI(); } -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); +void spine_curve_timeline2_set_frame(spine_curve_timeline2 self, size_t frame, float time, float value1, float value2) { + ((CurveTimeline2*)self)->setFrame(frame, time, value1, value2); } -float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 obj, float time) { - if (!obj) return 0; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getCurveValue(time); +float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 self, float time) { + return ((CurveTimeline2*)self)->getCurveValue(time); } -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_linear(spine_curve_timeline2 self, size_t frame) { + ((CurveTimeline*)(CurveTimeline2*)self)->setLinear(frame); } -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_stepped(spine_curve_timeline2 self, size_t frame) { + ((CurveTimeline*)(CurveTimeline2*)self)->setStepped(frame); } -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); +void spine_curve_timeline2_set_bezier(spine_curve_timeline2 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(CurveTimeline2*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(CurveTimeline2*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_curve_timeline2_get_curves(spine_curve_timeline2 self) { + return (spine_array_float)&((CurveTimeline*)(CurveTimeline2*)self)->getCurves(); } -float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (float *) _obj->getCurves().buffer(); +void spine_curve_timeline2_apply(spine_curve_timeline2 self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((CurveTimeline*)(CurveTimeline2*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 self) { + return ((CurveTimeline*)(CurveTimeline2*)self)->getFrameEntries(); } -size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj) { - if (!obj) return 0; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getFrameEntries(); +size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 self) { + return ((CurveTimeline*)(CurveTimeline2*)self)->getFrameCount(); } -size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj) { - if (!obj) return 0; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getFrameCount(); +spine_array_float spine_curve_timeline2_get_frames(spine_curve_timeline2 self) { + return (spine_array_float)&((CurveTimeline*)(CurveTimeline2*)self)->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(); +float spine_curve_timeline2_get_duration(spine_curve_timeline2 self) { + return ((CurveTimeline*)(CurveTimeline2*)self)->getDuration(); } -float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_curve_timeline2_get_property_ids(spine_curve_timeline2 self) { + return (spine_array_property_id)&((CurveTimeline*)(CurveTimeline2*)self)->getPropertyIds(); } -float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj) { - if (!obj) return 0; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return _obj->getDuration(); -} - -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(); -} - -int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) { - if (!obj) return nullptr; - CurveTimeline2 *_obj = (CurveTimeline2 *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_curve_timeline2_rtti(void) { + return (spine_rtti)&CurveTimeline2::rtti; } diff --git a/spine-c-new/src/generated/curve_timeline2.h b/spine-c-new/src/generated/curve_timeline2.h index 84f3ec911..67b505bb8 100644 --- a/spine-c-new/src/generated/curve_timeline2.h +++ b/spine-c-new/src/generated/curve_timeline2.h @@ -1,62 +1,33 @@ -/****************************************************************************** - * 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_SPINE_CURVE_TIMELINE2_H +#define SPINE_SPINE_CURVE_TIMELINE2_H -#ifndef SPINE_C_CURVETIMELINE2_H -#define SPINE_C_CURVETIMELINE2_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_curve_timeline2_dispose(spine_curve_timeline2 self); -SPINE_C_EXPORT void spine_curve_timeline2_dispose(spine_curve_timeline2 obj); -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, 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 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 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 int32_t spine_curve_timeline2_get_num_property_ids(spine_curve_timeline2 obj); -SPINE_C_EXPORT int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj); +SPINE_C_API spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 self); +SPINE_C_API void spine_curve_timeline2_set_frame(spine_curve_timeline2 self, size_t frame, float time, float value1, float value2); +SPINE_C_API float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 self, float time); +SPINE_C_API void spine_curve_timeline2_set_linear(spine_curve_timeline2 self, size_t frame); +SPINE_C_API void spine_curve_timeline2_set_stepped(spine_curve_timeline2 self, size_t frame); +SPINE_C_API void spine_curve_timeline2_set_bezier(spine_curve_timeline2 self, 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_API float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_curve_timeline2_get_curves(spine_curve_timeline2 self); +SPINE_C_API void spine_curve_timeline2_apply(spine_curve_timeline2 self, 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_API size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 self); +SPINE_C_API size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 self); +SPINE_C_API spine_array_float spine_curve_timeline2_get_frames(spine_curve_timeline2 self); +SPINE_C_API float spine_curve_timeline2_get_duration(spine_curve_timeline2 self); +SPINE_C_API spine_array_property_id spine_curve_timeline2_get_property_ids(spine_curve_timeline2 self); +SPINE_C_API spine_rtti spine_curve_timeline2_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_CURVETIMELINE2_H \ No newline at end of file +#endif /* SPINE_SPINE_CURVE_TIMELINE2_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/deform_timeline.cpp b/spine-c-new/src/generated/deform_timeline.cpp index 1e192966e..6d292d959 100644 --- a/spine-c-new/src/generated/deform_timeline.cpp +++ b/spine-c-new/src/generated/deform_timeline.cpp @@ -1,101 +1,88 @@ -/****************************************************************************** - * 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 "deform_timeline.h" #include using namespace spine; 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; + return (spine_deform_timeline) new (__FILE__, __LINE__) DeformTimeline(frameCount, bezierCount, slotIndex, (VertexAttachment *)attachment); } -void spine_deform_timeline_dispose(spine_deform_timeline obj) { - if (!obj) return; - delete (DeformTimeline *) obj; +void spine_deform_timeline_dispose(spine_deform_timeline self) { + delete (DeformTimeline*)self; } -spine_rtti spine_deform_timeline_get_rtti() { - return (spine_rtti) &DeformTimeline::rtti; +spine_rtti spine_deform_timeline_get_rtti(spine_deform_timeline self) { + return (spine_rtti)&((DeformTimeline*)self)->getRTTI(); } -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, (Array &) vertices); +void spine_deform_timeline_set_frame(spine_deform_timeline self, int frameIndex, float time, spine_array_float vertices) { + ((DeformTimeline*)self)->setFrame(frameIndex, time, *((Array*)vertices)); } -int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj) { - if (!obj) return 0; - DeformTimeline *_obj = (DeformTimeline *) obj; - return (int32_t) _obj->getVertices().size(); +spine_vertex_attachment spine_deform_timeline_get_attachment(spine_deform_timeline self) { + return (spine_vertex_attachment)((DeformTimeline*)self)->getAttachment(); } -spine_arraygetVertices().buffer(); +void spine_deform_timeline_set_attachment(spine_deform_timeline self, spine_vertex_attachment inValue) { + ((DeformTimeline*)self)->setAttachment((VertexAttachment *)inValue); } -spine_vertex_attachment spine_deform_timeline_get_attachment(spine_deform_timeline obj) { - if (!obj) return (spine_vertex_attachment) 0; - DeformTimeline *_obj = (DeformTimeline *) obj; - return (spine_vertex_attachment) _obj->getAttachment(); +void spine_deform_timeline_set_bezier(spine_deform_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((DeformTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); } -void spine_deform_timeline_set_attachment(spine_deform_timeline obj, spine_vertex_attachment value) { - if (!obj) return; - DeformTimeline *_obj = (DeformTimeline *) obj; - _obj->setAttachment((VertexAttachment *) value); +float spine_deform_timeline_get_curve_percent(spine_deform_timeline self, float time, int frame) { + return ((DeformTimeline*)self)->getCurvePercent(time, frame); } -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); +size_t spine_deform_timeline_get_frame_count(spine_deform_timeline self) { + return ((DeformTimeline*)self)->getFrameCount(); } -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); +void spine_deform_timeline_apply(spine_deform_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)(DeformTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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_set_linear(spine_deform_timeline self, size_t frame) { + ((SlotCurveTimeline*)(DeformTimeline*)self)->setLinear(frame); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_deform_timeline_set_stepped(spine_deform_timeline self, size_t frame) { + ((SlotCurveTimeline*)(DeformTimeline*)self)->setStepped(frame); +} + +float spine_deform_timeline_get_bezier_value(spine_deform_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((SlotCurveTimeline*)(DeformTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_deform_timeline_get_curves(spine_deform_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(DeformTimeline*)self)->getCurves(); +} + +size_t spine_deform_timeline_get_frame_entries(spine_deform_timeline self) { + return ((SlotCurveTimeline*)(DeformTimeline*)self)->getFrameEntries(); +} + +spine_array_float spine_deform_timeline_get_frames(spine_deform_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(DeformTimeline*)self)->getFrames(); +} + +float spine_deform_timeline_get_duration(spine_deform_timeline self) { + return ((SlotCurveTimeline*)(DeformTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_deform_timeline_get_property_ids(spine_deform_timeline self) { + return (spine_array_property_id)&((SlotCurveTimeline*)(DeformTimeline*)self)->getPropertyIds(); +} + +int spine_deform_timeline_get_slot_index(spine_deform_timeline self) { + return ((SlotCurveTimeline*)(DeformTimeline*)self)->getSlotIndex(); +} + +void spine_deform_timeline_set_slot_index(spine_deform_timeline self, int inValue) { + ((SlotCurveTimeline*)(DeformTimeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_deform_timeline_rtti(void) { + return (spine_rtti)&DeformTimeline::rtti; } diff --git a/spine-c-new/src/generated/deform_timeline.h b/spine-c-new/src/generated/deform_timeline.h index abfe6e002..98fdec7c4 100644 --- a/spine-c-new/src/generated/deform_timeline.h +++ b/spine-c-new/src/generated/deform_timeline.h @@ -1,56 +1,39 @@ -/****************************************************************************** - * 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_SPINE_DEFORM_TIMELINE_H +#define SPINE_SPINE_DEFORM_TIMELINE_H -#ifndef SPINE_C_DEFORMTIMELINE_H -#define SPINE_C_DEFORMTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_deform_timeline spine_deform_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_array using namespace spine; spine_draw_order_timeline spine_draw_order_timeline_create(size_t frameCount) { - DrawOrderTimeline *obj = new (__FILE__, __LINE__) DrawOrderTimeline(frameCount); - return (spine_draw_order_timeline) obj; + return (spine_draw_order_timeline) new (__FILE__, __LINE__) DrawOrderTimeline(frameCount); } -void spine_draw_order_timeline_dispose(spine_draw_order_timeline obj) { - if (!obj) return; - delete (DrawOrderTimeline *) obj; +void spine_draw_order_timeline_dispose(spine_draw_order_timeline self) { + delete (DrawOrderTimeline*)self; } -spine_rtti spine_draw_order_timeline_get_rtti() { - return (spine_rtti) &DrawOrderTimeline::rtti; +spine_rtti spine_draw_order_timeline_get_rtti(spine_draw_order_timeline self) { + return (spine_rtti)&((DrawOrderTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_draw_order_timeline_apply(spine_draw_order_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((DrawOrderTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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(); +size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline self) { + return ((DrawOrderTimeline*)self)->getFrameCount(); } -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(); +void spine_draw_order_timeline_set_frame(spine_draw_order_timeline self, size_t frame, float time, spine_array_int drawOrder) { + ((DrawOrderTimeline*)self)->setFrame(frame, time, (Array *)drawOrder); } -spine_arraygetDrawOrders().buffer(); +size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline self) { + return ((Timeline*)(DrawOrderTimeline*)self)->getFrameEntries(); } -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, (Array *) drawOrder); +spine_array_float spine_draw_order_timeline_get_frames(spine_draw_order_timeline self) { + return (spine_array_float)&((Timeline*)(DrawOrderTimeline*)self)->getFrames(); } -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(); +float spine_draw_order_timeline_get_duration(spine_draw_order_timeline self) { + return ((Timeline*)(DrawOrderTimeline*)self)->getDuration(); } -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_array_property_id spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline self) { + return (spine_array_property_id)&((Timeline*)(DrawOrderTimeline*)self)->getPropertyIds(); } -float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) { - if (!obj) return nullptr; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return (float *) _obj->getFrames().buffer(); -} - -float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj) { - if (!obj) return 0; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return _obj->getDuration(); -} - -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(); -} - -int64_t *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) { - if (!obj) return nullptr; - DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_draw_order_timeline_rtti(void) { + return (spine_rtti)&DrawOrderTimeline::rtti; } diff --git a/spine-c-new/src/generated/draw_order_timeline.h b/spine-c-new/src/generated/draw_order_timeline.h index 2a18de1ce..5464b8ff4 100644 --- a/spine-c-new/src/generated/draw_order_timeline.h +++ b/spine-c-new/src/generated/draw_order_timeline.h @@ -1,58 +1,29 @@ -/****************************************************************************** - * 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_SPINE_DRAW_ORDER_TIMELINE_H +#define SPINE_SPINE_DRAW_ORDER_TIMELINE_H -#ifndef SPINE_C_DRAWORDERTIMELINE_H -#define SPINE_C_DRAWORDERTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_draw_order_timeline spine_draw_order_timeline_create(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_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_array using namespace spine; spine_event spine_event_create(float time, spine_event_data data) { - Event *obj = new (__FILE__, __LINE__) Event(time, *(EventData*) data); - return (spine_event) obj; + return (spine_event) new (__FILE__, __LINE__) Event(time, *((const EventData*)data)); } -void spine_event_dispose(spine_event obj) { - if (!obj) return; - delete (Event *) obj; +void spine_event_dispose(spine_event self) { + delete (Event*)self; } -spine_event_data spine_event_get_data(spine_event obj) { - if (!obj) return (spine_event_data) 0; - Event *_obj = (Event *) obj; - return (spine_event_data) &_obj->getData(); +spine_event_data spine_event_get_data(spine_event self) { + return (spine_event_data)&((Event*)self)->getData(); } -float spine_event_get_time(spine_event obj) { - if (!obj) return 0; - Event *_obj = (Event *) obj; - return _obj->getTime(); +float spine_event_get_time(spine_event self) { + return ((Event*)self)->getTime(); } -int spine_event_get_int(spine_event obj) { - if (!obj) return 0; - Event *_obj = (Event *) obj; - return _obj->getInt(); +int spine_event_get_int(spine_event self) { + return ((Event*)self)->getInt(); } -void spine_event_set_int(spine_event obj, int value) { - if (!obj) return; - Event *_obj = (Event *) obj; - _obj->setInt(value); +void spine_event_set_int(spine_event self, int inValue) { + ((Event*)self)->setInt(inValue); } -float spine_event_get_float(spine_event obj) { - if (!obj) return 0; - Event *_obj = (Event *) obj; - return _obj->getFloat(); +float spine_event_get_float(spine_event self) { + return ((Event*)self)->getFloat(); } -void spine_event_set_float(spine_event obj, float value) { - if (!obj) return; - Event *_obj = (Event *) obj; - _obj->setFloat(value); +void spine_event_set_float(spine_event self, float inValue) { + ((Event*)self)->setFloat(inValue); } -const char* spine_event_get_string(spine_event obj) { - if (!obj) return nullptr; - Event *_obj = (Event *) obj; - return (const char *) _obj->getString().buffer(); +const char* spine_event_get_string(spine_event self) { + return (const char*)&((Event*)self)->getString(); } -void spine_event_set_string(spine_event obj, const char* value) { - if (!obj) return; - Event *_obj = (Event *) obj; - _obj->setString(String(value)); +void spine_event_set_string(spine_event self, const char* inValue) { + ((Event*)self)->setString(*((const String*)inValue)); } -float spine_event_get_volume(spine_event obj) { - if (!obj) return 0; - Event *_obj = (Event *) obj; - return _obj->getVolume(); +float spine_event_get_volume(spine_event self) { + return ((Event*)self)->getVolume(); } -void spine_event_set_volume(spine_event obj, float value) { - if (!obj) return; - Event *_obj = (Event *) obj; - _obj->setVolume(value); +void spine_event_set_volume(spine_event self, float inValue) { + ((Event*)self)->setVolume(inValue); } -float spine_event_get_balance(spine_event obj) { - if (!obj) return 0; - Event *_obj = (Event *) obj; - return _obj->getBalance(); +float spine_event_get_balance(spine_event self) { + return ((Event*)self)->getBalance(); } -void spine_event_set_balance(spine_event obj, float value) { - if (!obj) return; - Event *_obj = (Event *) obj; - _obj->setBalance(value); +void spine_event_set_balance(spine_event self, float inValue) { + ((Event*)self)->setBalance(inValue); } diff --git a/spine-c-new/src/generated/event.h b/spine-c-new/src/generated/event.h index 514857b09..a28e30cf6 100644 --- a/spine-c-new/src/generated/event.h +++ b/spine-c-new/src/generated/event.h @@ -1,58 +1,32 @@ -/****************************************************************************** - * 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_SPINE_EVENT_H +#define SPINE_SPINE_EVENT_H -#ifndef SPINE_C_EVENT_H -#define SPINE_C_EVENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_event spine_event_create(float time, spine_event_data data); -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 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 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); -SPINE_C_EXPORT void spine_event_set_balance(spine_event obj, float value); +SPINE_C_API void spine_event_dispose(spine_event self); + +SPINE_C_API spine_event_data spine_event_get_data(spine_event self); +SPINE_C_API float spine_event_get_time(spine_event self); +SPINE_C_API int spine_event_get_int(spine_event self); +SPINE_C_API void spine_event_set_int(spine_event self, int inValue); +SPINE_C_API float spine_event_get_float(spine_event self); +SPINE_C_API void spine_event_set_float(spine_event self, float inValue); +SPINE_C_API const char* spine_event_get_string(spine_event self); +SPINE_C_API void spine_event_set_string(spine_event self, const char* inValue); +SPINE_C_API float spine_event_get_volume(spine_event self); +SPINE_C_API void spine_event_set_volume(spine_event self, float inValue); +SPINE_C_API float spine_event_get_balance(spine_event self); +SPINE_C_API void spine_event_set_balance(spine_event self, float inValue); #ifdef __cplusplus } #endif -#endif // SPINE_C_EVENT_H \ No newline at end of file +#endif /* SPINE_SPINE_EVENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/event_data.cpp b/spine-c-new/src/generated/event_data.cpp index d7b9c1cfb..52a9d0673 100644 --- a/spine-c-new/src/generated/event_data.cpp +++ b/spine-c-new/src/generated/event_data.cpp @@ -1,121 +1,64 @@ -/****************************************************************************** - * 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 "event_data.h" #include using namespace spine; spine_event_data spine_event_data_create(const char* name) { - EventData *obj = new (__FILE__, __LINE__) EventData(String(name)); - return (spine_event_data) obj; + return (spine_event_data) new (__FILE__, __LINE__) EventData(*((const String*)name)); } -void spine_event_data_dispose(spine_event_data obj) { - if (!obj) return; - delete (EventData *) obj; +void spine_event_data_dispose(spine_event_data self) { + delete (EventData*)self; } -const char* spine_event_data_get_name(spine_event_data obj) { - if (!obj) return nullptr; - EventData *_obj = (EventData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_event_data_get_name(spine_event_data self) { + return (const char*)&((EventData*)self)->getName(); } -int spine_event_data_get_int_value(spine_event_data obj) { - if (!obj) return 0; - EventData *_obj = (EventData *) obj; - return _obj->getIntValue(); +int spine_event_data_get_int_value(spine_event_data self) { + return ((EventData*)self)->getIntValue(); } -void spine_event_data_set_int_value(spine_event_data obj, int value) { - if (!obj) return; - EventData *_obj = (EventData *) obj; - _obj->setIntValue(value); +void spine_event_data_set_int_value(spine_event_data self, int inValue) { + ((EventData*)self)->setIntValue(inValue); } -float spine_event_data_get_float_value(spine_event_data obj) { - if (!obj) return 0; - EventData *_obj = (EventData *) obj; - return _obj->getFloatValue(); +float spine_event_data_get_float_value(spine_event_data self) { + return ((EventData*)self)->getFloatValue(); } -void spine_event_data_set_float_value(spine_event_data obj, float value) { - if (!obj) return; - EventData *_obj = (EventData *) obj; - _obj->setFloatValue(value); +void spine_event_data_set_float_value(spine_event_data self, float inValue) { + ((EventData*)self)->setFloatValue(inValue); } -const char* spine_event_data_get_string_value(spine_event_data obj) { - if (!obj) return nullptr; - EventData *_obj = (EventData *) obj; - return (const char *) _obj->getStringValue().buffer(); +const char* spine_event_data_get_string_value(spine_event_data self) { + return (const char*)&((EventData*)self)->getStringValue(); } -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)); +void spine_event_data_set_string_value(spine_event_data self, const char* inValue) { + ((EventData*)self)->setStringValue(*((const String*)inValue)); } -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(); +const char* spine_event_data_get_audio_path(spine_event_data self) { + return (const char*)&((EventData*)self)->getAudioPath(); } -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)); +void spine_event_data_set_audio_path(spine_event_data self, const char* inValue) { + ((EventData*)self)->setAudioPath(*((const String*)inValue)); } -float spine_event_data_get_volume(spine_event_data obj) { - if (!obj) return 0; - EventData *_obj = (EventData *) obj; - return _obj->getVolume(); +float spine_event_data_get_volume(spine_event_data self) { + return ((EventData*)self)->getVolume(); } -void spine_event_data_set_volume(spine_event_data obj, float value) { - if (!obj) return; - EventData *_obj = (EventData *) obj; - _obj->setVolume(value); +void spine_event_data_set_volume(spine_event_data self, float inValue) { + ((EventData*)self)->setVolume(inValue); } -float spine_event_data_get_balance(spine_event_data obj) { - if (!obj) return 0; - EventData *_obj = (EventData *) obj; - return _obj->getBalance(); +float spine_event_data_get_balance(spine_event_data self) { + return ((EventData*)self)->getBalance(); } -void spine_event_data_set_balance(spine_event_data obj, float value) { - if (!obj) return; - EventData *_obj = (EventData *) obj; - _obj->setBalance(value); +void spine_event_data_set_balance(spine_event_data self, float inValue) { + ((EventData*)self)->setBalance(inValue); } diff --git a/spine-c-new/src/generated/event_data.h b/spine-c-new/src/generated/event_data.h index 928b51f8a..2ab1bfaf4 100644 --- a/spine-c-new/src/generated/event_data.h +++ b/spine-c-new/src/generated/event_data.h @@ -1,59 +1,33 @@ -/****************************************************************************** - * 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_SPINE_EVENT_DATA_H +#define SPINE_SPINE_EVENT_DATA_H -#ifndef SPINE_C_EVENTDATA_H -#define SPINE_C_EVENTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_event_data spine_event_data_create(const char* 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 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 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); +SPINE_C_API void spine_event_data_dispose(spine_event_data self); + +SPINE_C_API const char* spine_event_data_get_name(spine_event_data self); +SPINE_C_API int spine_event_data_get_int_value(spine_event_data self); +SPINE_C_API void spine_event_data_set_int_value(spine_event_data self, int inValue); +SPINE_C_API float spine_event_data_get_float_value(spine_event_data self); +SPINE_C_API void spine_event_data_set_float_value(spine_event_data self, float inValue); +SPINE_C_API const char* spine_event_data_get_string_value(spine_event_data self); +SPINE_C_API void spine_event_data_set_string_value(spine_event_data self, const char* inValue); +SPINE_C_API const char* spine_event_data_get_audio_path(spine_event_data self); +SPINE_C_API void spine_event_data_set_audio_path(spine_event_data self, const char* inValue); +SPINE_C_API float spine_event_data_get_volume(spine_event_data self); +SPINE_C_API void spine_event_data_set_volume(spine_event_data self, float inValue); +SPINE_C_API float spine_event_data_get_balance(spine_event_data self); +SPINE_C_API void spine_event_data_set_balance(spine_event_data self, float inValue); #ifdef __cplusplus } #endif -#endif // SPINE_C_EVENTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_EVENT_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/event_queue_entry.cpp b/spine-c-new/src/generated/event_queue_entry.cpp index eb971e8a1..af2078a43 100644 --- a/spine-c-new/src/generated/event_queue_entry.cpp +++ b/spine-c-new/src/generated/event_queue_entry.cpp @@ -1,43 +1,36 @@ -/****************************************************************************** - * 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 "event_queue_entry.h" #include using namespace spine; spine_event_queue_entry spine_event_queue_entry_create(spine_event_type eventType, spine_track_entry trackEntry, spine_event event) { - EventQueueEntry *obj = new (__FILE__, __LINE__) EventQueueEntry(eventType, (TrackEntry *) trackEntry, (Event *) event); - return (spine_event_queue_entry) obj; + return (spine_event_queue_entry) new (__FILE__, __LINE__) EventQueueEntry((EventType)eventType, (TrackEntry *)trackEntry, (Event *)event); } -void spine_event_queue_entry_dispose(spine_event_queue_entry obj) { - if (!obj) return; - delete (EventQueueEntry *) obj; +void spine_event_queue_entry_dispose(spine_event_queue_entry self) { + delete (EventQueueEntry*)self; +} + +spine_event_type spine_event_queue_entry_get__type(spine_event_queue_entry self) { + return (spine_event_type)((EventQueueEntry*)self)->_type; +} + +void spine_event_queue_entry_set__type(spine_event_queue_entry self, spine_event_type value) { + ((EventQueueEntry*)self)->_type = (EventType)value; +} + +spine_track_entry spine_event_queue_entry_get__entry(spine_event_queue_entry self) { + return (spine_track_entry)((EventQueueEntry*)self)->_entry; +} + +void spine_event_queue_entry_set__entry(spine_event_queue_entry self, spine_track_entry value) { + ((EventQueueEntry*)self)->_entry = (TrackEntry*)value; +} + +spine_event spine_event_queue_entry_get__event(spine_event_queue_entry self) { + return (spine_event)((EventQueueEntry*)self)->_event; +} + +void spine_event_queue_entry_set__event(spine_event_queue_entry self, spine_event value) { + ((EventQueueEntry*)self)->_event = (Event*)value; } diff --git a/spine-c-new/src/generated/event_queue_entry.h b/spine-c-new/src/generated/event_queue_entry.h index 21c748f58..fbc592c81 100644 --- a/spine-c-new/src/generated/event_queue_entry.h +++ b/spine-c-new/src/generated/event_queue_entry.h @@ -1,46 +1,26 @@ -/****************************************************************************** - * 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_SPINE_EVENT_QUEUE_ENTRY_H +#define SPINE_SPINE_EVENT_QUEUE_ENTRY_H -#ifndef SPINE_C_EVENTQUEUEENTRY_H -#define SPINE_C_EVENTQUEUEENTRY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_event_queue_entry spine_event_queue_entry_create(spine_event_type eventType, spine_track_entry trackEntry, spine_event event); -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); +SPINE_C_API void spine_event_queue_entry_dispose(spine_event_queue_entry self); + +SPINE_C_API spine_event_type spine_event_queue_entry_get__type(spine_event_queue_entry self); +SPINE_C_API void spine_event_queue_entry_set__type(spine_event_queue_entry self, spine_event_type value); +SPINE_C_API spine_track_entry spine_event_queue_entry_get__entry(spine_event_queue_entry self); +SPINE_C_API void spine_event_queue_entry_set__entry(spine_event_queue_entry self, spine_track_entry value); +SPINE_C_API spine_event spine_event_queue_entry_get__event(spine_event_queue_entry self); +SPINE_C_API void spine_event_queue_entry_set__event(spine_event_queue_entry self, spine_event value); #ifdef __cplusplus } #endif -#endif // SPINE_C_EVENTQUEUEENTRY_H \ No newline at end of file +#endif /* SPINE_SPINE_EVENT_QUEUE_ENTRY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/event_timeline.cpp b/spine-c-new/src/generated/event_timeline.cpp index 2b0e4c225..e8f4e4309 100644 --- a/spine-c-new/src/generated/event_timeline.cpp +++ b/spine-c-new/src/generated/event_timeline.cpp @@ -1,113 +1,52 @@ -/****************************************************************************** - * 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 "event_timeline.h" #include using namespace spine; spine_event_timeline spine_event_timeline_create(size_t frameCount) { - EventTimeline *obj = new (__FILE__, __LINE__) EventTimeline(frameCount); - return (spine_event_timeline) obj; + return (spine_event_timeline) new (__FILE__, __LINE__) EventTimeline(frameCount); } -void spine_event_timeline_dispose(spine_event_timeline obj) { - if (!obj) return; - delete (EventTimeline *) obj; +void spine_event_timeline_dispose(spine_event_timeline self) { + delete (EventTimeline*)self; } -spine_rtti spine_event_timeline_get_rtti() { - return (spine_rtti) &EventTimeline::rtti; +spine_rtti spine_event_timeline_get_rtti(spine_event_timeline self) { + return (spine_rtti)&((EventTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_event_timeline_apply(spine_event_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((EventTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -size_t spine_event_timeline_get_frame_count(spine_event_timeline obj) { - if (!obj) return 0; - EventTimeline *_obj = (EventTimeline *) obj; - return _obj->getFrameCount(); +size_t spine_event_timeline_get_frame_count(spine_event_timeline self) { + return ((EventTimeline*)self)->getFrameCount(); } -int32_t spine_event_timeline_get_num_events(spine_event_timeline obj) { - if (!obj) return 0; - EventTimeline *_obj = (EventTimeline *) obj; - return (int32_t) _obj->getEvents().size(); +spine_array_event spine_event_timeline_get_events(spine_event_timeline self) { + return (spine_array_event)&((EventTimeline*)self)->getEvents(); } -spine_event *spine_event_timeline_get_events(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return (spine_event *) _obj->getEvents().buffer(); +void spine_event_timeline_set_frame(spine_event_timeline self, size_t frame, spine_event event) { + ((EventTimeline*)self)->setFrame(frame, (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); +size_t spine_event_timeline_get_frame_entries(spine_event_timeline self) { + return ((Timeline*)(EventTimeline*)self)->getFrameEntries(); } -size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj) { - if (!obj) return 0; - EventTimeline *_obj = (EventTimeline *) obj; - return _obj->getFrameEntries(); +spine_array_float spine_event_timeline_get_frames(spine_event_timeline self) { + return (spine_array_float)&((Timeline*)(EventTimeline*)self)->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(); +float spine_event_timeline_get_duration(spine_event_timeline self) { + return ((Timeline*)(EventTimeline*)self)->getDuration(); } -float *spine_event_timeline_get_frames(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_event_timeline_get_property_ids(spine_event_timeline self) { + return (spine_array_property_id)&((Timeline*)(EventTimeline*)self)->getPropertyIds(); } -float spine_event_timeline_get_duration(spine_event_timeline obj) { - if (!obj) return 0; - EventTimeline *_obj = (EventTimeline *) obj; - return _obj->getDuration(); -} - -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(); -} - -int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj) { - if (!obj) return nullptr; - EventTimeline *_obj = (EventTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_event_timeline_rtti(void) { + return (spine_rtti)&EventTimeline::rtti; } diff --git a/spine-c-new/src/generated/event_timeline.h b/spine-c-new/src/generated/event_timeline.h index 989a386a3..80a94146e 100644 --- a/spine-c-new/src/generated/event_timeline.h +++ b/spine-c-new/src/generated/event_timeline.h @@ -1,58 +1,30 @@ -/****************************************************************************** - * 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_SPINE_EVENT_TIMELINE_H +#define SPINE_SPINE_EVENT_TIMELINE_H -#ifndef SPINE_C_EVENTTIMELINE_H -#define SPINE_C_EVENTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_event_timeline spine_event_timeline_create(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_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, 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 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 int32_t spine_event_timeline_get_num_property_ids(spine_event_timeline obj); -SPINE_C_EXPORT int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj); +SPINE_C_API void spine_event_timeline_dispose(spine_event_timeline self); + +SPINE_C_API spine_rtti spine_event_timeline_get_rtti(spine_event_timeline self); +SPINE_C_API void spine_event_timeline_apply(spine_event_timeline self, 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_API size_t spine_event_timeline_get_frame_count(spine_event_timeline self); +SPINE_C_API spine_array_event spine_event_timeline_get_events(spine_event_timeline self); +SPINE_C_API void spine_event_timeline_set_frame(spine_event_timeline self, size_t frame, spine_event event); +SPINE_C_API size_t spine_event_timeline_get_frame_entries(spine_event_timeline self); +SPINE_C_API spine_array_float spine_event_timeline_get_frames(spine_event_timeline self); +SPINE_C_API float spine_event_timeline_get_duration(spine_event_timeline self); +SPINE_C_API spine_array_property_id spine_event_timeline_get_property_ids(spine_event_timeline self); +SPINE_C_API spine_rtti spine_event_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_EVENTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_EVENT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/event_type.h b/spine-c-new/src/generated/event_type.h index b96701705..cccf32e65 100644 --- a/spine-c-new/src/generated/event_type.h +++ b/spine-c-new/src/generated/event_type.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_EVENTTYPE_H -#define SPINE_C_EVENTTYPE_H - -#include "../base.h" +#ifndef SPINE_SPINE_EVENT_TYPE_H +#define SPINE_SPINE_EVENT_TYPE_H #ifdef __cplusplus extern "C" { @@ -49,4 +18,4 @@ typedef enum spine_event_type { } #endif -#endif // SPINE_C_EVENTTYPE_H \ No newline at end of file +#endif /* SPINE_SPINE_EVENT_TYPE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/format.h b/spine-c-new/src/generated/format.h index f090e0eb5..ec9513dfb 100644 --- a/spine-c-new/src/generated/format.h +++ b/spine-c-new/src/generated/format.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_FORMAT_H -#define SPINE_C_FORMAT_H - -#include "../base.h" +#ifndef SPINE_SPINE_FORMAT_H +#define SPINE_SPINE_FORMAT_H #ifdef __cplusplus extern "C" { @@ -50,4 +19,4 @@ typedef enum spine_format { } #endif -#endif // SPINE_C_FORMAT_H \ No newline at end of file +#endif /* SPINE_SPINE_FORMAT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_property.cpp b/spine-c-new/src/generated/from_property.cpp index e06b66b5b..0835a4838 100644 --- a/spine-c-new/src/generated/from_property.cpp +++ b/spine-c-new/src/generated/from_property.cpp @@ -1,44 +1,28 @@ -/****************************************************************************** - * 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 "from_property.h" #include using namespace spine; -void spine_from_property_dispose(spine_from_property obj) { - if (!obj) return; - delete (FromProperty *) obj; +void spine_from_property_dispose(spine_from_property self) { + delete (FromProperty*)self; } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +float spine_from_property_value(spine_from_property self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromProperty*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); +} + +float spine_from_property_get__offset(spine_from_property self) { + return ((FromProperty*)self)->_offset; +} + +void spine_from_property_set__offset(spine_from_property self, float value) { + ((FromProperty*)self)->_offset = value; +} + +spine_array_to_property spine_from_property_get__to(spine_from_property self) { + return (spine_array_to_property)&((FromProperty*)self)->_to; +} + +void spine_from_property_set__to(spine_from_property self, spine_array_to_property value) { + ((FromProperty*)self)->_to = *((Array*)value); } diff --git a/spine-c-new/src/generated/from_property.h b/spine-c-new/src/generated/from_property.h index 4683b1643..41b696c95 100644 --- a/spine-c-new/src/generated/from_property.h +++ b/spine-c-new/src/generated/from_property.h @@ -1,46 +1,23 @@ -/****************************************************************************** - * 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_SPINE_FROM_PROPERTY_H +#define SPINE_SPINE_FROM_PROPERTY_H -#ifndef SPINE_C_FROMPROPERTY_H -#define SPINE_C_FROMPROPERTY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_from_property_dispose(spine_from_property self); -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, bool local, float * offsets); +SPINE_C_API float spine_from_property_value(spine_from_property self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); +SPINE_C_API float spine_from_property_get__offset(spine_from_property self); +SPINE_C_API void spine_from_property_set__offset(spine_from_property self, float value); +SPINE_C_API spine_array_to_property spine_from_property_get__to(spine_from_property self); +SPINE_C_API void spine_from_property_set__to(spine_from_property self, spine_array_to_property value); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMPROPERTY_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_PROPERTY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_rotate.cpp b/spine-c-new/src/generated/from_rotate.cpp index eddd397aa..a0b68b67c 100644 --- a/spine-c-new/src/generated/from_rotate.cpp +++ b/spine-c-new/src/generated/from_rotate.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_rotate.h" #include using namespace spine; -void spine_from_rotate_dispose(spine_from_rotate obj) { - if (!obj) return; - delete (FromRotate *) obj; +spine_from_rotate spine_from_rotate_create(void) { + return (spine_from_rotate) new (__FILE__, __LINE__) FromRotate(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_rotate_dispose(spine_from_rotate self) { + delete (FromRotate*)self; +} + +float spine_from_rotate_value(spine_from_rotate self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromRotate*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_rotate.h b/spine-c-new/src/generated/from_rotate.h index 1b442ed44..a6fa40ac0 100644 --- a/spine-c-new/src/generated/from_rotate.h +++ b/spine-c-new/src/generated/from_rotate.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_ROTATE_H +#define SPINE_SPINE_FROM_ROTATE_H -#ifndef SPINE_C_FROMROTATE_H -#define SPINE_C_FROMROTATE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_rotate spine_from_rotate_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_rotate_dispose(spine_from_rotate self); + +SPINE_C_API float spine_from_rotate_value(spine_from_rotate self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMROTATE_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_ROTATE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_scale_x.cpp b/spine-c-new/src/generated/from_scale_x.cpp index f39c47954..12c66a903 100644 --- a/spine-c-new/src/generated/from_scale_x.cpp +++ b/spine-c-new/src/generated/from_scale_x.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_scale_x.h" #include using namespace spine; -void spine_from_scale_x_dispose(spine_from_scale_x obj) { - if (!obj) return; - delete (FromScaleX *) obj; +spine_from_scale_x spine_from_scale_x_create(void) { + return (spine_from_scale_x) new (__FILE__, __LINE__) FromScaleX(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_scale_x_dispose(spine_from_scale_x self) { + delete (FromScaleX*)self; +} + +float spine_from_scale_x_value(spine_from_scale_x self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromScaleX*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_scale_x.h b/spine-c-new/src/generated/from_scale_x.h index fee59f155..2694bac8c 100644 --- a/spine-c-new/src/generated/from_scale_x.h +++ b/spine-c-new/src/generated/from_scale_x.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_SCALE_X_H +#define SPINE_SPINE_FROM_SCALE_X_H -#ifndef SPINE_C_FROMSCALEX_H -#define SPINE_C_FROMSCALEX_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_scale_x spine_from_scale_x_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_scale_x_dispose(spine_from_scale_x self); + +SPINE_C_API float spine_from_scale_x_value(spine_from_scale_x self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMSCALEX_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_SCALE_X_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_scale_y.cpp b/spine-c-new/src/generated/from_scale_y.cpp index 70bdd4635..a849e9c00 100644 --- a/spine-c-new/src/generated/from_scale_y.cpp +++ b/spine-c-new/src/generated/from_scale_y.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_scale_y.h" #include using namespace spine; -void spine_from_scale_y_dispose(spine_from_scale_y obj) { - if (!obj) return; - delete (FromScaleY *) obj; +spine_from_scale_y spine_from_scale_y_create(void) { + return (spine_from_scale_y) new (__FILE__, __LINE__) FromScaleY(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_scale_y_dispose(spine_from_scale_y self) { + delete (FromScaleY*)self; +} + +float spine_from_scale_y_value(spine_from_scale_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromScaleY*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_scale_y.h b/spine-c-new/src/generated/from_scale_y.h index 97f605075..3a0241afc 100644 --- a/spine-c-new/src/generated/from_scale_y.h +++ b/spine-c-new/src/generated/from_scale_y.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_SCALE_Y_H +#define SPINE_SPINE_FROM_SCALE_Y_H -#ifndef SPINE_C_FROMSCALEY_H -#define SPINE_C_FROMSCALEY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_scale_y spine_from_scale_y_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_scale_y_dispose(spine_from_scale_y self); + +SPINE_C_API float spine_from_scale_y_value(spine_from_scale_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMSCALEY_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_SCALE_Y_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_shear_y.cpp b/spine-c-new/src/generated/from_shear_y.cpp index b5d6022a8..4dd5a0701 100644 --- a/spine-c-new/src/generated/from_shear_y.cpp +++ b/spine-c-new/src/generated/from_shear_y.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_shear_y.h" #include using namespace spine; -void spine_from_shear_y_dispose(spine_from_shear_y obj) { - if (!obj) return; - delete (FromShearY *) obj; +spine_from_shear_y spine_from_shear_y_create(void) { + return (spine_from_shear_y) new (__FILE__, __LINE__) FromShearY(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_shear_y_dispose(spine_from_shear_y self) { + delete (FromShearY*)self; +} + +float spine_from_shear_y_value(spine_from_shear_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromShearY*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_shear_y.h b/spine-c-new/src/generated/from_shear_y.h index 9b96cb8ec..cddfedf1a 100644 --- a/spine-c-new/src/generated/from_shear_y.h +++ b/spine-c-new/src/generated/from_shear_y.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_SHEAR_Y_H +#define SPINE_SPINE_FROM_SHEAR_Y_H -#ifndef SPINE_C_FROMSHEARY_H -#define SPINE_C_FROMSHEARY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_shear_y spine_from_shear_y_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_shear_y_dispose(spine_from_shear_y self); + +SPINE_C_API float spine_from_shear_y_value(spine_from_shear_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMSHEARY_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_SHEAR_Y_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_x.cpp b/spine-c-new/src/generated/from_x.cpp index 3683e3c90..bdb3f0224 100644 --- a/spine-c-new/src/generated/from_x.cpp +++ b/spine-c-new/src/generated/from_x.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_x.h" #include using namespace spine; -void spine_from_x_dispose(spine_from_x obj) { - if (!obj) return; - delete (FromX *) obj; +spine_from_x spine_from_x_create(void) { + return (spine_from_x) new (__FILE__, __LINE__) FromX(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_x_dispose(spine_from_x self) { + delete (FromX*)self; +} + +float spine_from_x_value(spine_from_x self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromX*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_x.h b/spine-c-new/src/generated/from_x.h index 63f00660e..b78f9fc80 100644 --- a/spine-c-new/src/generated/from_x.h +++ b/spine-c-new/src/generated/from_x.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_X_H +#define SPINE_SPINE_FROM_X_H -#ifndef SPINE_C_FROMX_H -#define SPINE_C_FROMX_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_x spine_from_x_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_x_dispose(spine_from_x self); + +SPINE_C_API float spine_from_x_value(spine_from_x self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMX_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_X_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/from_y.cpp b/spine-c-new/src/generated/from_y.cpp index 91ceab445..dcc6c2956 100644 --- a/spine-c-new/src/generated/from_y.cpp +++ b/spine-c-new/src/generated/from_y.cpp @@ -1,44 +1,16 @@ -/****************************************************************************** - * 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 "from_y.h" #include using namespace spine; -void spine_from_y_dispose(spine_from_y obj) { - if (!obj) return; - delete (FromY *) obj; +spine_from_y spine_from_y_create(void) { + return (spine_from_y) new (__FILE__, __LINE__) FromY(); } -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*) skeleton, *(BonePose*) source, local, (float *) offsets); +void spine_from_y_dispose(spine_from_y self) { + delete (FromY*)self; +} + +float spine_from_y_value(spine_from_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) { + return ((FromY*)self)->value(*((Skeleton*)skeleton), *((BonePose*)source), local, offsets); } diff --git a/spine-c-new/src/generated/from_y.h b/spine-c-new/src/generated/from_y.h index 092a71b1c..1c7ad269a 100644 --- a/spine-c-new/src/generated/from_y.h +++ b/spine-c-new/src/generated/from_y.h @@ -1,46 +1,21 @@ -/****************************************************************************** - * 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_SPINE_FROM_Y_H +#define SPINE_SPINE_FROM_Y_H -#ifndef SPINE_C_FROMY_H -#define SPINE_C_FROMY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_from_y spine_from_y_create(void); -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, bool local, float * offsets); +SPINE_C_API void spine_from_y_dispose(spine_from_y self); + +SPINE_C_API float spine_from_y_value(spine_from_y self, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets); #ifdef __cplusplus } #endif -#endif // SPINE_C_FROMY_H \ No newline at end of file +#endif /* SPINE_SPINE_FROM_Y_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 dac6fede3..105c2d94f 100644 --- a/spine-c-new/src/generated/ik_constraint.cpp +++ b/spine-c-new/src/generated/ik_constraint.cpp @@ -1,155 +1,88 @@ -/****************************************************************************** - * 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 "ik_constraint.h" #include using namespace spine; spine_ik_constraint spine_ik_constraint_create(spine_ik_constraint_data data, spine_skeleton skeleton) { - IkConstraint *obj = new (__FILE__, __LINE__) IkConstraint(*(IkConstraintData*) data, *(Skeleton*) skeleton); - return (spine_ik_constraint) obj; + return (spine_ik_constraint) new (__FILE__, __LINE__) IkConstraint(*((IkConstraintData*)data), *((Skeleton*)skeleton)); } -void spine_ik_constraint_dispose(spine_ik_constraint obj) { - if (!obj) return; - delete (IkConstraint *) obj; +void spine_ik_constraint_dispose(spine_ik_constraint self) { + delete (IkConstraint*)self; } -spine_rtti spine_ik_constraint_get_rtti() { - return (spine_rtti) &IkConstraint::rtti; +spine_rtti spine_ik_constraint_get_rtti(spine_ik_constraint self) { + return (spine_rtti)&((IkConstraint*)self)->getRTTI(); } -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*) skeleton); +spine_ik_constraint spine_ik_constraint_copy(spine_ik_constraint self, spine_skeleton skeleton) { + return (spine_ik_constraint)((IkConstraint*)self)->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*) skeleton, (Physics) physics); +void spine_ik_constraint_update(spine_ik_constraint self, spine_skeleton skeleton, spine_physics physics) { + ((IkConstraint*)self)->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*) skeleton); +void spine_ik_constraint_sort(spine_ik_constraint self, spine_skeleton skeleton) { + ((IkConstraint*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_ik_constraint_is_source_active(spine_ik_constraint obj) { - if (!obj) return false; - IkConstraint *_obj = (IkConstraint *) obj; - return _obj->isSourceActive(); +bool spine_ik_constraint_is_source_active(spine_ik_constraint self) { + return ((IkConstraint*)self)->isSourceActive(); } -spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint obj) { - if (!obj) return 0; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_ik_constraint_data) &_obj->getData(); +spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint self) { + return (spine_ik_constraint_data)&((IkConstraint*)self)->getData(); } -int32_t spine_ik_constraint_get_num_bones(spine_ik_constraint obj) { - if (!obj) return 0; - IkConstraint *_obj = (IkConstraint *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_pose spine_ik_constraint_get_bones(spine_ik_constraint self) { + return (spine_array_bone_pose)&((IkConstraint*)self)->getBones(); } -spine_bone_pose *spine_ik_constraint_get_bones(spine_ik_constraint obj) { - if (!obj) return nullptr; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_bone_pose *) _obj->getBones().buffer(); +spine_bone spine_ik_constraint_get_target(spine_ik_constraint self) { + return (spine_bone)((IkConstraint*)self)->getTarget(); } -spine_bone spine_ik_constraint_get_target(spine_ik_constraint obj) { - if (!obj) return (spine_bone) 0; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_bone) _obj->getTarget(); +void spine_ik_constraint_set_target(spine_ik_constraint self, spine_bone inValue) { + ((IkConstraint*)self)->setTarget((Bone *)inValue); } -void spine_ik_constraint_set_target(spine_ik_constraint obj, spine_bone value) { - if (!obj) return; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->setTarget((Bone *) value); +void spine_ik_constraint_apply_1(spine_skeleton skeleton, spine_bone_pose bone, float targetX, float targetY, bool compress, bool stretch, bool uniform, float mix) { + IkConstraint::apply(*((Skeleton*)skeleton), *((BonePose*)bone), targetX, targetY, compress, stretch, uniform, mix); } -void spine_ik_constraint_pose(spine_ik_constraint obj) { - if (!obj) return ; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->pose(); +void spine_ik_constraint_apply_2(spine_skeleton skeleton, spine_bone_pose parent, spine_bone_pose child, float targetX, float targetY, int bendDirection, bool stretch, bool uniform, float softness, float mix) { + IkConstraint::apply(*((Skeleton*)skeleton), *((BonePose*)parent), *((BonePose*)child), targetX, targetY, bendDirection, stretch, uniform, softness, mix); } -void spine_ik_constraint_setup_pose(spine_ik_constraint obj) { - if (!obj) return ; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->setupPose(); +spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_constraint self) { + return (spine_ik_constraint_pose)&((ConstraintGeneric*)(IkConstraint*)self)->getPose(); } -spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_constraint obj) { - if (!obj) return 0; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_ik_constraint_pose) &_obj->getPose(); +spine_ik_constraint_pose spine_ik_constraint_get_applied_pose(spine_ik_constraint self) { + return (spine_ik_constraint_pose)&((ConstraintGeneric*)(IkConstraint*)self)->getAppliedPose(); } -spine_ik_constraint_pose spine_ik_constraint_get_applied_pose(spine_ik_constraint obj) { - if (!obj) return 0; - IkConstraint *_obj = (IkConstraint *) obj; - return (spine_ik_constraint_pose) &_obj->getAppliedPose(); +void spine_ik_constraint_reset_constrained(spine_ik_constraint self) { + ((ConstraintGeneric*)(IkConstraint*)self)->resetConstrained(); } -void spine_ik_constraint_reset_constrained(spine_ik_constraint obj) { - if (!obj) return ; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->resetConstrained(); +void spine_ik_constraint_constrained(spine_ik_constraint self) { + ((ConstraintGeneric*)(IkConstraint*)self)->constrained(); } -void spine_ik_constraint_constrained(spine_ik_constraint obj) { - if (!obj) return ; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->constrained(); +bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint self) { + return ((ConstraintGeneric*)(IkConstraint*)self)->isPoseEqualToApplied(); } -bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint obj) { - if (!obj) return false; - IkConstraint *_obj = (IkConstraint *) obj; - return _obj->isPoseEqualToApplied(); +bool spine_ik_constraint_is_active(spine_ik_constraint self) { + return ((ConstraintGeneric*)(IkConstraint*)self)->isActive(); } -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 self, bool active) { + ((ConstraintGeneric*)(IkConstraint*)self)->setActive(active); } -void spine_ik_constraint_set_active(spine_ik_constraint obj, bool value) { - if (!obj) return; - IkConstraint *_obj = (IkConstraint *) obj; - _obj->setActive(value); +spine_rtti spine_ik_constraint_rtti(void) { + return (spine_rtti)&IkConstraint::rtti; } diff --git a/spine-c-new/src/generated/ik_constraint.h b/spine-c-new/src/generated/ik_constraint.h index 75095d7d6..1470b2085 100644 --- a/spine-c-new/src/generated/ik_constraint.h +++ b/spine-c-new/src/generated/ik_constraint.h @@ -1,65 +1,39 @@ -/****************************************************************************** - * 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_SPINE_IK_CONSTRAINT_H +#define SPINE_SPINE_IK_CONSTRAINT_H -#ifndef SPINE_C_IKCONSTRAINT_H -#define SPINE_C_IKCONSTRAINT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_ik_constraint spine_ik_constraint_create(spine_ik_constraint_data data, spine_skeleton skeleton); -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_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 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 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); -SPINE_C_EXPORT void spine_ik_constraint_set_target(spine_ik_constraint obj, spine_bone value); -SPINE_C_EXPORT void spine_ik_constraint_pose(spine_ik_constraint obj); -SPINE_C_EXPORT void spine_ik_constraint_setup_pose(spine_ik_constraint obj); -SPINE_C_EXPORT spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_constraint obj); -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 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); +SPINE_C_API void spine_ik_constraint_dispose(spine_ik_constraint self); + +SPINE_C_API spine_rtti spine_ik_constraint_get_rtti(spine_ik_constraint self); +SPINE_C_API spine_ik_constraint spine_ik_constraint_copy(spine_ik_constraint self, spine_skeleton skeleton); +SPINE_C_API void spine_ik_constraint_update(spine_ik_constraint self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_ik_constraint_sort(spine_ik_constraint self, spine_skeleton skeleton); +SPINE_C_API bool spine_ik_constraint_is_source_active(spine_ik_constraint self); +SPINE_C_API spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint self); +SPINE_C_API spine_array_bone_pose spine_ik_constraint_get_bones(spine_ik_constraint self); +SPINE_C_API spine_bone spine_ik_constraint_get_target(spine_ik_constraint self); +SPINE_C_API void spine_ik_constraint_set_target(spine_ik_constraint self, spine_bone inValue); +SPINE_C_API void spine_ik_constraint_apply_1(spine_skeleton skeleton, spine_bone_pose bone, float targetX, float targetY, bool compress, bool stretch, bool uniform, float mix); +SPINE_C_API void spine_ik_constraint_apply_2(spine_skeleton skeleton, spine_bone_pose parent, spine_bone_pose child, float targetX, float targetY, int bendDirection, bool stretch, bool uniform, float softness, float mix); +SPINE_C_API spine_ik_constraint_pose spine_ik_constraint_get_pose(spine_ik_constraint self); +SPINE_C_API spine_ik_constraint_pose spine_ik_constraint_get_applied_pose(spine_ik_constraint self); +SPINE_C_API void spine_ik_constraint_reset_constrained(spine_ik_constraint self); +SPINE_C_API void spine_ik_constraint_constrained(spine_ik_constraint self); +SPINE_C_API bool spine_ik_constraint_is_pose_equal_to_applied(spine_ik_constraint self); +SPINE_C_API bool spine_ik_constraint_is_active(spine_ik_constraint self); +SPINE_C_API void spine_ik_constraint_set_active(spine_ik_constraint self, bool active); +SPINE_C_API spine_rtti spine_ik_constraint_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_IKCONSTRAINT_H \ No newline at end of file +#endif /* SPINE_SPINE_IK_CONSTRAINT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/ik_constraint_data.cpp b/spine-c-new/src/generated/ik_constraint_data.cpp index b87293abe..39c5c563b 100644 --- a/spine-c-new/src/generated/ik_constraint_data.cpp +++ b/spine-c-new/src/generated/ik_constraint_data.cpp @@ -1,107 +1,60 @@ -/****************************************************************************** - * 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 "ik_constraint_data.h" #include using namespace spine; 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; + return (spine_ik_constraint_data) new (__FILE__, __LINE__) IkConstraintData(*((const String*)name)); } -void spine_ik_constraint_data_dispose(spine_ik_constraint_data obj) { - if (!obj) return; - delete (IkConstraintData *) obj; +void spine_ik_constraint_data_dispose(spine_ik_constraint_data self) { + delete (IkConstraintData*)self; } -spine_rtti spine_ik_constraint_data_get_rtti() { - return (spine_rtti) &IkConstraintData::rtti; +spine_rtti spine_ik_constraint_data_get_rtti(spine_ik_constraint_data self) { + return (spine_rtti)&((IkConstraintData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_ik_constraint_data_create_method(spine_ik_constraint_data self, spine_skeleton skeleton) { + return (spine_constraint)((IkConstraintData*)self)->create(*((Skeleton*)skeleton)); } -int32_t spine_ik_constraint_data_get_num_bones(spine_ik_constraint_data obj) { - if (!obj) return 0; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_data spine_ik_constraint_data_get_bones(spine_ik_constraint_data self) { + return (spine_array_bone_data)&((IkConstraintData*)self)->getBones(); } -spine_bone_data *spine_ik_constraint_data_get_bones(spine_ik_constraint_data obj) { - if (!obj) return nullptr; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (spine_bone_data *) _obj->getBones().buffer(); +spine_bone_data spine_ik_constraint_data_get_target(spine_ik_constraint_data self) { + return (spine_bone_data)((IkConstraintData*)self)->getTarget(); } -spine_bone_data spine_ik_constraint_data_get_target(spine_ik_constraint_data obj) { - if (!obj) return (spine_bone_data) 0; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (spine_bone_data) _obj->getTarget(); +void spine_ik_constraint_data_set_target(spine_ik_constraint_data self, spine_bone_data inValue) { + ((IkConstraintData*)self)->setTarget((BoneData *)inValue); } -void spine_ik_constraint_data_set_target(spine_ik_constraint_data obj, spine_bone_data value) { - if (!obj) return; - IkConstraintData *_obj = (IkConstraintData *) obj; - _obj->setTarget((BoneData *) value); +bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data self) { + return ((IkConstraintData*)self)->getUniform(); } -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 self, bool uniform) { + ((IkConstraintData*)self)->setUniform(uniform); } -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 char* spine_ik_constraint_data_get_name(spine_ik_constraint_data self) { + return (const char*)&((ConstraintDataGeneric*)(IkConstraintData*)self)->getName(); } -const char* spine_ik_constraint_data_get_name(spine_ik_constraint_data obj) { - if (!obj) return nullptr; - IkConstraintData *_obj = (IkConstraintData *) obj; - return (const char *) _obj->getName().buffer(); +bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data self) { + return ((ConstraintDataGeneric*)(IkConstraintData*)self)->isSkinRequired(); } -bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data obj) { - if (!obj) return false; - IkConstraintData *_obj = (IkConstraintData *) obj; - return _obj->isSkinRequired(); +spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data self) { + return (spine_ik_constraint_pose)&((ConstraintDataGeneric*)(IkConstraintData*)self)->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 (spine_ik_constraint_pose) &_obj->getSetupPose(); +void spine_ik_constraint_data_set_skin_required(spine_ik_constraint_data self, bool skinRequired) { + ((ConstraintDataGeneric*)(IkConstraintData*)self)->setSkinRequired(skinRequired); +} + +spine_rtti spine_ik_constraint_data_rtti(void) { + return (spine_rtti)&IkConstraintData::rtti; } diff --git a/spine-c-new/src/generated/ik_constraint_data.h b/spine-c-new/src/generated/ik_constraint_data.h index 62d717ed1..ddcaa0b43 100644 --- a/spine-c-new/src/generated/ik_constraint_data.h +++ b/spine-c-new/src/generated/ik_constraint_data.h @@ -1,57 +1,32 @@ -/****************************************************************************** - * 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_SPINE_IK_CONSTRAINT_DATA_H +#define SPINE_SPINE_IK_CONSTRAINT_DATA_H -#ifndef SPINE_C_IKCONSTRAINTDATA_H -#define SPINE_C_IKCONSTRAINTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_ik_constraint_data spine_ik_constraint_data_create(const char* 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_C_EXPORT spine_constraint spine_ik_constraint_data_create(spine_ik_constraint_data obj, spine_skeleton skeleton); -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 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); +SPINE_C_API void spine_ik_constraint_data_dispose(spine_ik_constraint_data self); + +SPINE_C_API spine_rtti spine_ik_constraint_data_get_rtti(spine_ik_constraint_data self); +SPINE_C_API spine_constraint spine_ik_constraint_data_create_method(spine_ik_constraint_data self, spine_skeleton skeleton); +SPINE_C_API spine_array_bone_data spine_ik_constraint_data_get_bones(spine_ik_constraint_data self); +SPINE_C_API spine_bone_data spine_ik_constraint_data_get_target(spine_ik_constraint_data self); +SPINE_C_API void spine_ik_constraint_data_set_target(spine_ik_constraint_data self, spine_bone_data inValue); +SPINE_C_API bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data self); +SPINE_C_API void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data self, bool uniform); +SPINE_C_API const char* spine_ik_constraint_data_get_name(spine_ik_constraint_data self); +SPINE_C_API bool spine_ik_constraint_data_is_skin_required(spine_ik_constraint_data self); +SPINE_C_API spine_ik_constraint_pose spine_ik_constraint_data_get_setup_pose(spine_ik_constraint_data self); +SPINE_C_API void spine_ik_constraint_data_set_skin_required(spine_ik_constraint_data self, bool skinRequired); +SPINE_C_API spine_rtti spine_ik_constraint_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_IKCONSTRAINTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_IK_CONSTRAINT_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/ik_constraint_pose.cpp b/spine-c-new/src/generated/ik_constraint_pose.cpp index 82818d074..0a09fbee2 100644 --- a/spine-c-new/src/generated/ik_constraint_pose.cpp +++ b/spine-c-new/src/generated/ik_constraint_pose.cpp @@ -1,109 +1,56 @@ -/****************************************************************************** - * 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 "ik_constraint_pose.h" #include using namespace spine; spine_ik_constraint_pose spine_ik_constraint_pose_create(void) { - IkConstraintPose *obj = new (__FILE__, __LINE__) IkConstraintPose(); - return (spine_ik_constraint_pose) obj; + return (spine_ik_constraint_pose) new (__FILE__, __LINE__) IkConstraintPose(); } -void spine_ik_constraint_pose_dispose(spine_ik_constraint_pose obj) { - if (!obj) return; - delete (IkConstraintPose *) obj; +void spine_ik_constraint_pose_dispose(spine_ik_constraint_pose self) { + delete (IkConstraintPose*)self; } -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(*((IkConstraintPose*) value)); +void spine_ik_constraint_pose_set(spine_ik_constraint_pose self, spine_ik_constraint_pose pose) { + ((IkConstraintPose*)self)->set(*((IkConstraintPose*)pose)); } -float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose obj) { - if (!obj) return 0; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - return _obj->getMix(); +float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose self) { + return ((IkConstraintPose*)self)->getMix(); } -void spine_ik_constraint_pose_set_mix(spine_ik_constraint_pose obj, float value) { - if (!obj) return; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - _obj->setMix(value); +void spine_ik_constraint_pose_set_mix(spine_ik_constraint_pose self, float mix) { + ((IkConstraintPose*)self)->setMix(mix); } -float spine_ik_constraint_pose_get_softness(spine_ik_constraint_pose obj) { - if (!obj) return 0; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - return _obj->getSoftness(); +float spine_ik_constraint_pose_get_softness(spine_ik_constraint_pose self) { + return ((IkConstraintPose*)self)->getSoftness(); } -void spine_ik_constraint_pose_set_softness(spine_ik_constraint_pose obj, float value) { - if (!obj) return; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - _obj->setSoftness(value); +void spine_ik_constraint_pose_set_softness(spine_ik_constraint_pose self, float softness) { + ((IkConstraintPose*)self)->setSoftness(softness); } -int spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose obj) { - if (!obj) return 0; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - return _obj->getBendDirection(); +int spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose self) { + return ((IkConstraintPose*)self)->getBendDirection(); } -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); +void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose self, int bendDirection) { + ((IkConstraintPose*)self)->setBendDirection(bendDirection); } -bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose obj) { - if (!obj) return false; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - return _obj->getCompress(); +bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose self) { + return ((IkConstraintPose*)self)->getCompress(); } -void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose obj, bool value) { - if (!obj) return; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - _obj->setCompress(value); +void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose self, bool compress) { + ((IkConstraintPose*)self)->setCompress(compress); } -bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose obj) { - if (!obj) return false; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - return _obj->getStretch(); +bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose self) { + return ((IkConstraintPose*)self)->getStretch(); } -void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose obj, bool value) { - if (!obj) return; - IkConstraintPose *_obj = (IkConstraintPose *) obj; - _obj->setStretch(value); +void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose self, bool stretch) { + ((IkConstraintPose*)self)->setStretch(stretch); } diff --git a/spine-c-new/src/generated/ik_constraint_pose.h b/spine-c-new/src/generated/ik_constraint_pose.h index 668284bee..6b1117fae 100644 --- a/spine-c-new/src/generated/ik_constraint_pose.h +++ b/spine-c-new/src/generated/ik_constraint_pose.h @@ -1,57 +1,31 @@ -/****************************************************************************** - * 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_SPINE_IK_CONSTRAINT_POSE_H +#define SPINE_SPINE_IK_CONSTRAINT_POSE_H -#ifndef SPINE_C_IKCONSTRAINTPOSE_H -#define SPINE_C_IKCONSTRAINTPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_ik_constraint_pose spine_ik_constraint_pose_create(void); -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); -SPINE_C_EXPORT void spine_ik_constraint_pose_set(spine_ik_constraint_pose obj, spine_ik_constraint_pose value); -SPINE_C_EXPORT float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose obj); -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 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); +SPINE_C_API void spine_ik_constraint_pose_dispose(spine_ik_constraint_pose self); + +SPINE_C_API void spine_ik_constraint_pose_set(spine_ik_constraint_pose self, spine_ik_constraint_pose pose); +SPINE_C_API float spine_ik_constraint_pose_get_mix(spine_ik_constraint_pose self); +SPINE_C_API void spine_ik_constraint_pose_set_mix(spine_ik_constraint_pose self, float mix); +SPINE_C_API float spine_ik_constraint_pose_get_softness(spine_ik_constraint_pose self); +SPINE_C_API void spine_ik_constraint_pose_set_softness(spine_ik_constraint_pose self, float softness); +SPINE_C_API int spine_ik_constraint_pose_get_bend_direction(spine_ik_constraint_pose self); +SPINE_C_API void spine_ik_constraint_pose_set_bend_direction(spine_ik_constraint_pose self, int bendDirection); +SPINE_C_API bool spine_ik_constraint_pose_get_compress(spine_ik_constraint_pose self); +SPINE_C_API void spine_ik_constraint_pose_set_compress(spine_ik_constraint_pose self, bool compress); +SPINE_C_API bool spine_ik_constraint_pose_get_stretch(spine_ik_constraint_pose self); +SPINE_C_API void spine_ik_constraint_pose_set_stretch(spine_ik_constraint_pose self, bool stretch); #ifdef __cplusplus } #endif -#endif // SPINE_C_IKCONSTRAINTPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_IK_CONSTRAINT_POSE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/ik_constraint_timeline.cpp b/spine-c-new/src/generated/ik_constraint_timeline.cpp index 12dc71093..dcf45c15b 100644 --- a/spine-c-new/src/generated/ik_constraint_timeline.cpp +++ b/spine-c-new/src/generated/ik_constraint_timeline.cpp @@ -1,149 +1,76 @@ -/****************************************************************************** - * 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 "ik_constraint_timeline.h" #include using namespace spine; 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; + return (spine_ik_constraint_timeline) new (__FILE__, __LINE__) IkConstraintTimeline(frameCount, bezierCount, constraintIndex); } -void spine_ik_constraint_timeline_dispose(spine_ik_constraint_timeline obj) { - if (!obj) return; - delete (IkConstraintTimeline *) obj; +void spine_ik_constraint_timeline_dispose(spine_ik_constraint_timeline self) { + delete (IkConstraintTimeline*)self; } -spine_rtti spine_ik_constraint_timeline_get_rtti() { - return (spine_rtti) &IkConstraintTimeline::rtti; +spine_rtti spine_ik_constraint_timeline_get_rtti(spine_ik_constraint_timeline self) { + return (spine_rtti)&((IkConstraintTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((IkConstraintTimeline*)self)->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, 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_frame(spine_ik_constraint_timeline self, int frame, float time, float mix, float softness, int bendDirection, bool compress, bool stretch) { + ((IkConstraintTimeline*)self)->setFrame(frame, time, mix, softness, bendDirection, compress, stretch); } -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_linear(spine_ik_constraint_timeline self, size_t frame) { + ((CurveTimeline*)(IkConstraintTimeline*)self)->setLinear(frame); } -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_stepped(spine_ik_constraint_timeline self, size_t frame) { + ((CurveTimeline*)(IkConstraintTimeline*)self)->setStepped(frame); } -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); +void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(IkConstraintTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(IkConstraintTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline*)(IkConstraintTimeline*)self)->getCurves(); } -float *spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline self) { + return ((CurveTimeline*)(IkConstraintTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline self) { + return ((CurveTimeline*)(IkConstraintTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline*)(IkConstraintTimeline*)self)->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(); +float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline self) { + return ((CurveTimeline*)(IkConstraintTimeline*)self)->getDuration(); } -float *spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline self) { + return (spine_array_property_id)&((CurveTimeline*)(IkConstraintTimeline*)self)->getPropertyIds(); } -float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline obj) { - if (!obj) return 0; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return _obj->getDuration(); +int spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline self) { + return ((ConstraintTimeline*)(IkConstraintTimeline*)self)->getConstraintIndex(); } -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(); +void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline self, int inValue) { + ((ConstraintTimeline*)(IkConstraintTimeline*)self)->setConstraintIndex(inValue); } -int64_t *spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline obj) { - if (!obj) return nullptr; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - IkConstraintTimeline *_obj = (IkConstraintTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_ik_constraint_timeline_rtti(void) { + return (spine_rtti)&IkConstraintTimeline::rtti; } diff --git a/spine-c-new/src/generated/ik_constraint_timeline.h b/spine-c-new/src/generated/ik_constraint_timeline.h index 54d9316ae..6133c10f9 100644 --- a/spine-c-new/src/generated/ik_constraint_timeline.h +++ b/spine-c-new/src/generated/ik_constraint_timeline.h @@ -1,64 +1,36 @@ -/****************************************************************************** - * 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_SPINE_IK_CONSTRAINT_TIMELINE_H +#define SPINE_SPINE_IK_CONSTRAINT_TIMELINE_H -#ifndef SPINE_C_IKCONSTRAINTTIMELINE_H -#define SPINE_C_IKCONSTRAINTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_ik_constraint_timeline spine_ik_constraint_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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 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 int32_t spine_ik_constraint_timeline_get_num_property_ids(spine_ik_constraint_timeline obj); -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); +SPINE_C_API void spine_ik_constraint_timeline_dispose(spine_ik_constraint_timeline self); + +SPINE_C_API spine_rtti spine_ik_constraint_timeline_get_rtti(spine_ik_constraint_timeline self); +SPINE_C_API void spine_ik_constraint_timeline_apply(spine_ik_constraint_timeline self, 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_API void spine_ik_constraint_timeline_set_frame(spine_ik_constraint_timeline self, int frame, float time, float mix, float softness, int bendDirection, bool compress, bool stretch); +SPINE_C_API void spine_ik_constraint_timeline_set_linear(spine_ik_constraint_timeline self, size_t frame); +SPINE_C_API void spine_ik_constraint_timeline_set_stepped(spine_ik_constraint_timeline self, size_t frame); +SPINE_C_API void spine_ik_constraint_timeline_set_bezier(spine_ik_constraint_timeline self, 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_API float spine_ik_constraint_timeline_get_bezier_value(spine_ik_constraint_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_ik_constraint_timeline_get_curves(spine_ik_constraint_timeline self); +SPINE_C_API size_t spine_ik_constraint_timeline_get_frame_entries(spine_ik_constraint_timeline self); +SPINE_C_API size_t spine_ik_constraint_timeline_get_frame_count(spine_ik_constraint_timeline self); +SPINE_C_API spine_array_float spine_ik_constraint_timeline_get_frames(spine_ik_constraint_timeline self); +SPINE_C_API float spine_ik_constraint_timeline_get_duration(spine_ik_constraint_timeline self); +SPINE_C_API spine_array_property_id spine_ik_constraint_timeline_get_property_ids(spine_ik_constraint_timeline self); +SPINE_C_API int spine_ik_constraint_timeline_get_constraint_index(spine_ik_constraint_timeline self); +SPINE_C_API void spine_ik_constraint_timeline_set_constraint_index(spine_ik_constraint_timeline self, int inValue); +SPINE_C_API spine_rtti spine_ik_constraint_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_IKCONSTRAINTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_IK_CONSTRAINT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/inherit.h b/spine-c-new/src/generated/inherit.h index 5e206d778..747d03a35 100644 --- a/spine-c-new/src/generated/inherit.h +++ b/spine-c-new/src/generated/inherit.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_INHERIT_H -#define SPINE_C_INHERIT_H - -#include "../base.h" +#ifndef SPINE_SPINE_INHERIT_H +#define SPINE_SPINE_INHERIT_H #ifdef __cplusplus extern "C" { @@ -48,4 +17,4 @@ typedef enum spine_inherit { } #endif -#endif // SPINE_C_INHERIT_H \ No newline at end of file +#endif /* SPINE_SPINE_INHERIT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/inherit_timeline.cpp b/spine-c-new/src/generated/inherit_timeline.cpp index b888e7f33..424bfbb3d 100644 --- a/spine-c-new/src/generated/inherit_timeline.cpp +++ b/spine-c-new/src/generated/inherit_timeline.cpp @@ -1,113 +1,56 @@ -/****************************************************************************** - * 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 "inherit_timeline.h" #include using namespace spine; 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; + return (spine_inherit_timeline) new (__FILE__, __LINE__) InheritTimeline(frameCount, boneIndex); } -void spine_inherit_timeline_dispose(spine_inherit_timeline obj) { - if (!obj) return; - delete (InheritTimeline *) obj; +void spine_inherit_timeline_dispose(spine_inherit_timeline self) { + delete (InheritTimeline*)self; } -spine_rtti spine_inherit_timeline_get_rtti() { - return (spine_rtti) &InheritTimeline::rtti; +spine_rtti spine_inherit_timeline_get_rtti(spine_inherit_timeline self) { + return (spine_rtti)&((InheritTimeline*)self)->getRTTI(); } -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) inherit); +void spine_inherit_timeline_set_frame(spine_inherit_timeline self, int frame, float time, spine_inherit inherit) { + ((InheritTimeline*)self)->setFrame(frame, time, (Inherit)inherit); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_inherit_timeline_apply(spine_inherit_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((InheritTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline obj) { - if (!obj) return 0; - InheritTimeline *_obj = (InheritTimeline *) obj; - return _obj->getFrameEntries(); +size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline self) { + return ((Timeline*)(InheritTimeline*)self)->getFrameEntries(); } -size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline obj) { - if (!obj) return 0; - InheritTimeline *_obj = (InheritTimeline *) obj; - return _obj->getFrameCount(); +size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline self) { + return ((Timeline*)(InheritTimeline*)self)->getFrameCount(); } -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_array_float spine_inherit_timeline_get_frames(spine_inherit_timeline self) { + return (spine_array_float)&((Timeline*)(InheritTimeline*)self)->getFrames(); } -float *spine_inherit_timeline_get_frames(spine_inherit_timeline obj) { - if (!obj) return nullptr; - InheritTimeline *_obj = (InheritTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +float spine_inherit_timeline_get_duration(spine_inherit_timeline self) { + return ((Timeline*)(InheritTimeline*)self)->getDuration(); } -float spine_inherit_timeline_get_duration(spine_inherit_timeline obj) { - if (!obj) return 0; - InheritTimeline *_obj = (InheritTimeline *) obj; - return _obj->getDuration(); +spine_array_property_id spine_inherit_timeline_get_property_ids(spine_inherit_timeline self) { + return (spine_array_property_id)&((Timeline*)(InheritTimeline*)self)->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(); +int spine_inherit_timeline_get_bone_index(spine_inherit_timeline self) { + return ((BoneTimeline*)(InheritTimeline*)self)->getBoneIndex(); } -int64_t *spine_inherit_timeline_get_property_ids(spine_inherit_timeline obj) { - if (!obj) return nullptr; - InheritTimeline *_obj = (InheritTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +void spine_inherit_timeline_set_bone_index(spine_inherit_timeline self, int inValue) { + ((BoneTimeline*)(InheritTimeline*)self)->setBoneIndex(inValue); } -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, int value) { - if (!obj) return; - InheritTimeline *_obj = (InheritTimeline *) obj; - _obj->setBoneIndex(value); +spine_rtti spine_inherit_timeline_rtti(void) { + return (spine_rtti)&InheritTimeline::rtti; } diff --git a/spine-c-new/src/generated/inherit_timeline.h b/spine-c-new/src/generated/inherit_timeline.h index dc35c936a..ca563ce5b 100644 --- a/spine-c-new/src/generated/inherit_timeline.h +++ b/spine-c-new/src/generated/inherit_timeline.h @@ -1,58 +1,31 @@ -/****************************************************************************** - * 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_SPINE_INHERIT_TIMELINE_H +#define SPINE_SPINE_INHERIT_TIMELINE_H -#ifndef SPINE_C_INHERITTIMELINE_H -#define SPINE_C_INHERITTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_inherit_timeline spine_inherit_timeline_create(size_t frameCount, int 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_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 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 int32_t spine_inherit_timeline_get_num_property_ids(spine_inherit_timeline obj); -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); +SPINE_C_API void spine_inherit_timeline_dispose(spine_inherit_timeline self); + +SPINE_C_API spine_rtti spine_inherit_timeline_get_rtti(spine_inherit_timeline self); +SPINE_C_API void spine_inherit_timeline_set_frame(spine_inherit_timeline self, int frame, float time, spine_inherit inherit); +SPINE_C_API void spine_inherit_timeline_apply(spine_inherit_timeline self, 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_API size_t spine_inherit_timeline_get_frame_entries(spine_inherit_timeline self); +SPINE_C_API size_t spine_inherit_timeline_get_frame_count(spine_inherit_timeline self); +SPINE_C_API spine_array_float spine_inherit_timeline_get_frames(spine_inherit_timeline self); +SPINE_C_API float spine_inherit_timeline_get_duration(spine_inherit_timeline self); +SPINE_C_API spine_array_property_id spine_inherit_timeline_get_property_ids(spine_inherit_timeline self); +SPINE_C_API int spine_inherit_timeline_get_bone_index(spine_inherit_timeline self); +SPINE_C_API void spine_inherit_timeline_set_bone_index(spine_inherit_timeline self, int inValue); +SPINE_C_API spine_rtti spine_inherit_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_INHERITTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_INHERIT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/interpolation.cpp b/spine-c-new/src/generated/interpolation.cpp deleted file mode 100644 index bb60863b5..000000000 --- a/spine-c-new/src/generated/interpolation.cpp +++ /dev/null @@ -1,50 +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 "interpolation.h" -#include - -using namespace spine; - -void spine_interpolation_dispose(spine_interpolation obj) { - if (!obj) return; - delete (Interpolation *) obj; -} - -float spine_interpolation_apply(spine_interpolation obj, float a) { - if (!obj) return 0; - Interpolation *_obj = (Interpolation *) obj; - return _obj->apply(a); -} - -float spine_interpolation_interpolate(spine_interpolation obj, float start, float end, float a) { - if (!obj) return 0; - Interpolation *_obj = (Interpolation *) obj; - return _obj->interpolate(start, end, a); -} diff --git a/spine-c-new/src/generated/interpolation.h b/spine-c-new/src/generated/interpolation.h deleted file mode 100644 index f39f87192..000000000 --- a/spine-c-new/src/generated/interpolation.h +++ /dev/null @@ -1,47 +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_INTERPOLATION_H -#define SPINE_C_INTERPOLATION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#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); -SPINE_C_EXPORT float spine_interpolation_interpolate(spine_interpolation obj, float start, float end, float a); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_INTERPOLATION_H \ No newline at end of file diff --git a/spine-c-new/src/generated/linked_mesh.cpp b/spine-c-new/src/generated/linked_mesh.cpp index b25811d00..c83bfd90d 100644 --- a/spine-c-new/src/generated/linked_mesh.cpp +++ b/spine-c-new/src/generated/linked_mesh.cpp @@ -1,48 +1,16 @@ -/****************************************************************************** - * 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 "linked_mesh.h" #include using namespace spine; 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; + return (spine_linked_mesh) new (__FILE__, __LINE__) LinkedMesh((MeshAttachment *)mesh, skinIndex, slotIndex, *((const String*)parent), 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; +spine_linked_mesh spine_linked_mesh_create2(spine_mesh_attachment mesh, const char* skin, size_t slotIndex, const char* parent, bool inheritTimelines) { + return (spine_linked_mesh) new (__FILE__, __LINE__) LinkedMesh((MeshAttachment *)mesh, *((const String*)skin), slotIndex, *((const String*)parent), inheritTimelines); } -void spine_linked_mesh_dispose(spine_linked_mesh obj) { - if (!obj) return; - delete (LinkedMesh *) obj; +void spine_linked_mesh_dispose(spine_linked_mesh self) { + delete (LinkedMesh*)self; } diff --git a/spine-c-new/src/generated/linked_mesh.h b/spine-c-new/src/generated/linked_mesh.h index 030264c02..818ebadce 100644 --- a/spine-c-new/src/generated/linked_mesh.h +++ b/spine-c-new/src/generated/linked_mesh.h @@ -1,47 +1,21 @@ -/****************************************************************************** - * 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_SPINE_LINKED_MESH_H +#define SPINE_SPINE_LINKED_MESH_H -#ifndef SPINE_C_LINKEDMESH_H -#define SPINE_C_LINKEDMESH_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_linked_mesh spine_linked_mesh_create(spine_mesh_attachment mesh, const int skinIndex, size_t slotIndex, const char* parent, bool inheritTimelines); +SPINE_C_API spine_linked_mesh spine_linked_mesh_create2(spine_mesh_attachment mesh, const char* skin, size_t slotIndex, const char* parent, bool inheritTimelines); + +SPINE_C_API void spine_linked_mesh_dispose(spine_linked_mesh self); -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 } #endif -#endif // SPINE_C_LINKEDMESH_H \ No newline at end of file +#endif /* SPINE_SPINE_LINKED_MESH_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/mesh_attachment.cpp b/spine-c-new/src/generated/mesh_attachment.cpp index a6cece6ac..b06b190ca 100644 --- a/spine-c-new/src/generated/mesh_attachment.cpp +++ b/spine-c-new/src/generated/mesh_attachment.cpp @@ -1,305 +1,184 @@ -/****************************************************************************** - * 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 "mesh_attachment.h" #include using namespace spine; spine_mesh_attachment spine_mesh_attachment_create(const char* name) { - MeshAttachment *obj = new (__FILE__, __LINE__) MeshAttachment(String(name)); - return (spine_mesh_attachment) obj; + return (spine_mesh_attachment) new (__FILE__, __LINE__) MeshAttachment(*((const String*)name)); } -void spine_mesh_attachment_dispose(spine_mesh_attachment obj) { - if (!obj) return; - delete (MeshAttachment *) obj; +void spine_mesh_attachment_dispose(spine_mesh_attachment self) { + delete (MeshAttachment*)self; } -spine_rtti spine_mesh_attachment_get_rtti() { - return (spine_rtti) &MeshAttachment::rtti; +spine_rtti spine_mesh_attachment_get_rtti(spine_mesh_attachment self) { + return (spine_rtti)&((MeshAttachment*)self)->getRTTI(); } -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*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); +void spine_mesh_attachment_compute_world_vertices_1(spine_mesh_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { + ((MeshAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, worldVertices, offset, stride); } -void spine_mesh_attachment_update_region(spine_mesh_attachment obj) { - if (!obj) return ; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->updateRegion(); +void spine_mesh_attachment_compute_world_vertices_2(spine_mesh_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(MeshAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, *((Array*)worldVertices), offset, stride); } -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_update_region(spine_mesh_attachment self) { + ((MeshAttachment*)self)->updateRegion(); } -void spine_mesh_attachment_set_hull_length(spine_mesh_attachment obj, int value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setHullLength(value); +int spine_mesh_attachment_get_hull_length(spine_mesh_attachment self) { + return ((MeshAttachment*)self)->getHullLength(); } -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(); +void spine_mesh_attachment_set_hull_length(spine_mesh_attachment self, int inValue) { + ((MeshAttachment*)self)->setHullLength(inValue); } -float *spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (float *) _obj->getRegionUVs().buffer(); +spine_array_float spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment self) { + return (spine_array_float)&((MeshAttachment*)self)->getRegionUVs(); } -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((Array &) value); +void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment self, spine_array_float inValue) { + ((MeshAttachment*)self)->setRegionUVs(*((Array*)inValue)); } -int32_t spine_mesh_attachment_get_num_u_vs(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (int32_t) _obj->getUVs().size(); +spine_array_float spine_mesh_attachment_get_u_vs(spine_mesh_attachment self) { + return (spine_array_float)&((MeshAttachment*)self)->getUVs(); } -float *spine_mesh_attachment_get_u_vs(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (float *) _obj->getUVs().buffer(); +spine_array_unsigned_short spine_mesh_attachment_get_triangles(spine_mesh_attachment self) { + return (spine_array_unsigned_short)&((MeshAttachment*)self)->getTriangles(); } -int32_t spine_mesh_attachment_get_num_triangles(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (int32_t) _obj->getTriangles().size(); +void spine_mesh_attachment_set_triangles(spine_mesh_attachment self, spine_array_unsigned_short inValue) { + ((MeshAttachment*)self)->setTriangles(*((Array*)inValue)); } -spine_unsigned short *spine_mesh_attachment_get_triangles(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_unsigned short *) _obj->getTriangles().buffer(); +spine_color spine_mesh_attachment_get_color(spine_mesh_attachment self) { + return (spine_color)&((MeshAttachment*)self)->getColor(); } -void spine_mesh_attachment_set_triangles(spine_mesh_attachment obj, spine_array_unsigned_short value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setTriangles((Array &) value); +const char* spine_mesh_attachment_get_path(spine_mesh_attachment self) { + return (const char*)&((MeshAttachment*)self)->getPath(); } -spine_color spine_mesh_attachment_get_color(spine_mesh_attachment obj) { - if (!obj) return (spine_color) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_color) &_obj->getColor(); +void spine_mesh_attachment_set_path(spine_mesh_attachment self, const char* inValue) { + ((MeshAttachment*)self)->setPath(*((const String*)inValue)); } -const char* spine_mesh_attachment_get_path(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (const char *) _obj->getPath().buffer(); +spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment self) { + return (spine_texture_region)((MeshAttachment*)self)->getRegion(); } -void spine_mesh_attachment_set_path(spine_mesh_attachment obj, const char* value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setPath(String(value)); +void spine_mesh_attachment_set_region(spine_mesh_attachment self, spine_texture_region region) { + ((MeshAttachment*)self)->setRegion((TextureRegion *)region); } -spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment obj) { - if (!obj) return (spine_texture_region) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_texture_region) _obj->getRegion(); +spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment self) { + return (spine_sequence)((MeshAttachment*)self)->getSequence(); } -void spine_mesh_attachment_set_region(spine_mesh_attachment obj, spine_texture_region value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setRegion((TextureRegion *) value); +void spine_mesh_attachment_set_sequence(spine_mesh_attachment self, spine_sequence sequence) { + ((MeshAttachment*)self)->setSequence((Sequence *)sequence); } -spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment obj) { - if (!obj) return (spine_sequence) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_sequence) _obj->getSequence(); +spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment self) { + return (spine_mesh_attachment)((MeshAttachment*)self)->getParentMesh(); } -void spine_mesh_attachment_set_sequence(spine_mesh_attachment obj, spine_sequence value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setSequence((Sequence *) value); +void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment self, spine_mesh_attachment inValue) { + ((MeshAttachment*)self)->setParentMesh((MeshAttachment *)inValue); } -spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment obj) { - if (!obj) return (spine_mesh_attachment) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_mesh_attachment) _obj->getParentMesh(); +spine_array_unsigned_short spine_mesh_attachment_get_edges(spine_mesh_attachment self) { + return (spine_array_unsigned_short)&((MeshAttachment*)self)->getEdges(); } -void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment obj, spine_mesh_attachment value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setParentMesh((MeshAttachment *) value); +void spine_mesh_attachment_set_edges(spine_mesh_attachment self, spine_array_unsigned_short inValue) { + ((MeshAttachment*)self)->setEdges(*((Array*)inValue)); } -int32_t spine_mesh_attachment_get_num_edges(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (int32_t) _obj->getEdges().size(); +float spine_mesh_attachment_get_width(spine_mesh_attachment self) { + return ((MeshAttachment*)self)->getWidth(); } -spine_unsigned short *spine_mesh_attachment_get_edges(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_unsigned short *) _obj->getEdges().buffer(); +void spine_mesh_attachment_set_width(spine_mesh_attachment self, float inValue) { + ((MeshAttachment*)self)->setWidth(inValue); } -void spine_mesh_attachment_set_edges(spine_mesh_attachment obj, spine_array_unsigned_short value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setEdges((Array &) value); +float spine_mesh_attachment_get_height(spine_mesh_attachment self) { + return ((MeshAttachment*)self)->getHeight(); } -float spine_mesh_attachment_get_width(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getWidth(); +void spine_mesh_attachment_set_height(spine_mesh_attachment self, float inValue) { + ((MeshAttachment*)self)->setHeight(inValue); } -void spine_mesh_attachment_set_width(spine_mesh_attachment obj, float value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setWidth(value); +spine_attachment spine_mesh_attachment_copy(spine_mesh_attachment self) { + return (spine_attachment)((MeshAttachment*)self)->copy(); } -float spine_mesh_attachment_get_height(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getHeight(); +spine_mesh_attachment spine_mesh_attachment_new_linked_mesh(spine_mesh_attachment self) { + return (spine_mesh_attachment)((MeshAttachment*)self)->newLinkedMesh(); } -void spine_mesh_attachment_set_height(spine_mesh_attachment obj, float value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setHeight(value); +int spine_mesh_attachment_get_id(spine_mesh_attachment self) { + return ((VertexAttachment*)(MeshAttachment*)self)->getId(); } -spine_attachment spine_mesh_attachment_copy(spine_mesh_attachment obj) { - if (!obj) return (spine_attachment) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_attachment) _obj->copy(); +spine_array_int spine_mesh_attachment_get_bones(spine_mesh_attachment self) { + return (spine_array_int)&((VertexAttachment*)(MeshAttachment*)self)->getBones(); } -spine_mesh_attachment spine_mesh_attachment_new_linked_mesh(spine_mesh_attachment obj) { - if (!obj) return (spine_mesh_attachment) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_mesh_attachment) _obj->newLinkedMesh(); +void spine_mesh_attachment_set_bones(spine_mesh_attachment self, spine_array_int bones) { + ((VertexAttachment*)(MeshAttachment*)self)->setBones(*((Array*)bones)); } -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*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); +spine_array_float spine_mesh_attachment_get_vertices(spine_mesh_attachment self) { + return (spine_array_float)&((VertexAttachment*)(MeshAttachment*)self)->getVertices(); } -int spine_mesh_attachment_get_id(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getId(); +void spine_mesh_attachment_set_vertices(spine_mesh_attachment self, spine_array_float vertices) { + ((VertexAttachment*)(MeshAttachment*)self)->setVertices(*((Array*)vertices)); } -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(); +size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment self) { + return ((VertexAttachment*)(MeshAttachment*)self)->getWorldVerticesLength(); } -int *spine_mesh_attachment_get_bones(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (int *) _obj->getBones().buffer(); +void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment self, size_t inValue) { + ((VertexAttachment*)(MeshAttachment*)self)->setWorldVerticesLength(inValue); } -void spine_mesh_attachment_set_bones(spine_mesh_attachment obj, spine_array_int value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setBones((Array &) value); +spine_attachment spine_mesh_attachment_get_timeline_attachment(spine_mesh_attachment self) { + return (spine_attachment)((VertexAttachment*)(MeshAttachment*)self)->getTimelineAttachment(); } -int32_t spine_mesh_attachment_get_num_vertices(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (int32_t) _obj->getVertices().size(); +void spine_mesh_attachment_set_timeline_attachment(spine_mesh_attachment self, spine_attachment attachment) { + ((VertexAttachment*)(MeshAttachment*)self)->setTimelineAttachment((Attachment *)attachment); } -float *spine_mesh_attachment_get_vertices(spine_mesh_attachment obj) { - if (!obj) return nullptr; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (float *) _obj->getVertices().buffer(); +void spine_mesh_attachment_copy_to(spine_mesh_attachment self, spine_vertex_attachment other) { + ((VertexAttachment*)(MeshAttachment*)self)->copyTo((VertexAttachment *)other); } -void spine_mesh_attachment_set_vertices(spine_mesh_attachment obj, spine_array_float value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setVertices((Array &) value); +const char* spine_mesh_attachment_get_name(spine_mesh_attachment self) { + return (const char*)&((VertexAttachment*)(MeshAttachment*)self)->getName(); } -size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment obj) { - if (!obj) return 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return _obj->getWorldVerticesLength(); +int spine_mesh_attachment_get_ref_count(spine_mesh_attachment self) { + return ((VertexAttachment*)(MeshAttachment*)self)->getRefCount(); } -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); +void spine_mesh_attachment_reference(spine_mesh_attachment self) { + ((VertexAttachment*)(MeshAttachment*)self)->reference(); } -spine_attachment spine_mesh_attachment_get_timeline_attachment(spine_mesh_attachment obj) { - if (!obj) return (spine_attachment) 0; - MeshAttachment *_obj = (MeshAttachment *) obj; - return (spine_attachment) _obj->getTimelineAttachment(); +void spine_mesh_attachment_dereference(spine_mesh_attachment self) { + ((VertexAttachment*)(MeshAttachment*)self)->dereference(); } -void spine_mesh_attachment_set_timeline_attachment(spine_mesh_attachment obj, spine_attachment value) { - if (!obj) return; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->setTimelineAttachment((Attachment *) value); -} - -void spine_mesh_attachment_copy_to(spine_mesh_attachment obj, spine_vertex_attachment other) { - if (!obj) return ; - MeshAttachment *_obj = (MeshAttachment *) obj; - _obj->copyTo((VertexAttachment *) other); +spine_rtti spine_mesh_attachment_rtti(void) { + return (spine_rtti)&MeshAttachment::rtti; } diff --git a/spine-c-new/src/generated/mesh_attachment.h b/spine-c-new/src/generated/mesh_attachment.h index 857f1414c..86c31cd22 100644 --- a/spine-c-new/src/generated/mesh_attachment.h +++ b/spine-c-new/src/generated/mesh_attachment.h @@ -1,90 +1,63 @@ -/****************************************************************************** - * 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_SPINE_MESH_ATTACHMENT_H +#define SPINE_SPINE_MESH_ATTACHMENT_H -#ifndef SPINE_C_MESHATTACHMENT_H -#define SPINE_C_MESHATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_mesh_attachment spine_mesh_attachment_create(const char* 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_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 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 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 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, spine_array_unsigned_short value); -SPINE_C_EXPORT spine_color spine_mesh_attachment_get_color(spine_mesh_attachment obj); -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 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, 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_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 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 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); +SPINE_C_API void spine_mesh_attachment_dispose(spine_mesh_attachment self); + +SPINE_C_API spine_rtti spine_mesh_attachment_get_rtti(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_compute_world_vertices_1(spine_mesh_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_mesh_attachment_compute_world_vertices_2(spine_mesh_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_mesh_attachment_update_region(spine_mesh_attachment self); +SPINE_C_API int spine_mesh_attachment_get_hull_length(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_hull_length(spine_mesh_attachment self, int inValue); +SPINE_C_API spine_array_float spine_mesh_attachment_get_region_u_vs(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_region_u_vs(spine_mesh_attachment self, spine_array_float inValue); +SPINE_C_API spine_array_float spine_mesh_attachment_get_u_vs(spine_mesh_attachment self); +SPINE_C_API spine_array_unsigned_short spine_mesh_attachment_get_triangles(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_triangles(spine_mesh_attachment self, spine_array_unsigned_short inValue); +SPINE_C_API spine_color spine_mesh_attachment_get_color(spine_mesh_attachment self); +SPINE_C_API const char* spine_mesh_attachment_get_path(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_path(spine_mesh_attachment self, const char* inValue); +SPINE_C_API spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_region(spine_mesh_attachment self, spine_texture_region region); +SPINE_C_API spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_sequence(spine_mesh_attachment self, spine_sequence sequence); +SPINE_C_API spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment self, spine_mesh_attachment inValue); +SPINE_C_API spine_array_unsigned_short spine_mesh_attachment_get_edges(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_edges(spine_mesh_attachment self, spine_array_unsigned_short inValue); +SPINE_C_API float spine_mesh_attachment_get_width(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_width(spine_mesh_attachment self, float inValue); +SPINE_C_API float spine_mesh_attachment_get_height(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_height(spine_mesh_attachment self, float inValue); +SPINE_C_API spine_attachment spine_mesh_attachment_copy(spine_mesh_attachment self); +SPINE_C_API spine_mesh_attachment spine_mesh_attachment_new_linked_mesh(spine_mesh_attachment self); +SPINE_C_API int spine_mesh_attachment_get_id(spine_mesh_attachment self); +SPINE_C_API spine_array_int spine_mesh_attachment_get_bones(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_bones(spine_mesh_attachment self, spine_array_int bones); +SPINE_C_API spine_array_float spine_mesh_attachment_get_vertices(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_vertices(spine_mesh_attachment self, spine_array_float vertices); +SPINE_C_API size_t spine_mesh_attachment_get_world_vertices_length(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_world_vertices_length(spine_mesh_attachment self, size_t inValue); +SPINE_C_API spine_attachment spine_mesh_attachment_get_timeline_attachment(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_set_timeline_attachment(spine_mesh_attachment self, spine_attachment attachment); +SPINE_C_API void spine_mesh_attachment_copy_to(spine_mesh_attachment self, spine_vertex_attachment other); +SPINE_C_API const char* spine_mesh_attachment_get_name(spine_mesh_attachment self); +SPINE_C_API int spine_mesh_attachment_get_ref_count(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_reference(spine_mesh_attachment self); +SPINE_C_API void spine_mesh_attachment_dereference(spine_mesh_attachment self); +SPINE_C_API spine_rtti spine_mesh_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_MESHATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_MESH_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/mix_blend.h b/spine-c-new/src/generated/mix_blend.h index fc947349c..7629a333b 100644 --- a/spine-c-new/src/generated/mix_blend.h +++ b/spine-c-new/src/generated/mix_blend.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_MIXBLEND_H -#define SPINE_C_MIXBLEND_H - -#include "../base.h" +#ifndef SPINE_SPINE_MIX_BLEND_H +#define SPINE_SPINE_MIX_BLEND_H #ifdef __cplusplus extern "C" { @@ -47,4 +16,4 @@ typedef enum spine_mix_blend { } #endif -#endif // SPINE_C_MIXBLEND_H \ No newline at end of file +#endif /* SPINE_SPINE_MIX_BLEND_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/mix_direction.h b/spine-c-new/src/generated/mix_direction.h index 28c3b57e0..e1c37359e 100644 --- a/spine-c-new/src/generated/mix_direction.h +++ b/spine-c-new/src/generated/mix_direction.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_MIXDIRECTION_H -#define SPINE_C_MIXDIRECTION_H - -#include "../base.h" +#ifndef SPINE_SPINE_MIX_DIRECTION_H +#define SPINE_SPINE_MIX_DIRECTION_H #ifdef __cplusplus extern "C" { @@ -45,4 +14,4 @@ typedef enum spine_mix_direction { } #endif -#endif // SPINE_C_MIXDIRECTION_H \ No newline at end of file +#endif /* SPINE_SPINE_MIX_DIRECTION_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/path_attachment.cpp b/spine-c-new/src/generated/path_attachment.cpp index d37315390..85a4cf40a 100644 --- a/spine-c-new/src/generated/path_attachment.cpp +++ b/spine-c-new/src/generated/path_attachment.cpp @@ -1,185 +1,116 @@ -/****************************************************************************** - * 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 "path_attachment.h" #include using namespace spine; spine_path_attachment spine_path_attachment_create(const char* name) { - PathAttachment *obj = new (__FILE__, __LINE__) PathAttachment(String(name)); - return (spine_path_attachment) obj; + return (spine_path_attachment) new (__FILE__, __LINE__) PathAttachment(*((const String*)name)); } -void spine_path_attachment_dispose(spine_path_attachment obj) { - if (!obj) return; - delete (PathAttachment *) obj; +void spine_path_attachment_dispose(spine_path_attachment self) { + delete (PathAttachment*)self; } -spine_rtti spine_path_attachment_get_rtti() { - return (spine_rtti) &PathAttachment::rtti; +spine_rtti spine_path_attachment_get_rtti(spine_path_attachment self) { + return (spine_rtti)&((PathAttachment*)self)->getRTTI(); } -int32_t spine_path_attachment_get_num_lengths(spine_path_attachment obj) { - if (!obj) return 0; - PathAttachment *_obj = (PathAttachment *) obj; - return (int32_t) _obj->getLengths().size(); +spine_array_float spine_path_attachment_get_lengths(spine_path_attachment self) { + return (spine_array_float)&((PathAttachment*)self)->getLengths(); } -float *spine_path_attachment_get_lengths(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return (float *) _obj->getLengths().buffer(); +void spine_path_attachment_set_lengths(spine_path_attachment self, spine_array_float inValue) { + ((PathAttachment*)self)->setLengths(*((Array*)inValue)); } -void spine_path_attachment_set_lengths(spine_path_attachment obj, spine_array_float value) { - if (!obj) return; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->setLengths((Array &) value); +bool spine_path_attachment_is_closed(spine_path_attachment self) { + return ((PathAttachment*)self)->isClosed(); } -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 self, bool inValue) { + ((PathAttachment*)self)->setClosed(inValue); } -void spine_path_attachment_set_closed(spine_path_attachment obj, bool value) { - if (!obj) return; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->setClosed(value); +bool spine_path_attachment_is_constant_speed(spine_path_attachment self) { + return ((PathAttachment*)self)->isConstantSpeed(); } -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 self, bool inValue) { + ((PathAttachment*)self)->setConstantSpeed(inValue); } -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 self) { + return (spine_color)&((PathAttachment*)self)->getColor(); } -spine_color spine_path_attachment_get_color(spine_path_attachment obj) { - if (!obj) return (spine_color) 0; - PathAttachment *_obj = (PathAttachment *) obj; - return (spine_color) &_obj->getColor(); +spine_attachment spine_path_attachment_copy(spine_path_attachment self) { + return (spine_attachment)((PathAttachment*)self)->copy(); } -spine_attachment spine_path_attachment_copy(spine_path_attachment obj) { - if (!obj) return (spine_attachment) 0; - PathAttachment *_obj = (PathAttachment *) obj; - return (spine_attachment) _obj->copy(); +void spine_path_attachment_compute_world_vertices_1(spine_path_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(PathAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, worldVertices, offset, 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*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); +void spine_path_attachment_compute_world_vertices_2(spine_path_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)(PathAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, *((Array*)worldVertices), offset, 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*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); +int spine_path_attachment_get_id(spine_path_attachment self) { + return ((VertexAttachment*)(PathAttachment*)self)->getId(); } -int spine_path_attachment_get_id(spine_path_attachment obj) { - if (!obj) return 0; - PathAttachment *_obj = (PathAttachment *) obj; - return _obj->getId(); +spine_array_int spine_path_attachment_get_bones(spine_path_attachment self) { + return (spine_array_int)&((VertexAttachment*)(PathAttachment*)self)->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(); +void spine_path_attachment_set_bones(spine_path_attachment self, spine_array_int bones) { + ((VertexAttachment*)(PathAttachment*)self)->setBones(*((Array*)bones)); } -int *spine_path_attachment_get_bones(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return (int *) _obj->getBones().buffer(); +spine_array_float spine_path_attachment_get_vertices(spine_path_attachment self) { + return (spine_array_float)&((VertexAttachment*)(PathAttachment*)self)->getVertices(); } -void spine_path_attachment_set_bones(spine_path_attachment obj, spine_array_int value) { - if (!obj) return; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->setBones((Array &) value); +void spine_path_attachment_set_vertices(spine_path_attachment self, spine_array_float vertices) { + ((VertexAttachment*)(PathAttachment*)self)->setVertices(*((Array*)vertices)); } -int32_t spine_path_attachment_get_num_vertices(spine_path_attachment obj) { - if (!obj) return 0; - PathAttachment *_obj = (PathAttachment *) obj; - return (int32_t) _obj->getVertices().size(); +size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment self) { + return ((VertexAttachment*)(PathAttachment*)self)->getWorldVerticesLength(); } -float *spine_path_attachment_get_vertices(spine_path_attachment obj) { - if (!obj) return nullptr; - PathAttachment *_obj = (PathAttachment *) obj; - return (float *) _obj->getVertices().buffer(); +void spine_path_attachment_set_world_vertices_length(spine_path_attachment self, size_t inValue) { + ((VertexAttachment*)(PathAttachment*)self)->setWorldVerticesLength(inValue); } -void spine_path_attachment_set_vertices(spine_path_attachment obj, spine_array_float value) { - if (!obj) return; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->setVertices((Array &) value); +spine_attachment spine_path_attachment_get_timeline_attachment(spine_path_attachment self) { + return (spine_attachment)((VertexAttachment*)(PathAttachment*)self)->getTimelineAttachment(); } -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_timeline_attachment(spine_path_attachment self, spine_attachment attachment) { + ((VertexAttachment*)(PathAttachment*)self)->setTimelineAttachment((Attachment *)attachment); } -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); +void spine_path_attachment_copy_to(spine_path_attachment self, spine_vertex_attachment other) { + ((VertexAttachment*)(PathAttachment*)self)->copyTo((VertexAttachment *)other); } -spine_attachment spine_path_attachment_get_timeline_attachment(spine_path_attachment obj) { - if (!obj) return (spine_attachment) 0; - PathAttachment *_obj = (PathAttachment *) obj; - return (spine_attachment) _obj->getTimelineAttachment(); +const char* spine_path_attachment_get_name(spine_path_attachment self) { + return (const char*)&((VertexAttachment*)(PathAttachment*)self)->getName(); } -void spine_path_attachment_set_timeline_attachment(spine_path_attachment obj, spine_attachment value) { - if (!obj) return; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->setTimelineAttachment((Attachment *) value); +int spine_path_attachment_get_ref_count(spine_path_attachment self) { + return ((VertexAttachment*)(PathAttachment*)self)->getRefCount(); } -void spine_path_attachment_copy_to(spine_path_attachment obj, spine_vertex_attachment other) { - if (!obj) return ; - PathAttachment *_obj = (PathAttachment *) obj; - _obj->copyTo((VertexAttachment *) other); +void spine_path_attachment_reference(spine_path_attachment self) { + ((VertexAttachment*)(PathAttachment*)self)->reference(); +} + +void spine_path_attachment_dereference(spine_path_attachment self) { + ((VertexAttachment*)(PathAttachment*)self)->dereference(); +} + +spine_rtti spine_path_attachment_rtti(void) { + return (spine_rtti)&PathAttachment::rtti; } diff --git a/spine-c-new/src/generated/path_attachment.h b/spine-c-new/src/generated/path_attachment.h index b063d0eab..0353dd1da 100644 --- a/spine-c-new/src/generated/path_attachment.h +++ b/spine-c-new/src/generated/path_attachment.h @@ -1,70 +1,46 @@ -/****************************************************************************** - * 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_SPINE_PATH_ATTACHMENT_H +#define SPINE_SPINE_PATH_ATTACHMENT_H -#ifndef SPINE_C_PATHATTACHMENT_H -#define SPINE_C_PATHATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_attachment spine_path_attachment_create(const char* 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_C_EXPORT int32_t spine_path_attachment_get_num_lengths(spine_path_attachment obj); -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, 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 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 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); +SPINE_C_API void spine_path_attachment_dispose(spine_path_attachment self); + +SPINE_C_API spine_rtti spine_path_attachment_get_rtti(spine_path_attachment self); +SPINE_C_API spine_array_float spine_path_attachment_get_lengths(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_lengths(spine_path_attachment self, spine_array_float inValue); +SPINE_C_API bool spine_path_attachment_is_closed(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_closed(spine_path_attachment self, bool inValue); +SPINE_C_API bool spine_path_attachment_is_constant_speed(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_constant_speed(spine_path_attachment self, bool inValue); +SPINE_C_API spine_color spine_path_attachment_get_color(spine_path_attachment self); +SPINE_C_API spine_attachment spine_path_attachment_copy(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_compute_world_vertices_1(spine_path_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_path_attachment_compute_world_vertices_2(spine_path_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API int spine_path_attachment_get_id(spine_path_attachment self); +SPINE_C_API spine_array_int spine_path_attachment_get_bones(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_bones(spine_path_attachment self, spine_array_int bones); +SPINE_C_API spine_array_float spine_path_attachment_get_vertices(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_vertices(spine_path_attachment self, spine_array_float vertices); +SPINE_C_API size_t spine_path_attachment_get_world_vertices_length(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_world_vertices_length(spine_path_attachment self, size_t inValue); +SPINE_C_API spine_attachment spine_path_attachment_get_timeline_attachment(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_set_timeline_attachment(spine_path_attachment self, spine_attachment attachment); +SPINE_C_API void spine_path_attachment_copy_to(spine_path_attachment self, spine_vertex_attachment other); +SPINE_C_API const char* spine_path_attachment_get_name(spine_path_attachment self); +SPINE_C_API int spine_path_attachment_get_ref_count(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_reference(spine_path_attachment self); +SPINE_C_API void spine_path_attachment_dereference(spine_path_attachment self); +SPINE_C_API spine_rtti spine_path_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/path_constraint.cpp b/spine-c-new/src/generated/path_constraint.cpp index ff3007259..b2e34e868 100644 --- a/spine-c-new/src/generated/path_constraint.cpp +++ b/spine-c-new/src/generated/path_constraint.cpp @@ -1,155 +1,80 @@ -/****************************************************************************** - * 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 "path_constraint.h" #include using namespace spine; spine_path_constraint spine_path_constraint_create(spine_path_constraint_data data, spine_skeleton skeleton) { - PathConstraint *obj = new (__FILE__, __LINE__) PathConstraint(*(PathConstraintData*) data, *(Skeleton*) skeleton); - return (spine_path_constraint) obj; + return (spine_path_constraint) new (__FILE__, __LINE__) PathConstraint(*((PathConstraintData*)data), *((Skeleton*)skeleton)); } -void spine_path_constraint_dispose(spine_path_constraint obj) { - if (!obj) return; - delete (PathConstraint *) obj; +void spine_path_constraint_dispose(spine_path_constraint self) { + delete (PathConstraint*)self; } -spine_rtti spine_path_constraint_get_rtti() { - return (spine_rtti) &PathConstraint::rtti; +spine_rtti spine_path_constraint_get_rtti(spine_path_constraint self) { + return (spine_rtti)&((PathConstraint*)self)->getRTTI(); } -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*) skeleton); +spine_path_constraint spine_path_constraint_copy(spine_path_constraint self, spine_skeleton skeleton) { + return (spine_path_constraint)((PathConstraint*)self)->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*) skeleton, (Physics) physics); +void spine_path_constraint_update(spine_path_constraint self, spine_skeleton skeleton, spine_physics physics) { + ((PathConstraint*)self)->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*) skeleton); +void spine_path_constraint_sort(spine_path_constraint self, spine_skeleton skeleton) { + ((PathConstraint*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_path_constraint_is_source_active(spine_path_constraint obj) { - if (!obj) return false; - PathConstraint *_obj = (PathConstraint *) obj; - return _obj->isSourceActive(); +bool spine_path_constraint_is_source_active(spine_path_constraint self) { + return ((PathConstraint*)self)->isSourceActive(); } -int32_t spine_path_constraint_get_num_bones(spine_path_constraint obj) { - if (!obj) return 0; - PathConstraint *_obj = (PathConstraint *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_pose spine_path_constraint_get_bones(spine_path_constraint self) { + return (spine_array_bone_pose)&((PathConstraint*)self)->getBones(); } -spine_bone_pose *spine_path_constraint_get_bones(spine_path_constraint obj) { - if (!obj) return nullptr; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_bone_pose *) _obj->getBones().buffer(); +spine_slot spine_path_constraint_get_slot(spine_path_constraint self) { + return (spine_slot)((PathConstraint*)self)->getSlot(); } -spine_slot spine_path_constraint_get_slot(spine_path_constraint obj) { - if (!obj) return (spine_slot) 0; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_slot) _obj->getSlot(); +void spine_path_constraint_set_slot(spine_path_constraint self, spine_slot slot) { + ((PathConstraint*)self)->setSlot((Slot *)slot); } -void spine_path_constraint_set_slot(spine_path_constraint obj, spine_slot value) { - if (!obj) return; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->setSlot((Slot *) value); +spine_path_constraint_data spine_path_constraint_get_data(spine_path_constraint self) { + return (spine_path_constraint_data)&((PathConstraint*)self)->getData(); } -spine_path_constraint_data spine_path_constraint_get_data(spine_path_constraint obj) { - if (!obj) return 0; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_path_constraint_data) &_obj->getData(); +spine_path_constraint_pose spine_path_constraint_get_pose(spine_path_constraint self) { + return (spine_path_constraint_pose)&((ConstraintGeneric*)(PathConstraint*)self)->getPose(); } -void spine_path_constraint_pose(spine_path_constraint obj) { - if (!obj) return ; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->pose(); +spine_path_constraint_pose spine_path_constraint_get_applied_pose(spine_path_constraint self) { + return (spine_path_constraint_pose)&((ConstraintGeneric*)(PathConstraint*)self)->getAppliedPose(); } -void spine_path_constraint_setup_pose(spine_path_constraint obj) { - if (!obj) return ; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->setupPose(); +void spine_path_constraint_reset_constrained(spine_path_constraint self) { + ((ConstraintGeneric*)(PathConstraint*)self)->resetConstrained(); } -spine_path_constraint_pose spine_path_constraint_get_pose(spine_path_constraint obj) { - if (!obj) return 0; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_path_constraint_pose) &_obj->getPose(); +void spine_path_constraint_constrained(spine_path_constraint self) { + ((ConstraintGeneric*)(PathConstraint*)self)->constrained(); } -spine_path_constraint_pose spine_path_constraint_get_applied_pose(spine_path_constraint obj) { - if (!obj) return 0; - PathConstraint *_obj = (PathConstraint *) obj; - return (spine_path_constraint_pose) &_obj->getAppliedPose(); +bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint self) { + return ((ConstraintGeneric*)(PathConstraint*)self)->isPoseEqualToApplied(); } -void spine_path_constraint_reset_constrained(spine_path_constraint obj) { - if (!obj) return ; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->resetConstrained(); +bool spine_path_constraint_is_active(spine_path_constraint self) { + return ((ConstraintGeneric*)(PathConstraint*)self)->isActive(); } -void spine_path_constraint_constrained(spine_path_constraint obj) { - if (!obj) return ; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->constrained(); +void spine_path_constraint_set_active(spine_path_constraint self, bool active) { + ((ConstraintGeneric*)(PathConstraint*)self)->setActive(active); } -bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint obj) { - if (!obj) return false; - PathConstraint *_obj = (PathConstraint *) obj; - return _obj->isPoseEqualToApplied(); -} - -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, bool value) { - if (!obj) return; - PathConstraint *_obj = (PathConstraint *) obj; - _obj->setActive(value); +spine_rtti spine_path_constraint_rtti(void) { + return (spine_rtti)&PathConstraint::rtti; } diff --git a/spine-c-new/src/generated/path_constraint.h b/spine-c-new/src/generated/path_constraint.h index e064fa9a6..c5c65b351 100644 --- a/spine-c-new/src/generated/path_constraint.h +++ b/spine-c-new/src/generated/path_constraint.h @@ -1,65 +1,37 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_H +#define SPINE_SPINE_PATH_CONSTRAINT_H -#ifndef SPINE_C_PATHCONSTRAINT_H -#define SPINE_C_PATHCONSTRAINT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint spine_path_constraint_create(spine_path_constraint_data data, spine_skeleton skeleton); -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_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 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); -SPINE_C_EXPORT void spine_path_constraint_set_slot(spine_path_constraint obj, spine_slot value); -SPINE_C_EXPORT spine_path_constraint_data spine_path_constraint_get_data(spine_path_constraint obj); -SPINE_C_EXPORT void spine_path_constraint_pose(spine_path_constraint obj); -SPINE_C_EXPORT void spine_path_constraint_setup_pose(spine_path_constraint obj); -SPINE_C_EXPORT spine_path_constraint_pose spine_path_constraint_get_pose(spine_path_constraint obj); -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 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); +SPINE_C_API void spine_path_constraint_dispose(spine_path_constraint self); + +SPINE_C_API spine_rtti spine_path_constraint_get_rtti(spine_path_constraint self); +SPINE_C_API spine_path_constraint spine_path_constraint_copy(spine_path_constraint self, spine_skeleton skeleton); +SPINE_C_API void spine_path_constraint_update(spine_path_constraint self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_path_constraint_sort(spine_path_constraint self, spine_skeleton skeleton); +SPINE_C_API bool spine_path_constraint_is_source_active(spine_path_constraint self); +SPINE_C_API spine_array_bone_pose spine_path_constraint_get_bones(spine_path_constraint self); +SPINE_C_API spine_slot spine_path_constraint_get_slot(spine_path_constraint self); +SPINE_C_API void spine_path_constraint_set_slot(spine_path_constraint self, spine_slot slot); +SPINE_C_API spine_path_constraint_data spine_path_constraint_get_data(spine_path_constraint self); +SPINE_C_API spine_path_constraint_pose spine_path_constraint_get_pose(spine_path_constraint self); +SPINE_C_API spine_path_constraint_pose spine_path_constraint_get_applied_pose(spine_path_constraint self); +SPINE_C_API void spine_path_constraint_reset_constrained(spine_path_constraint self); +SPINE_C_API void spine_path_constraint_constrained(spine_path_constraint self); +SPINE_C_API bool spine_path_constraint_is_pose_equal_to_applied(spine_path_constraint self); +SPINE_C_API bool spine_path_constraint_is_active(spine_path_constraint self); +SPINE_C_API void spine_path_constraint_set_active(spine_path_constraint self, bool active); +SPINE_C_API spine_rtti spine_path_constraint_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINT_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/path_constraint_data.cpp b/spine-c-new/src/generated/path_constraint_data.cpp index b2762e314..23cdfca57 100644 --- a/spine-c-new/src/generated/path_constraint_data.cpp +++ b/spine-c-new/src/generated/path_constraint_data.cpp @@ -1,143 +1,84 @@ -/****************************************************************************** - * 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 "path_constraint_data.h" #include using namespace spine; 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; + return (spine_path_constraint_data) new (__FILE__, __LINE__) PathConstraintData(*((const String*)name)); } -void spine_path_constraint_data_dispose(spine_path_constraint_data obj) { - if (!obj) return; - delete (PathConstraintData *) obj; +void spine_path_constraint_data_dispose(spine_path_constraint_data self) { + delete (PathConstraintData*)self; } -spine_rtti spine_path_constraint_data_get_rtti() { - return (spine_rtti) &PathConstraintData::rtti; +spine_rtti spine_path_constraint_data_get_rtti(spine_path_constraint_data self) { + return (spine_rtti)&((PathConstraintData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_path_constraint_data_create_method(spine_path_constraint_data self, spine_skeleton skeleton) { + return (spine_constraint)((PathConstraintData*)self)->create(*((Skeleton*)skeleton)); } -int32_t spine_path_constraint_data_get_num_bones(spine_path_constraint_data obj) { - if (!obj) return 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_data spine_path_constraint_data_get_bones(spine_path_constraint_data self) { + return (spine_array_bone_data)&((PathConstraintData*)self)->getBones(); } -spine_bone_data *spine_path_constraint_data_get_bones(spine_path_constraint_data obj) { - if (!obj) return nullptr; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_bone_data *) _obj->getBones().buffer(); +spine_slot_data spine_path_constraint_data_get_slot(spine_path_constraint_data self) { + return (spine_slot_data)((PathConstraintData*)self)->getSlot(); } -spine_slot_data spine_path_constraint_data_get_slot(spine_path_constraint_data obj) { - if (!obj) return (spine_slot_data) 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_slot_data) _obj->getSlot(); +void spine_path_constraint_data_set_slot(spine_path_constraint_data self, spine_slot_data slot) { + ((PathConstraintData*)self)->setSlot((SlotData *)slot); } -void spine_path_constraint_data_set_slot(spine_path_constraint_data obj, spine_slot_data value) { - if (!obj) return; - PathConstraintData *_obj = (PathConstraintData *) obj; - _obj->setSlot((SlotData *) value); +spine_position_mode spine_path_constraint_data_get_position_mode(spine_path_constraint_data self) { + return (spine_position_mode)((PathConstraintData*)self)->getPositionMode(); } -spine_position_mode spine_path_constraint_data_get_position_mode(spine_path_constraint_data obj) { - if (!obj) return (spine_position_mode) 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_position_mode) _obj->getPositionMode(); +void spine_path_constraint_data_set_position_mode(spine_path_constraint_data self, spine_position_mode positionMode) { + ((PathConstraintData*)self)->setPositionMode((PositionMode)positionMode); } -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((PositionMode) value); +spine_spacing_mode spine_path_constraint_data_get_spacing_mode(spine_path_constraint_data self) { + return (spine_spacing_mode)((PathConstraintData*)self)->getSpacingMode(); } -spine_spacing_mode spine_path_constraint_data_get_spacing_mode(spine_path_constraint_data obj) { - if (!obj) return (spine_spacing_mode) 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_spacing_mode) _obj->getSpacingMode(); +void spine_path_constraint_data_set_spacing_mode(spine_path_constraint_data self, spine_spacing_mode spacingMode) { + ((PathConstraintData*)self)->setSpacingMode((SpacingMode)spacingMode); } -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((SpacingMode) value); +spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spine_path_constraint_data self) { + return (spine_rotate_mode)((PathConstraintData*)self)->getRotateMode(); } -spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spine_path_constraint_data obj) { - if (!obj) return (spine_rotate_mode) 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (spine_rotate_mode) _obj->getRotateMode(); +void spine_path_constraint_data_set_rotate_mode(spine_path_constraint_data self, spine_rotate_mode rotateMode) { + ((PathConstraintData*)self)->setRotateMode((RotateMode)rotateMode); } -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((RotateMode) value); +float spine_path_constraint_data_get_offset_rotation(spine_path_constraint_data self) { + return ((PathConstraintData*)self)->getOffsetRotation(); } -float spine_path_constraint_data_get_offset_rotation(spine_path_constraint_data obj) { - if (!obj) return 0; - PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->getOffsetRotation(); +void spine_path_constraint_data_set_offset_rotation(spine_path_constraint_data self, float offsetRotation) { + ((PathConstraintData*)self)->setOffsetRotation(offsetRotation); } -void spine_path_constraint_data_set_offset_rotation(spine_path_constraint_data obj, float value) { - if (!obj) return; - PathConstraintData *_obj = (PathConstraintData *) obj; - _obj->setOffsetRotation(value); +const char* spine_path_constraint_data_get_name(spine_path_constraint_data self) { + return (const char*)&((ConstraintDataGeneric*)(PathConstraintData*)self)->getName(); } -const char* spine_path_constraint_data_get_name(spine_path_constraint_data obj) { - if (!obj) return nullptr; - PathConstraintData *_obj = (PathConstraintData *) obj; - return (const char *) _obj->getName().buffer(); +bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data self) { + return ((ConstraintDataGeneric*)(PathConstraintData*)self)->isSkinRequired(); } -bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data obj) { - if (!obj) return false; - PathConstraintData *_obj = (PathConstraintData *) obj; - return _obj->isSkinRequired(); +spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data self) { + return (spine_path_constraint_pose)&((ConstraintDataGeneric*)(PathConstraintData*)self)->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 (spine_path_constraint_pose) &_obj->getSetupPose(); +void spine_path_constraint_data_set_skin_required(spine_path_constraint_data self, bool skinRequired) { + ((ConstraintDataGeneric*)(PathConstraintData*)self)->setSkinRequired(skinRequired); +} + +spine_rtti spine_path_constraint_data_rtti(void) { + return (spine_rtti)&PathConstraintData::rtti; } diff --git a/spine-c-new/src/generated/path_constraint_data.h b/spine-c-new/src/generated/path_constraint_data.h index d1a175865..5c6573cfb 100644 --- a/spine-c-new/src/generated/path_constraint_data.h +++ b/spine-c-new/src/generated/path_constraint_data.h @@ -1,63 +1,38 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_DATA_H +#define SPINE_SPINE_PATH_CONSTRAINT_DATA_H -#ifndef SPINE_C_PATHCONSTRAINTDATA_H -#define SPINE_C_PATHCONSTRAINTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint_data spine_path_constraint_data_create(const char* 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_C_EXPORT spine_constraint spine_path_constraint_data_create(spine_path_constraint_data obj, spine_skeleton skeleton); -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); -SPINE_C_EXPORT void spine_path_constraint_data_set_slot(spine_path_constraint_data obj, spine_slot_data value); -SPINE_C_EXPORT spine_position_mode spine_path_constraint_data_get_position_mode(spine_path_constraint_data obj); -SPINE_C_EXPORT void spine_path_constraint_data_set_position_mode(spine_path_constraint_data obj, spine_position_mode value); -SPINE_C_EXPORT spine_spacing_mode spine_path_constraint_data_get_spacing_mode(spine_path_constraint_data obj); -SPINE_C_EXPORT void spine_path_constraint_data_set_spacing_mode(spine_path_constraint_data obj, spine_spacing_mode value); -SPINE_C_EXPORT spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spine_path_constraint_data obj); -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 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); +SPINE_C_API void spine_path_constraint_data_dispose(spine_path_constraint_data self); + +SPINE_C_API spine_rtti spine_path_constraint_data_get_rtti(spine_path_constraint_data self); +SPINE_C_API spine_constraint spine_path_constraint_data_create_method(spine_path_constraint_data self, spine_skeleton skeleton); +SPINE_C_API spine_array_bone_data spine_path_constraint_data_get_bones(spine_path_constraint_data self); +SPINE_C_API spine_slot_data spine_path_constraint_data_get_slot(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_slot(spine_path_constraint_data self, spine_slot_data slot); +SPINE_C_API spine_position_mode spine_path_constraint_data_get_position_mode(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_position_mode(spine_path_constraint_data self, spine_position_mode positionMode); +SPINE_C_API spine_spacing_mode spine_path_constraint_data_get_spacing_mode(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_spacing_mode(spine_path_constraint_data self, spine_spacing_mode spacingMode); +SPINE_C_API spine_rotate_mode spine_path_constraint_data_get_rotate_mode(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_rotate_mode(spine_path_constraint_data self, spine_rotate_mode rotateMode); +SPINE_C_API float spine_path_constraint_data_get_offset_rotation(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_offset_rotation(spine_path_constraint_data self, float offsetRotation); +SPINE_C_API const char* spine_path_constraint_data_get_name(spine_path_constraint_data self); +SPINE_C_API bool spine_path_constraint_data_is_skin_required(spine_path_constraint_data self); +SPINE_C_API spine_path_constraint_pose spine_path_constraint_data_get_setup_pose(spine_path_constraint_data self); +SPINE_C_API void spine_path_constraint_data_set_skin_required(spine_path_constraint_data self, bool skinRequired); +SPINE_C_API spine_rtti spine_path_constraint_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_DATA_H */ \ No newline at end of file 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 54ddae5bd..3658e5ea3 100644 --- a/spine-c-new/src/generated/path_constraint_mix_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_mix_timeline.cpp @@ -1,149 +1,76 @@ -/****************************************************************************** - * 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 "path_constraint_mix_timeline.h" #include using namespace spine; 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; + return (spine_path_constraint_mix_timeline) new (__FILE__, __LINE__) PathConstraintMixTimeline(frameCount, bezierCount, constraintIndex); } -void spine_path_constraint_mix_timeline_dispose(spine_path_constraint_mix_timeline obj) { - if (!obj) return; - delete (PathConstraintMixTimeline *) obj; +void spine_path_constraint_mix_timeline_dispose(spine_path_constraint_mix_timeline self) { + delete (PathConstraintMixTimeline*)self; } -spine_rtti spine_path_constraint_mix_timeline_get_rtti() { - return (spine_rtti) &PathConstraintMixTimeline::rtti; +spine_rtti spine_path_constraint_mix_timeline_get_rtti(spine_path_constraint_mix_timeline self) { + return (spine_rtti)&((PathConstraintMixTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PathConstraintMixTimeline*)self)->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, 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_frame(spine_path_constraint_mix_timeline self, int frame, float time, float mixRotate, float mixX, float mixY) { + ((PathConstraintMixTimeline*)self)->setFrame(frame, time, mixRotate, mixX, mixY); } -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_linear(spine_path_constraint_mix_timeline self, size_t frame) { + ((CurveTimeline*)(PathConstraintMixTimeline*)self)->setLinear(frame); } -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_stepped(spine_path_constraint_mix_timeline self, size_t frame) { + ((CurveTimeline*)(PathConstraintMixTimeline*)self)->setStepped(frame); } -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); +void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(PathConstraintMixTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(PathConstraintMixTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline self) { + return (spine_array_float)&((CurveTimeline*)(PathConstraintMixTimeline*)self)->getCurves(); } -float *spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline self) { + return ((CurveTimeline*)(PathConstraintMixTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline self) { + return ((CurveTimeline*)(PathConstraintMixTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline self) { + return (spine_array_float)&((CurveTimeline*)(PathConstraintMixTimeline*)self)->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(); +float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_timeline self) { + return ((CurveTimeline*)(PathConstraintMixTimeline*)self)->getDuration(); } -float *spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline self) { + return (spine_array_property_id)&((CurveTimeline*)(PathConstraintMixTimeline*)self)->getPropertyIds(); } -float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_timeline obj) { - if (!obj) return 0; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - return _obj->getDuration(); +int spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline self) { + return ((ConstraintTimeline*)(PathConstraintMixTimeline*)self)->getConstraintIndex(); } -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(); +void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline self, int inValue) { + ((ConstraintTimeline*)(PathConstraintMixTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PathConstraintMixTimeline *_obj = (PathConstraintMixTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_path_constraint_mix_timeline_rtti(void) { + return (spine_rtti)&PathConstraintMixTimeline::rtti; } 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 35500b021..f2f618ada 100644 --- a/spine-c-new/src/generated/path_constraint_mix_timeline.h +++ b/spine-c-new/src/generated/path_constraint_mix_timeline.h @@ -1,64 +1,36 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_MIX_TIMELINE_H +#define SPINE_SPINE_PATH_CONSTRAINT_MIX_TIMELINE_H -#ifndef SPINE_C_PATHCONSTRAINTMIXTIMELINE_H -#define SPINE_C_PATHCONSTRAINTMIXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint_mix_timeline spine_path_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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 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 int32_t spine_path_constraint_mix_timeline_get_num_property_ids(spine_path_constraint_mix_timeline obj); -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); +SPINE_C_API void spine_path_constraint_mix_timeline_dispose(spine_path_constraint_mix_timeline self); + +SPINE_C_API spine_rtti spine_path_constraint_mix_timeline_get_rtti(spine_path_constraint_mix_timeline self); +SPINE_C_API void spine_path_constraint_mix_timeline_apply(spine_path_constraint_mix_timeline self, 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_API void spine_path_constraint_mix_timeline_set_frame(spine_path_constraint_mix_timeline self, int frame, float time, float mixRotate, float mixX, float mixY); +SPINE_C_API void spine_path_constraint_mix_timeline_set_linear(spine_path_constraint_mix_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_mix_timeline_set_stepped(spine_path_constraint_mix_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_mix_timeline_set_bezier(spine_path_constraint_mix_timeline self, 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_API float spine_path_constraint_mix_timeline_get_bezier_value(spine_path_constraint_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_path_constraint_mix_timeline_get_curves(spine_path_constraint_mix_timeline self); +SPINE_C_API size_t spine_path_constraint_mix_timeline_get_frame_entries(spine_path_constraint_mix_timeline self); +SPINE_C_API size_t spine_path_constraint_mix_timeline_get_frame_count(spine_path_constraint_mix_timeline self); +SPINE_C_API spine_array_float spine_path_constraint_mix_timeline_get_frames(spine_path_constraint_mix_timeline self); +SPINE_C_API float spine_path_constraint_mix_timeline_get_duration(spine_path_constraint_mix_timeline self); +SPINE_C_API spine_array_property_id spine_path_constraint_mix_timeline_get_property_ids(spine_path_constraint_mix_timeline self); +SPINE_C_API int spine_path_constraint_mix_timeline_get_constraint_index(spine_path_constraint_mix_timeline self); +SPINE_C_API void spine_path_constraint_mix_timeline_set_constraint_index(spine_path_constraint_mix_timeline self, int inValue); +SPINE_C_API spine_rtti spine_path_constraint_mix_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINTMIXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_MIX_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/path_constraint_pose.cpp b/spine-c-new/src/generated/path_constraint_pose.cpp index 5eede403d..0706e2990 100644 --- a/spine-c-new/src/generated/path_constraint_pose.cpp +++ b/spine-c-new/src/generated/path_constraint_pose.cpp @@ -1,109 +1,56 @@ -/****************************************************************************** - * 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 "path_constraint_pose.h" #include using namespace spine; spine_path_constraint_pose spine_path_constraint_pose_create(void) { - PathConstraintPose *obj = new (__FILE__, __LINE__) PathConstraintPose(); - return (spine_path_constraint_pose) obj; + return (spine_path_constraint_pose) new (__FILE__, __LINE__) PathConstraintPose(); } -void spine_path_constraint_pose_dispose(spine_path_constraint_pose obj) { - if (!obj) return; - delete (PathConstraintPose *) obj; +void spine_path_constraint_pose_dispose(spine_path_constraint_pose self) { + delete (PathConstraintPose*)self; } -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(*((PathConstraintPose*) value)); +void spine_path_constraint_pose_set(spine_path_constraint_pose self, spine_path_constraint_pose pose) { + ((PathConstraintPose*)self)->set(*((PathConstraintPose*)pose)); } -float spine_path_constraint_pose_get_position(spine_path_constraint_pose obj) { - if (!obj) return 0; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - return _obj->getPosition(); +float spine_path_constraint_pose_get_position(spine_path_constraint_pose self) { + return ((PathConstraintPose*)self)->getPosition(); } -void spine_path_constraint_pose_set_position(spine_path_constraint_pose obj, float value) { - if (!obj) return; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->setPosition(value); +void spine_path_constraint_pose_set_position(spine_path_constraint_pose self, float position) { + ((PathConstraintPose*)self)->setPosition(position); } -float spine_path_constraint_pose_get_spacing(spine_path_constraint_pose obj) { - if (!obj) return 0; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - return _obj->getSpacing(); +float spine_path_constraint_pose_get_spacing(spine_path_constraint_pose self) { + return ((PathConstraintPose*)self)->getSpacing(); } -void spine_path_constraint_pose_set_spacing(spine_path_constraint_pose obj, float value) { - if (!obj) return; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->setSpacing(value); +void spine_path_constraint_pose_set_spacing(spine_path_constraint_pose self, float spacing) { + ((PathConstraintPose*)self)->setSpacing(spacing); } -float spine_path_constraint_pose_get_mix_rotate(spine_path_constraint_pose obj) { - if (!obj) return 0; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - return _obj->getMixRotate(); +float spine_path_constraint_pose_get_mix_rotate(spine_path_constraint_pose self) { + return ((PathConstraintPose*)self)->getMixRotate(); } -void spine_path_constraint_pose_set_mix_rotate(spine_path_constraint_pose obj, float value) { - if (!obj) return; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->setMixRotate(value); +void spine_path_constraint_pose_set_mix_rotate(spine_path_constraint_pose self, float mixRotate) { + ((PathConstraintPose*)self)->setMixRotate(mixRotate); } -float spine_path_constraint_pose_get_mix_x(spine_path_constraint_pose obj) { - if (!obj) return 0; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - return _obj->getMixX(); +float spine_path_constraint_pose_get_mix_x(spine_path_constraint_pose self) { + return ((PathConstraintPose*)self)->getMixX(); } -void spine_path_constraint_pose_set_mix_x(spine_path_constraint_pose obj, float value) { - if (!obj) return; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->setMixX(value); +void spine_path_constraint_pose_set_mix_x(spine_path_constraint_pose self, float mixX) { + ((PathConstraintPose*)self)->setMixX(mixX); } -float spine_path_constraint_pose_get_mix_y(spine_path_constraint_pose obj) { - if (!obj) return 0; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - return _obj->getMixY(); +float spine_path_constraint_pose_get_mix_y(spine_path_constraint_pose self) { + return ((PathConstraintPose*)self)->getMixY(); } -void spine_path_constraint_pose_set_mix_y(spine_path_constraint_pose obj, float value) { - if (!obj) return; - PathConstraintPose *_obj = (PathConstraintPose *) obj; - _obj->setMixY(value); +void spine_path_constraint_pose_set_mix_y(spine_path_constraint_pose self, float mixY) { + ((PathConstraintPose*)self)->setMixY(mixY); } diff --git a/spine-c-new/src/generated/path_constraint_pose.h b/spine-c-new/src/generated/path_constraint_pose.h index d34891d2d..020919b22 100644 --- a/spine-c-new/src/generated/path_constraint_pose.h +++ b/spine-c-new/src/generated/path_constraint_pose.h @@ -1,57 +1,31 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_POSE_H +#define SPINE_SPINE_PATH_CONSTRAINT_POSE_H -#ifndef SPINE_C_PATHCONSTRAINTPOSE_H -#define SPINE_C_PATHCONSTRAINTPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint_pose spine_path_constraint_pose_create(void); -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); -SPINE_C_EXPORT void spine_path_constraint_pose_set(spine_path_constraint_pose obj, spine_path_constraint_pose value); -SPINE_C_EXPORT float spine_path_constraint_pose_get_position(spine_path_constraint_pose obj); -SPINE_C_EXPORT void spine_path_constraint_pose_set_position(spine_path_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_path_constraint_pose_get_spacing(spine_path_constraint_pose obj); -SPINE_C_EXPORT void spine_path_constraint_pose_set_spacing(spine_path_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_path_constraint_pose_get_mix_rotate(spine_path_constraint_pose obj); -SPINE_C_EXPORT void spine_path_constraint_pose_set_mix_rotate(spine_path_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_path_constraint_pose_get_mix_x(spine_path_constraint_pose obj); -SPINE_C_EXPORT void spine_path_constraint_pose_set_mix_x(spine_path_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_path_constraint_pose_get_mix_y(spine_path_constraint_pose obj); -SPINE_C_EXPORT void spine_path_constraint_pose_set_mix_y(spine_path_constraint_pose obj, float value); +SPINE_C_API void spine_path_constraint_pose_dispose(spine_path_constraint_pose self); + +SPINE_C_API void spine_path_constraint_pose_set(spine_path_constraint_pose self, spine_path_constraint_pose pose); +SPINE_C_API float spine_path_constraint_pose_get_position(spine_path_constraint_pose self); +SPINE_C_API void spine_path_constraint_pose_set_position(spine_path_constraint_pose self, float position); +SPINE_C_API float spine_path_constraint_pose_get_spacing(spine_path_constraint_pose self); +SPINE_C_API void spine_path_constraint_pose_set_spacing(spine_path_constraint_pose self, float spacing); +SPINE_C_API float spine_path_constraint_pose_get_mix_rotate(spine_path_constraint_pose self); +SPINE_C_API void spine_path_constraint_pose_set_mix_rotate(spine_path_constraint_pose self, float mixRotate); +SPINE_C_API float spine_path_constraint_pose_get_mix_x(spine_path_constraint_pose self); +SPINE_C_API void spine_path_constraint_pose_set_mix_x(spine_path_constraint_pose self, float mixX); +SPINE_C_API float spine_path_constraint_pose_get_mix_y(spine_path_constraint_pose self); +SPINE_C_API void spine_path_constraint_pose_set_mix_y(spine_path_constraint_pose self, float mixY); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINTPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_POSE_H */ \ No newline at end of file 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 3ba61714e..b36f3da08 100644 --- a/spine-c-new/src/generated/path_constraint_position_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_position_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "path_constraint_position_timeline.h" #include using namespace spine; 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; + return (spine_path_constraint_position_timeline) new (__FILE__, __LINE__) PathConstraintPositionTimeline(frameCount, bezierCount, constraintIndex); } -void spine_path_constraint_position_timeline_dispose(spine_path_constraint_position_timeline obj) { - if (!obj) return; - delete (PathConstraintPositionTimeline *) obj; +void spine_path_constraint_position_timeline_dispose(spine_path_constraint_position_timeline self) { + delete (PathConstraintPositionTimeline*)self; } -spine_rtti spine_path_constraint_position_timeline_get_rtti() { - return (spine_rtti) &PathConstraintPositionTimeline::rtti; +spine_rtti spine_path_constraint_position_timeline_get_rtti(spine_path_constraint_position_timeline self) { + return (spine_rtti)&((PathConstraintPositionTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PathConstraintPositionTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline self, size_t frame, float time, float value) { + ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->setFrame(frame, time, value); } -float spine_path_constraint_position_timeline_get_curve_value(spine_path_constraint_position_timeline obj, float time) { - if (!obj) return 0; - PathConstraintPositionTimeline *_obj = (PathConstraintPositionTimeline *) obj; - return _obj->getCurveValue(time); +float spine_path_constraint_position_timeline_get_curve_value(spine_path_constraint_position_timeline self, float time) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_path_constraint_position_timeline_get_relative_value(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_path_constraint_position_timeline_get_absolute_value_1(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_path_constraint_position_timeline_get_absolute_value_2(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_path_constraint_position_timeline_get_scale_value(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_path_constraint_position_timeline self, size_t frame) { + ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->setLinear(frame); } -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); +void spine_path_constraint_position_timeline_set_stepped(spine_path_constraint_position_timeline self, size_t frame) { + ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->setStepped(frame); +} + +void spine_path_constraint_position_timeline_set_bezier(spine_path_constraint_position_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_path_constraint_position_timeline_get_bezier_value(spine_path_constraint_position_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_path_constraint_position_timeline_get_curves(spine_path_constraint_position_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getCurves(); +} + +size_t spine_path_constraint_position_timeline_get_frame_entries(spine_path_constraint_position_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getFrameEntries(); +} + +size_t spine_path_constraint_position_timeline_get_frame_count(spine_path_constraint_position_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_path_constraint_position_timeline_get_frames(spine_path_constraint_position_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getFrames(); +} + +float spine_path_constraint_position_timeline_get_duration(spine_path_constraint_position_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_path_constraint_position_timeline_get_property_ids(spine_path_constraint_position_timeline self) { + return (spine_array_property_id)&((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getPropertyIds(); +} + +int spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->getConstraintIndex(); +} + +void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline self, int inValue) { + ((ConstraintTimeline1*)(PathConstraintPositionTimeline*)self)->setConstraintIndex(inValue); +} + +spine_rtti spine_path_constraint_position_timeline_rtti(void) { + return (spine_rtti)&PathConstraintPositionTimeline::rtti; } 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 48e7a06fa..0a9ece80c 100644 --- a/spine-c-new/src/generated/path_constraint_position_timeline.h +++ b/spine-c-new/src/generated/path_constraint_position_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_POSITION_TIMELINE_H +#define SPINE_SPINE_PATH_CONSTRAINT_POSITION_TIMELINE_H -#ifndef SPINE_C_PATHCONSTRAINTPOSITIONTIMELINE_H -#define SPINE_C_PATHCONSTRAINTPOSITIONTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint_position_timeline spine_path_constraint_position_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_path_constraint_position_timeline_dispose(spine_path_constraint_position_timeline self); + +SPINE_C_API spine_rtti spine_path_constraint_position_timeline_get_rtti(spine_path_constraint_position_timeline self); +SPINE_C_API void spine_path_constraint_position_timeline_apply(spine_path_constraint_position_timeline self, 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_API void spine_path_constraint_position_timeline_set_frame(spine_path_constraint_position_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_path_constraint_position_timeline_get_curve_value(spine_path_constraint_position_timeline self, float time); +SPINE_C_API float spine_path_constraint_position_timeline_get_relative_value(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_path_constraint_position_timeline_get_absolute_value_1(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_path_constraint_position_timeline_get_absolute_value_2(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_path_constraint_position_timeline_get_scale_value(spine_path_constraint_position_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_path_constraint_position_timeline_set_linear(spine_path_constraint_position_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_position_timeline_set_stepped(spine_path_constraint_position_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_position_timeline_set_bezier(spine_path_constraint_position_timeline self, 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_API float spine_path_constraint_position_timeline_get_bezier_value(spine_path_constraint_position_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_path_constraint_position_timeline_get_curves(spine_path_constraint_position_timeline self); +SPINE_C_API size_t spine_path_constraint_position_timeline_get_frame_entries(spine_path_constraint_position_timeline self); +SPINE_C_API size_t spine_path_constraint_position_timeline_get_frame_count(spine_path_constraint_position_timeline self); +SPINE_C_API spine_array_float spine_path_constraint_position_timeline_get_frames(spine_path_constraint_position_timeline self); +SPINE_C_API float spine_path_constraint_position_timeline_get_duration(spine_path_constraint_position_timeline self); +SPINE_C_API spine_array_property_id spine_path_constraint_position_timeline_get_property_ids(spine_path_constraint_position_timeline self); +SPINE_C_API int spine_path_constraint_position_timeline_get_constraint_index(spine_path_constraint_position_timeline self); +SPINE_C_API void spine_path_constraint_position_timeline_set_constraint_index(spine_path_constraint_position_timeline self, int inValue); +SPINE_C_API spine_rtti spine_path_constraint_position_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINTPOSITIONTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_POSITION_TIMELINE_H */ \ No newline at end of file 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 e708648c2..9cbff6677 100644 --- a/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp +++ b/spine-c-new/src/generated/path_constraint_spacing_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "path_constraint_spacing_timeline.h" #include using namespace spine; 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; + return (spine_path_constraint_spacing_timeline) new (__FILE__, __LINE__) PathConstraintSpacingTimeline(frameCount, bezierCount, constraintIndex); } -void spine_path_constraint_spacing_timeline_dispose(spine_path_constraint_spacing_timeline obj) { - if (!obj) return; - delete (PathConstraintSpacingTimeline *) obj; +void spine_path_constraint_spacing_timeline_dispose(spine_path_constraint_spacing_timeline self) { + delete (PathConstraintSpacingTimeline*)self; } -spine_rtti spine_path_constraint_spacing_timeline_get_rtti() { - return (spine_rtti) &PathConstraintSpacingTimeline::rtti; +spine_rtti spine_path_constraint_spacing_timeline_get_rtti(spine_path_constraint_spacing_timeline self) { + return (spine_rtti)&((PathConstraintSpacingTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PathConstraintSpacingTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline self, size_t frame, float time, float value) { + ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->setFrame(frame, time, value); } -float spine_path_constraint_spacing_timeline_get_curve_value(spine_path_constraint_spacing_timeline obj, float time) { - if (!obj) return 0; - PathConstraintSpacingTimeline *_obj = (PathConstraintSpacingTimeline *) obj; - return _obj->getCurveValue(time); +float spine_path_constraint_spacing_timeline_get_curve_value(spine_path_constraint_spacing_timeline self, float time) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_path_constraint_spacing_timeline_get_relative_value(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_path_constraint_spacing_timeline_get_absolute_value_1(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_path_constraint_spacing_timeline_get_absolute_value_2(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_path_constraint_spacing_timeline_get_scale_value(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_path_constraint_spacing_timeline self, size_t frame) { + ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->setLinear(frame); } -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); +void spine_path_constraint_spacing_timeline_set_stepped(spine_path_constraint_spacing_timeline self, size_t frame) { + ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->setStepped(frame); +} + +void spine_path_constraint_spacing_timeline_set_bezier(spine_path_constraint_spacing_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_path_constraint_spacing_timeline_get_bezier_value(spine_path_constraint_spacing_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_path_constraint_spacing_timeline_get_curves(spine_path_constraint_spacing_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getCurves(); +} + +size_t spine_path_constraint_spacing_timeline_get_frame_entries(spine_path_constraint_spacing_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getFrameEntries(); +} + +size_t spine_path_constraint_spacing_timeline_get_frame_count(spine_path_constraint_spacing_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_path_constraint_spacing_timeline_get_frames(spine_path_constraint_spacing_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getFrames(); +} + +float spine_path_constraint_spacing_timeline_get_duration(spine_path_constraint_spacing_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_path_constraint_spacing_timeline_get_property_ids(spine_path_constraint_spacing_timeline self) { + return (spine_array_property_id)&((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getPropertyIds(); +} + +int spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline self) { + return ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->getConstraintIndex(); +} + +void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline self, int inValue) { + ((ConstraintTimeline1*)(PathConstraintSpacingTimeline*)self)->setConstraintIndex(inValue); +} + +spine_rtti spine_path_constraint_spacing_timeline_rtti(void) { + return (spine_rtti)&PathConstraintSpacingTimeline::rtti; } 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 402616aa9..574026e09 100644 --- a/spine-c-new/src/generated/path_constraint_spacing_timeline.h +++ b/spine-c-new/src/generated/path_constraint_spacing_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PATH_CONSTRAINT_SPACING_TIMELINE_H +#define SPINE_SPINE_PATH_CONSTRAINT_SPACING_TIMELINE_H -#ifndef SPINE_C_PATHCONSTRAINTSPACINGTIMELINE_H -#define SPINE_C_PATHCONSTRAINTSPACINGTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_path_constraint_spacing_timeline spine_path_constraint_spacing_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_path_constraint_spacing_timeline_dispose(spine_path_constraint_spacing_timeline self); + +SPINE_C_API spine_rtti spine_path_constraint_spacing_timeline_get_rtti(spine_path_constraint_spacing_timeline self); +SPINE_C_API void spine_path_constraint_spacing_timeline_apply(spine_path_constraint_spacing_timeline self, 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_API void spine_path_constraint_spacing_timeline_set_frame(spine_path_constraint_spacing_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_curve_value(spine_path_constraint_spacing_timeline self, float time); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_relative_value(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_absolute_value_1(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_absolute_value_2(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_scale_value(spine_path_constraint_spacing_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_path_constraint_spacing_timeline_set_linear(spine_path_constraint_spacing_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_spacing_timeline_set_stepped(spine_path_constraint_spacing_timeline self, size_t frame); +SPINE_C_API void spine_path_constraint_spacing_timeline_set_bezier(spine_path_constraint_spacing_timeline self, 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_API float spine_path_constraint_spacing_timeline_get_bezier_value(spine_path_constraint_spacing_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_path_constraint_spacing_timeline_get_curves(spine_path_constraint_spacing_timeline self); +SPINE_C_API size_t spine_path_constraint_spacing_timeline_get_frame_entries(spine_path_constraint_spacing_timeline self); +SPINE_C_API size_t spine_path_constraint_spacing_timeline_get_frame_count(spine_path_constraint_spacing_timeline self); +SPINE_C_API spine_array_float spine_path_constraint_spacing_timeline_get_frames(spine_path_constraint_spacing_timeline self); +SPINE_C_API float spine_path_constraint_spacing_timeline_get_duration(spine_path_constraint_spacing_timeline self); +SPINE_C_API spine_array_property_id spine_path_constraint_spacing_timeline_get_property_ids(spine_path_constraint_spacing_timeline self); +SPINE_C_API int spine_path_constraint_spacing_timeline_get_constraint_index(spine_path_constraint_spacing_timeline self); +SPINE_C_API void spine_path_constraint_spacing_timeline_set_constraint_index(spine_path_constraint_spacing_timeline self, int inValue); +SPINE_C_API spine_rtti spine_path_constraint_spacing_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PATHCONSTRAINTSPACINGTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PATH_CONSTRAINT_SPACING_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/physics.h b/spine-c-new/src/generated/physics.h index ebb064308..fea39baf8 100644 --- a/spine-c-new/src/generated/physics.h +++ b/spine-c-new/src/generated/physics.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_PHYSICS_H -#define SPINE_C_PHYSICS_H - -#include "../base.h" +#ifndef SPINE_SPINE_PHYSICS_H +#define SPINE_SPINE_PHYSICS_H #ifdef __cplusplus extern "C" { @@ -47,4 +16,4 @@ typedef enum spine_physics { } #endif -#endif // SPINE_C_PHYSICS_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/physics_constraint.cpp b/spine-c-new/src/generated/physics_constraint.cpp index 54b7e334e..9089b0b40 100644 --- a/spine-c-new/src/generated/physics_constraint.cpp +++ b/spine-c-new/src/generated/physics_constraint.cpp @@ -1,161 +1,88 @@ -/****************************************************************************** - * 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 "physics_constraint.h" #include using namespace spine; spine_physics_constraint spine_physics_constraint_create(spine_physics_constraint_data data, spine_skeleton skeleton) { - PhysicsConstraint *obj = new (__FILE__, __LINE__) PhysicsConstraint(*(PhysicsConstraintData*) data, *(Skeleton*) skeleton); - return (spine_physics_constraint) obj; + return (spine_physics_constraint) new (__FILE__, __LINE__) PhysicsConstraint(*((PhysicsConstraintData*)data), *((Skeleton*)skeleton)); } -void spine_physics_constraint_dispose(spine_physics_constraint obj) { - if (!obj) return; - delete (PhysicsConstraint *) obj; +void spine_physics_constraint_dispose(spine_physics_constraint self) { + delete (PhysicsConstraint*)self; } -spine_rtti spine_physics_constraint_get_rtti() { - return (spine_rtti) &PhysicsConstraint::rtti; +spine_rtti spine_physics_constraint_get_rtti(spine_physics_constraint self) { + return (spine_rtti)&((PhysicsConstraint*)self)->getRTTI(); } -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*) skeleton, (Physics) physics); +void spine_physics_constraint_update(spine_physics_constraint self, spine_skeleton skeleton, spine_physics physics) { + ((PhysicsConstraint*)self)->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*) skeleton); +void spine_physics_constraint_sort(spine_physics_constraint self, spine_skeleton skeleton) { + ((PhysicsConstraint*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_physics_constraint_is_source_active(spine_physics_constraint obj) { - if (!obj) return false; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->isSourceActive(); +bool spine_physics_constraint_is_source_active(spine_physics_constraint self) { + return ((PhysicsConstraint*)self)->isSourceActive(); } -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*) skeleton); +spine_physics_constraint spine_physics_constraint_copy(spine_physics_constraint self, spine_skeleton skeleton) { + return (spine_physics_constraint)((PhysicsConstraint*)self)->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*) skeleton); +void spine_physics_constraint_reset(spine_physics_constraint self, spine_skeleton skeleton) { + ((PhysicsConstraint*)self)->reset(*((Skeleton*)skeleton)); } -void spine_physics_constraint_translate(spine_physics_constraint obj, float x, float y) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->translate(x, y); +void spine_physics_constraint_translate(spine_physics_constraint self, float x, float y) { + ((PhysicsConstraint*)self)->translate(x, y); } -void spine_physics_constraint_rotate(spine_physics_constraint obj, float x, float y, float degrees) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->rotate(x, y, degrees); +void spine_physics_constraint_rotate(spine_physics_constraint self, float x, float y, float degrees) { + ((PhysicsConstraint*)self)->rotate(x, y, degrees); } -spine_bone_pose spine_physics_constraint_get_bone(spine_physics_constraint obj) { - if (!obj) return (spine_bone_pose) 0; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_bone_pose) &_obj->getBone(); +spine_bone_pose spine_physics_constraint_get_bone(spine_physics_constraint self) { + return (spine_bone_pose)&((PhysicsConstraint*)self)->getBone(); } -void spine_physics_constraint_set_bone(spine_physics_constraint obj, spine_bone_pose value) { - if (!obj) return; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->setBone(*((BonePose*) value)); +void spine_physics_constraint_set_bone(spine_physics_constraint self, spine_bone_pose bone) { + ((PhysicsConstraint*)self)->setBone(*((BonePose*)bone)); } -spine_constraint_data spine_physics_constraint_get_data(spine_physics_constraint obj) { - if (!obj) return 0; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_constraint_data) &_obj->getData(); +spine_constraint_data spine_physics_constraint_get_data(spine_physics_constraint self) { + return (spine_constraint_data)&((ConstraintGeneric*)(PhysicsConstraint*)self)->getData(); } -void spine_physics_constraint_pose(spine_physics_constraint obj) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->pose(); +spine_physics_constraint_pose spine_physics_constraint_get_pose(spine_physics_constraint self) { + return (spine_physics_constraint_pose)&((ConstraintGeneric*)(PhysicsConstraint*)self)->getPose(); } -void spine_physics_constraint_setup_pose(spine_physics_constraint obj) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->setupPose(); +spine_physics_constraint_pose spine_physics_constraint_get_applied_pose(spine_physics_constraint self) { + return (spine_physics_constraint_pose)&((ConstraintGeneric*)(PhysicsConstraint*)self)->getAppliedPose(); } -spine_physics_constraint_pose spine_physics_constraint_get_pose(spine_physics_constraint obj) { - if (!obj) return 0; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_physics_constraint_pose) &_obj->getPose(); +void spine_physics_constraint_reset_constrained(spine_physics_constraint self) { + ((ConstraintGeneric*)(PhysicsConstraint*)self)->resetConstrained(); } -spine_physics_constraint_pose spine_physics_constraint_get_applied_pose(spine_physics_constraint obj) { - if (!obj) return 0; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return (spine_physics_constraint_pose) &_obj->getAppliedPose(); +void spine_physics_constraint_constrained(spine_physics_constraint self) { + ((ConstraintGeneric*)(PhysicsConstraint*)self)->constrained(); } -void spine_physics_constraint_reset_constrained(spine_physics_constraint obj) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->resetConstrained(); +bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint self) { + return ((ConstraintGeneric*)(PhysicsConstraint*)self)->isPoseEqualToApplied(); } -void spine_physics_constraint_constrained(spine_physics_constraint obj) { - if (!obj) return ; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->constrained(); +bool spine_physics_constraint_is_active(spine_physics_constraint self) { + return ((ConstraintGeneric*)(PhysicsConstraint*)self)->isActive(); } -bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint obj) { - if (!obj) return false; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - return _obj->isPoseEqualToApplied(); +void spine_physics_constraint_set_active(spine_physics_constraint self, bool active) { + ((ConstraintGeneric*)(PhysicsConstraint*)self)->setActive(active); } -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, bool value) { - if (!obj) return; - PhysicsConstraint *_obj = (PhysicsConstraint *) obj; - _obj->setActive(value); +spine_rtti spine_physics_constraint_rtti(void) { + return (spine_rtti)&PhysicsConstraint::rtti; } diff --git a/spine-c-new/src/generated/physics_constraint.h b/spine-c-new/src/generated/physics_constraint.h index 40f6af059..71ac7b82b 100644 --- a/spine-c-new/src/generated/physics_constraint.h +++ b/spine-c-new/src/generated/physics_constraint.h @@ -1,66 +1,39 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_H -#ifndef SPINE_C_PHYSICSCONSTRAINT_H -#define SPINE_C_PHYSICSCONSTRAINT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint spine_physics_constraint_create(spine_physics_constraint_data data, spine_skeleton skeleton); -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_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 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); -SPINE_C_EXPORT void spine_physics_constraint_rotate(spine_physics_constraint obj, float x, float y, float degrees); -SPINE_C_EXPORT spine_bone_pose spine_physics_constraint_get_bone(spine_physics_constraint obj); -SPINE_C_EXPORT void spine_physics_constraint_set_bone(spine_physics_constraint obj, spine_bone_pose value); -SPINE_C_EXPORT spine_constraint_data spine_physics_constraint_get_data(spine_physics_constraint obj); -SPINE_C_EXPORT void spine_physics_constraint_pose(spine_physics_constraint obj); -SPINE_C_EXPORT void spine_physics_constraint_setup_pose(spine_physics_constraint obj); -SPINE_C_EXPORT spine_physics_constraint_pose spine_physics_constraint_get_pose(spine_physics_constraint obj); -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 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); +SPINE_C_API void spine_physics_constraint_dispose(spine_physics_constraint self); + +SPINE_C_API spine_rtti spine_physics_constraint_get_rtti(spine_physics_constraint self); +SPINE_C_API void spine_physics_constraint_update(spine_physics_constraint self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_physics_constraint_sort(spine_physics_constraint self, spine_skeleton skeleton); +SPINE_C_API bool spine_physics_constraint_is_source_active(spine_physics_constraint self); +SPINE_C_API spine_physics_constraint spine_physics_constraint_copy(spine_physics_constraint self, spine_skeleton skeleton); +SPINE_C_API void spine_physics_constraint_reset(spine_physics_constraint self, spine_skeleton skeleton); +SPINE_C_API void spine_physics_constraint_translate(spine_physics_constraint self, float x, float y); +SPINE_C_API void spine_physics_constraint_rotate(spine_physics_constraint self, float x, float y, float degrees); +SPINE_C_API spine_bone_pose spine_physics_constraint_get_bone(spine_physics_constraint self); +SPINE_C_API void spine_physics_constraint_set_bone(spine_physics_constraint self, spine_bone_pose bone); +SPINE_C_API spine_constraint_data spine_physics_constraint_get_data(spine_physics_constraint self); +SPINE_C_API spine_physics_constraint_pose spine_physics_constraint_get_pose(spine_physics_constraint self); +SPINE_C_API spine_physics_constraint_pose spine_physics_constraint_get_applied_pose(spine_physics_constraint self); +SPINE_C_API void spine_physics_constraint_reset_constrained(spine_physics_constraint self); +SPINE_C_API void spine_physics_constraint_constrained(spine_physics_constraint self); +SPINE_C_API bool spine_physics_constraint_is_pose_equal_to_applied(spine_physics_constraint self); +SPINE_C_API bool spine_physics_constraint_is_active(spine_physics_constraint self); +SPINE_C_API void spine_physics_constraint_set_active(spine_physics_constraint self, bool active); +SPINE_C_API spine_rtti spine_physics_constraint_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINT_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_H */ \ No newline at end of file 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 1635b4cda..ed449b354 100644 --- a/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_damping_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_damping_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_damping_timeline) new (__FILE__, __LINE__) PhysicsConstraintDampingTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_damping_timeline_dispose(spine_physics_constraint_damping_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintDampingTimeline *) obj; +void spine_physics_constraint_damping_timeline_dispose(spine_physics_constraint_damping_timeline self) { + delete (PhysicsConstraintDampingTimeline*)self; } -spine_rtti spine_physics_constraint_damping_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintDampingTimeline::rtti; +spine_rtti spine_physics_constraint_damping_timeline_get_rtti(spine_physics_constraint_damping_timeline self) { + return (spine_rtti)&((PhysicsConstraintDampingTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_damping_timeline_get_curve_value(spine_physics_constraint_damping_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_damping_timeline_get_curve_value(spine_physics_constraint_damping_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_damping_timeline_get_relative_value(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_damping_timeline_get_absolute_value_1(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_damping_timeline_get_absolute_value_2(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_damping_timeline_get_scale_value(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_damping_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_damping_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getCurves(); } -float *spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->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(); +float spine_physics_constraint_damping_timeline_get_duration(spine_physics_constraint_damping_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getDuration(); } -float *spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_damping_timeline_get_duration(spine_physics_constraint_damping_timeline obj) { - if (!obj) return 0; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintDampingTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintDampingTimeline *_obj = (PhysicsConstraintDampingTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_damping_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintDampingTimeline::rtti; } 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 839e0781b..8ad205f48 100644 --- a/spine-c-new/src/generated/physics_constraint_damping_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_damping_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_DAMPING_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_DAMPING_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTDAMPINGTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTDAMPINGTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_damping_timeline spine_physics_constraint_damping_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_damping_timeline_get_num_property_ids(spine_physics_constraint_damping_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_damping_timeline_dispose(spine_physics_constraint_damping_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_damping_timeline_get_rtti(spine_physics_constraint_damping_timeline self); +SPINE_C_API void spine_physics_constraint_damping_timeline_apply(spine_physics_constraint_damping_timeline self, 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_API void spine_physics_constraint_damping_timeline_set_frame(spine_physics_constraint_damping_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_curve_value(spine_physics_constraint_damping_timeline self, float time); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_relative_value(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_absolute_value_1(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_absolute_value_2(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_scale_value(spine_physics_constraint_damping_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_damping_timeline_set_linear(spine_physics_constraint_damping_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_damping_timeline_set_stepped(spine_physics_constraint_damping_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_damping_timeline_set_bezier(spine_physics_constraint_damping_timeline self, 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_API float spine_physics_constraint_damping_timeline_get_bezier_value(spine_physics_constraint_damping_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_damping_timeline_get_curves(spine_physics_constraint_damping_timeline self); +SPINE_C_API size_t spine_physics_constraint_damping_timeline_get_frame_entries(spine_physics_constraint_damping_timeline self); +SPINE_C_API size_t spine_physics_constraint_damping_timeline_get_frame_count(spine_physics_constraint_damping_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_damping_timeline_get_frames(spine_physics_constraint_damping_timeline self); +SPINE_C_API float spine_physics_constraint_damping_timeline_get_duration(spine_physics_constraint_damping_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_damping_timeline_get_property_ids(spine_physics_constraint_damping_timeline self); +SPINE_C_API int spine_physics_constraint_damping_timeline_get_constraint_index(spine_physics_constraint_damping_timeline self); +SPINE_C_API void spine_physics_constraint_damping_timeline_set_constraint_index(spine_physics_constraint_damping_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_damping_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTDAMPINGTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_DAMPING_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/physics_constraint_data.cpp b/spine-c-new/src/generated/physics_constraint_data.cpp index 71823b40f..fa540aad9 100644 --- a/spine-c-new/src/generated/physics_constraint_data.cpp +++ b/spine-c-new/src/generated/physics_constraint_data.cpp @@ -1,251 +1,160 @@ -/****************************************************************************** - * 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 "physics_constraint_data.h" #include using namespace spine; 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; + return (spine_physics_constraint_data) new (__FILE__, __LINE__) PhysicsConstraintData(*((const String*)name)); } -void spine_physics_constraint_data_dispose(spine_physics_constraint_data obj) { - if (!obj) return; - delete (PhysicsConstraintData *) obj; +void spine_physics_constraint_data_dispose(spine_physics_constraint_data self) { + delete (PhysicsConstraintData*)self; } -spine_rtti spine_physics_constraint_data_get_rtti() { - return (spine_rtti) &PhysicsConstraintData::rtti; +spine_rtti spine_physics_constraint_data_get_rtti(spine_physics_constraint_data self) { + return (spine_rtti)&((PhysicsConstraintData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_physics_constraint_data_create_method(spine_physics_constraint_data self, spine_skeleton skeleton) { + return (spine_constraint)((PhysicsConstraintData*)self)->create(*((Skeleton*)skeleton)); } -spine_bone_data spine_physics_constraint_data_get_bone(spine_physics_constraint_data obj) { - if (!obj) return (spine_bone_data) 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return (spine_bone_data) _obj->getBone(); +spine_bone_data spine_physics_constraint_data_get_bone(spine_physics_constraint_data self) { + return (spine_bone_data)((PhysicsConstraintData*)self)->getBone(); } -void spine_physics_constraint_data_set_bone(spine_physics_constraint_data obj, spine_bone_data value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setBone((BoneData *) value); +void spine_physics_constraint_data_set_bone(spine_physics_constraint_data self, spine_bone_data bone) { + ((PhysicsConstraintData*)self)->setBone((BoneData *)bone); } -float spine_physics_constraint_data_get_step(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getStep(); +float spine_physics_constraint_data_get_step(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getStep(); } -void spine_physics_constraint_data_set_step(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setStep(value); +void spine_physics_constraint_data_set_step(spine_physics_constraint_data self, float step) { + ((PhysicsConstraintData*)self)->setStep(step); } -float spine_physics_constraint_data_get_x(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getX(); +float spine_physics_constraint_data_get_x(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getX(); } -void spine_physics_constraint_data_set_x(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setX(value); +void spine_physics_constraint_data_set_x(spine_physics_constraint_data self, float x) { + ((PhysicsConstraintData*)self)->setX(x); } -float spine_physics_constraint_data_get_y(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getY(); +float spine_physics_constraint_data_get_y(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getY(); } -void spine_physics_constraint_data_set_y(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setY(value); +void spine_physics_constraint_data_set_y(spine_physics_constraint_data self, float y) { + ((PhysicsConstraintData*)self)->setY(y); } -float spine_physics_constraint_data_get_rotate(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getRotate(); +float spine_physics_constraint_data_get_rotate(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getRotate(); } -void spine_physics_constraint_data_set_rotate(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setRotate(value); +void spine_physics_constraint_data_set_rotate(spine_physics_constraint_data self, float rotate) { + ((PhysicsConstraintData*)self)->setRotate(rotate); } -float spine_physics_constraint_data_get_scale_x(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getScaleX(); +float spine_physics_constraint_data_get_scale_x(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getScaleX(); } -void spine_physics_constraint_data_set_scale_x(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setScaleX(value); +void spine_physics_constraint_data_set_scale_x(spine_physics_constraint_data self, float scaleX) { + ((PhysicsConstraintData*)self)->setScaleX(scaleX); } -float spine_physics_constraint_data_get_shear_x(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getShearX(); +float spine_physics_constraint_data_get_shear_x(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getShearX(); } -void spine_physics_constraint_data_set_shear_x(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setShearX(value); +void spine_physics_constraint_data_set_shear_x(spine_physics_constraint_data self, float shearX) { + ((PhysicsConstraintData*)self)->setShearX(shearX); } -float spine_physics_constraint_data_get_limit(spine_physics_constraint_data obj) { - if (!obj) return 0; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getLimit(); +float spine_physics_constraint_data_get_limit(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getLimit(); } -void spine_physics_constraint_data_set_limit(spine_physics_constraint_data obj, float value) { - if (!obj) return; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - _obj->setLimit(value); +void spine_physics_constraint_data_set_limit(spine_physics_constraint_data self, float limit) { + ((PhysicsConstraintData*)self)->setLimit(limit); } -bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getInertiaGlobal(); +bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getInertiaGlobal(); } -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); +void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data self, bool inertiaGlobal) { + ((PhysicsConstraintData*)self)->setInertiaGlobal(inertiaGlobal); } -bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getStrengthGlobal(); +bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getStrengthGlobal(); } -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); +void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data self, bool strengthGlobal) { + ((PhysicsConstraintData*)self)->setStrengthGlobal(strengthGlobal); } -bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getDampingGlobal(); +bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getDampingGlobal(); } -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); +void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data self, bool dampingGlobal) { + ((PhysicsConstraintData*)self)->setDampingGlobal(dampingGlobal); } -bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getMassGlobal(); +bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getMassGlobal(); } -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); +void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data self, bool massGlobal) { + ((PhysicsConstraintData*)self)->setMassGlobal(massGlobal); } -bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getWindGlobal(); +bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getWindGlobal(); } -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); +void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data self, bool windGlobal) { + ((PhysicsConstraintData*)self)->setWindGlobal(windGlobal); } -bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getGravityGlobal(); +bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getGravityGlobal(); } -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); +void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data self, bool gravityGlobal) { + ((PhysicsConstraintData*)self)->setGravityGlobal(gravityGlobal); } -bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->getMixGlobal(); +bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data self) { + return ((PhysicsConstraintData*)self)->getMixGlobal(); } -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); +void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data self, bool mixGlobal) { + ((PhysicsConstraintData*)self)->setMixGlobal(mixGlobal); } -const char* spine_physics_constraint_data_get_name(spine_physics_constraint_data obj) { - if (!obj) return nullptr; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_physics_constraint_data_get_name(spine_physics_constraint_data self) { + return (const char*)&((ConstraintDataGeneric*)(PhysicsConstraintData*)self)->getName(); } -bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data obj) { - if (!obj) return false; - PhysicsConstraintData *_obj = (PhysicsConstraintData *) obj; - return _obj->isSkinRequired(); +bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data self) { + return ((ConstraintDataGeneric*)(PhysicsConstraintData*)self)->isSkinRequired(); } -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 (spine_physics_constraint_pose) &_obj->getSetupPose(); +spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data self) { + return (spine_physics_constraint_pose)&((ConstraintDataGeneric*)(PhysicsConstraintData*)self)->getSetupPose(); +} + +void spine_physics_constraint_data_set_skin_required(spine_physics_constraint_data self, bool skinRequired) { + ((ConstraintDataGeneric*)(PhysicsConstraintData*)self)->setSkinRequired(skinRequired); +} + +spine_rtti spine_physics_constraint_data_rtti(void) { + return (spine_rtti)&PhysicsConstraintData::rtti; } diff --git a/spine-c-new/src/generated/physics_constraint_data.h b/spine-c-new/src/generated/physics_constraint_data.h index 9ad2b35fd..b25f3d9ff 100644 --- a/spine-c-new/src/generated/physics_constraint_data.h +++ b/spine-c-new/src/generated/physics_constraint_data.h @@ -1,81 +1,57 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_DATA_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_DATA_H -#ifndef SPINE_C_PHYSICSCONSTRAINTDATA_H -#define SPINE_C_PHYSICSCONSTRAINTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_data spine_physics_constraint_data_create(const char* 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_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); -SPINE_C_EXPORT float spine_physics_constraint_data_get_step(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_step(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_data_get_x(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_x(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_data_get_y(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_y(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_data_get_rotate(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_rotate(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_data_get_scale_x(spine_physics_constraint_data obj); -SPINE_C_EXPORT void spine_physics_constraint_data_set_scale_x(spine_physics_constraint_data obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_data_get_shear_x(spine_physics_constraint_data obj); -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 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); +SPINE_C_API void spine_physics_constraint_data_dispose(spine_physics_constraint_data self); + +SPINE_C_API spine_rtti spine_physics_constraint_data_get_rtti(spine_physics_constraint_data self); +SPINE_C_API spine_constraint spine_physics_constraint_data_create_method(spine_physics_constraint_data self, spine_skeleton skeleton); +SPINE_C_API spine_bone_data spine_physics_constraint_data_get_bone(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_bone(spine_physics_constraint_data self, spine_bone_data bone); +SPINE_C_API float spine_physics_constraint_data_get_step(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_step(spine_physics_constraint_data self, float step); +SPINE_C_API float spine_physics_constraint_data_get_x(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_x(spine_physics_constraint_data self, float x); +SPINE_C_API float spine_physics_constraint_data_get_y(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_y(spine_physics_constraint_data self, float y); +SPINE_C_API float spine_physics_constraint_data_get_rotate(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_rotate(spine_physics_constraint_data self, float rotate); +SPINE_C_API float spine_physics_constraint_data_get_scale_x(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_scale_x(spine_physics_constraint_data self, float scaleX); +SPINE_C_API float spine_physics_constraint_data_get_shear_x(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_shear_x(spine_physics_constraint_data self, float shearX); +SPINE_C_API float spine_physics_constraint_data_get_limit(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_limit(spine_physics_constraint_data self, float limit); +SPINE_C_API bool spine_physics_constraint_data_get_inertia_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_inertia_global(spine_physics_constraint_data self, bool inertiaGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_strength_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_strength_global(spine_physics_constraint_data self, bool strengthGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_damping_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_damping_global(spine_physics_constraint_data self, bool dampingGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_mass_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_mass_global(spine_physics_constraint_data self, bool massGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_wind_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_wind_global(spine_physics_constraint_data self, bool windGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_gravity_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_gravity_global(spine_physics_constraint_data self, bool gravityGlobal); +SPINE_C_API bool spine_physics_constraint_data_get_mix_global(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_mix_global(spine_physics_constraint_data self, bool mixGlobal); +SPINE_C_API const char* spine_physics_constraint_data_get_name(spine_physics_constraint_data self); +SPINE_C_API bool spine_physics_constraint_data_is_skin_required(spine_physics_constraint_data self); +SPINE_C_API spine_physics_constraint_pose spine_physics_constraint_data_get_setup_pose(spine_physics_constraint_data self); +SPINE_C_API void spine_physics_constraint_data_set_skin_required(spine_physics_constraint_data self, bool skinRequired); +SPINE_C_API spine_rtti spine_physics_constraint_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_DATA_H */ \ No newline at end of file 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 db78a06e8..eff2c49fc 100644 --- a/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_gravity_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_gravity_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_gravity_timeline) new (__FILE__, __LINE__) PhysicsConstraintGravityTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_gravity_timeline_dispose(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintGravityTimeline *) obj; +void spine_physics_constraint_gravity_timeline_dispose(spine_physics_constraint_gravity_timeline self) { + delete (PhysicsConstraintGravityTimeline*)self; } -spine_rtti spine_physics_constraint_gravity_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintGravityTimeline::rtti; +spine_rtti spine_physics_constraint_gravity_timeline_get_rtti(spine_physics_constraint_gravity_timeline self) { + return (spine_rtti)&((PhysicsConstraintGravityTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_gravity_timeline_get_curve_value(spine_physics_constraint_gravity_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_gravity_timeline_get_curve_value(spine_physics_constraint_gravity_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_gravity_timeline_get_relative_value(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_gravity_timeline_get_absolute_value_1(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_gravity_timeline_get_absolute_value_2(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_gravity_timeline_get_scale_value(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_gravity_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_gravity_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getCurves(); } -float *spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->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(); +float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_constraint_gravity_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getDuration(); } -float *spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_constraint_gravity_timeline obj) { - if (!obj) return 0; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintGravityTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintGravityTimeline *_obj = (PhysicsConstraintGravityTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_gravity_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintGravityTimeline::rtti; } 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 de975c798..da612b404 100644 --- a/spine-c-new/src/generated/physics_constraint_gravity_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_gravity_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_GRAVITY_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_GRAVITY_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTGRAVITYTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTGRAVITYTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_gravity_timeline spine_physics_constraint_gravity_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_gravity_timeline_get_num_property_ids(spine_physics_constraint_gravity_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_gravity_timeline_dispose(spine_physics_constraint_gravity_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_gravity_timeline_get_rtti(spine_physics_constraint_gravity_timeline self); +SPINE_C_API void spine_physics_constraint_gravity_timeline_apply(spine_physics_constraint_gravity_timeline self, 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_API void spine_physics_constraint_gravity_timeline_set_frame(spine_physics_constraint_gravity_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_curve_value(spine_physics_constraint_gravity_timeline self, float time); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_relative_value(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_absolute_value_1(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_absolute_value_2(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_scale_value(spine_physics_constraint_gravity_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_gravity_timeline_set_linear(spine_physics_constraint_gravity_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_gravity_timeline_set_stepped(spine_physics_constraint_gravity_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_gravity_timeline_set_bezier(spine_physics_constraint_gravity_timeline self, 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_API float spine_physics_constraint_gravity_timeline_get_bezier_value(spine_physics_constraint_gravity_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_gravity_timeline_get_curves(spine_physics_constraint_gravity_timeline self); +SPINE_C_API size_t spine_physics_constraint_gravity_timeline_get_frame_entries(spine_physics_constraint_gravity_timeline self); +SPINE_C_API size_t spine_physics_constraint_gravity_timeline_get_frame_count(spine_physics_constraint_gravity_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_gravity_timeline_get_frames(spine_physics_constraint_gravity_timeline self); +SPINE_C_API float spine_physics_constraint_gravity_timeline_get_duration(spine_physics_constraint_gravity_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_gravity_timeline_get_property_ids(spine_physics_constraint_gravity_timeline self); +SPINE_C_API int spine_physics_constraint_gravity_timeline_get_constraint_index(spine_physics_constraint_gravity_timeline self); +SPINE_C_API void spine_physics_constraint_gravity_timeline_set_constraint_index(spine_physics_constraint_gravity_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_gravity_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTGRAVITYTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_GRAVITY_TIMELINE_H */ \ No newline at end of file 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 f9564f8d9..91ec0b74d 100644 --- a/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_inertia_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_inertia_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_inertia_timeline) new (__FILE__, __LINE__) PhysicsConstraintInertiaTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_inertia_timeline_dispose(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintInertiaTimeline *) obj; +void spine_physics_constraint_inertia_timeline_dispose(spine_physics_constraint_inertia_timeline self) { + delete (PhysicsConstraintInertiaTimeline*)self; } -spine_rtti spine_physics_constraint_inertia_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintInertiaTimeline::rtti; +spine_rtti spine_physics_constraint_inertia_timeline_get_rtti(spine_physics_constraint_inertia_timeline self) { + return (spine_rtti)&((PhysicsConstraintInertiaTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_inertia_timeline_get_curve_value(spine_physics_constraint_inertia_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_inertia_timeline_get_curve_value(spine_physics_constraint_inertia_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_inertia_timeline_get_relative_value(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_inertia_timeline_get_absolute_value_1(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_inertia_timeline_get_absolute_value_2(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_inertia_timeline_get_scale_value(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_inertia_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_inertia_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getCurves(); } -float *spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->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(); +float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_constraint_inertia_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getDuration(); } -float *spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_constraint_inertia_timeline obj) { - if (!obj) return 0; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintInertiaTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintInertiaTimeline *_obj = (PhysicsConstraintInertiaTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_inertia_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintInertiaTimeline::rtti; } 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 0ddb3ca51..a234baec2 100644 --- a/spine-c-new/src/generated/physics_constraint_inertia_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_inertia_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_INERTIA_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_INERTIA_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTINERTIATIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTINERTIATIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_inertia_timeline spine_physics_constraint_inertia_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_inertia_timeline_get_num_property_ids(spine_physics_constraint_inertia_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_inertia_timeline_dispose(spine_physics_constraint_inertia_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_inertia_timeline_get_rtti(spine_physics_constraint_inertia_timeline self); +SPINE_C_API void spine_physics_constraint_inertia_timeline_apply(spine_physics_constraint_inertia_timeline self, 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_API void spine_physics_constraint_inertia_timeline_set_frame(spine_physics_constraint_inertia_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_curve_value(spine_physics_constraint_inertia_timeline self, float time); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_relative_value(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_absolute_value_1(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_absolute_value_2(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_scale_value(spine_physics_constraint_inertia_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_inertia_timeline_set_linear(spine_physics_constraint_inertia_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_inertia_timeline_set_stepped(spine_physics_constraint_inertia_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_inertia_timeline_set_bezier(spine_physics_constraint_inertia_timeline self, 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_API float spine_physics_constraint_inertia_timeline_get_bezier_value(spine_physics_constraint_inertia_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_inertia_timeline_get_curves(spine_physics_constraint_inertia_timeline self); +SPINE_C_API size_t spine_physics_constraint_inertia_timeline_get_frame_entries(spine_physics_constraint_inertia_timeline self); +SPINE_C_API size_t spine_physics_constraint_inertia_timeline_get_frame_count(spine_physics_constraint_inertia_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_inertia_timeline_get_frames(spine_physics_constraint_inertia_timeline self); +SPINE_C_API float spine_physics_constraint_inertia_timeline_get_duration(spine_physics_constraint_inertia_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_inertia_timeline_get_property_ids(spine_physics_constraint_inertia_timeline self); +SPINE_C_API int spine_physics_constraint_inertia_timeline_get_constraint_index(spine_physics_constraint_inertia_timeline self); +SPINE_C_API void spine_physics_constraint_inertia_timeline_set_constraint_index(spine_physics_constraint_inertia_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_inertia_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTINERTIATIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_INERTIA_TIMELINE_H */ \ No newline at end of file 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 b705113cb..5341b87ec 100644 --- a/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_mass_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_mass_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_mass_timeline) new (__FILE__, __LINE__) PhysicsConstraintMassTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_mass_timeline_dispose(spine_physics_constraint_mass_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintMassTimeline *) obj; +void spine_physics_constraint_mass_timeline_dispose(spine_physics_constraint_mass_timeline self) { + delete (PhysicsConstraintMassTimeline*)self; } -spine_rtti spine_physics_constraint_mass_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintMassTimeline::rtti; +spine_rtti spine_physics_constraint_mass_timeline_get_rtti(spine_physics_constraint_mass_timeline self) { + return (spine_rtti)&((PhysicsConstraintMassTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_mass_timeline_get_curve_value(spine_physics_constraint_mass_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_mass_timeline_get_curve_value(spine_physics_constraint_mass_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_mass_timeline_get_relative_value(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_mass_timeline_get_absolute_value_1(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_mass_timeline_get_absolute_value_2(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_mass_timeline_get_scale_value(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_mass_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_mass_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getCurves(); } -float *spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->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(); +float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constraint_mass_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getDuration(); } -float *spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constraint_mass_timeline obj) { - if (!obj) return 0; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMassTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintMassTimeline *_obj = (PhysicsConstraintMassTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_mass_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintMassTimeline::rtti; } 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 371cf28a3..cb200b742 100644 --- a/spine-c-new/src/generated/physics_constraint_mass_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_mass_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_MASS_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_MASS_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTMASSTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTMASSTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_mass_timeline spine_physics_constraint_mass_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_mass_timeline_get_num_property_ids(spine_physics_constraint_mass_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_mass_timeline_dispose(spine_physics_constraint_mass_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_mass_timeline_get_rtti(spine_physics_constraint_mass_timeline self); +SPINE_C_API void spine_physics_constraint_mass_timeline_apply(spine_physics_constraint_mass_timeline self, 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_API void spine_physics_constraint_mass_timeline_set_frame(spine_physics_constraint_mass_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_curve_value(spine_physics_constraint_mass_timeline self, float time); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_relative_value(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_absolute_value_1(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_absolute_value_2(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_scale_value(spine_physics_constraint_mass_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_mass_timeline_set_linear(spine_physics_constraint_mass_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_mass_timeline_set_stepped(spine_physics_constraint_mass_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_mass_timeline_set_bezier(spine_physics_constraint_mass_timeline self, 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_API float spine_physics_constraint_mass_timeline_get_bezier_value(spine_physics_constraint_mass_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_mass_timeline_get_curves(spine_physics_constraint_mass_timeline self); +SPINE_C_API size_t spine_physics_constraint_mass_timeline_get_frame_entries(spine_physics_constraint_mass_timeline self); +SPINE_C_API size_t spine_physics_constraint_mass_timeline_get_frame_count(spine_physics_constraint_mass_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_mass_timeline_get_frames(spine_physics_constraint_mass_timeline self); +SPINE_C_API float spine_physics_constraint_mass_timeline_get_duration(spine_physics_constraint_mass_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_mass_timeline_get_property_ids(spine_physics_constraint_mass_timeline self); +SPINE_C_API int spine_physics_constraint_mass_timeline_get_constraint_index(spine_physics_constraint_mass_timeline self); +SPINE_C_API void spine_physics_constraint_mass_timeline_set_constraint_index(spine_physics_constraint_mass_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_mass_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTMASSTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_MASS_TIMELINE_H */ \ No newline at end of file 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 a737765e0..d5ecc3ff2 100644 --- a/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_mix_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_mix_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_mix_timeline) new (__FILE__, __LINE__) PhysicsConstraintMixTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_mix_timeline_dispose(spine_physics_constraint_mix_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintMixTimeline *) obj; +void spine_physics_constraint_mix_timeline_dispose(spine_physics_constraint_mix_timeline self) { + delete (PhysicsConstraintMixTimeline*)self; } -spine_rtti spine_physics_constraint_mix_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintMixTimeline::rtti; +spine_rtti spine_physics_constraint_mix_timeline_get_rtti(spine_physics_constraint_mix_timeline self) { + return (spine_rtti)&((PhysicsConstraintMixTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_mix_timeline_get_curve_value(spine_physics_constraint_mix_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_mix_timeline_get_curve_value(spine_physics_constraint_mix_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_mix_timeline_get_relative_value(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_mix_timeline_get_absolute_value_1(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_mix_timeline_get_absolute_value_2(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_mix_timeline_get_scale_value(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_mix_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_mix_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getCurves(); } -float *spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->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(); +float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constraint_mix_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getDuration(); } -float *spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constraint_mix_timeline obj) { - if (!obj) return 0; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintMixTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintMixTimeline *_obj = (PhysicsConstraintMixTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_mix_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintMixTimeline::rtti; } 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 4d77561ae..3322e94bc 100644 --- a/spine-c-new/src/generated/physics_constraint_mix_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_mix_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_MIX_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_MIX_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTMIXTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTMIXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_mix_timeline spine_physics_constraint_mix_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_mix_timeline_get_num_property_ids(spine_physics_constraint_mix_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_mix_timeline_dispose(spine_physics_constraint_mix_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_mix_timeline_get_rtti(spine_physics_constraint_mix_timeline self); +SPINE_C_API void spine_physics_constraint_mix_timeline_apply(spine_physics_constraint_mix_timeline self, 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_API void spine_physics_constraint_mix_timeline_set_frame(spine_physics_constraint_mix_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_curve_value(spine_physics_constraint_mix_timeline self, float time); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_relative_value(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_absolute_value_1(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_absolute_value_2(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_scale_value(spine_physics_constraint_mix_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_mix_timeline_set_linear(spine_physics_constraint_mix_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_mix_timeline_set_stepped(spine_physics_constraint_mix_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_mix_timeline_set_bezier(spine_physics_constraint_mix_timeline self, 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_API float spine_physics_constraint_mix_timeline_get_bezier_value(spine_physics_constraint_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_mix_timeline_get_curves(spine_physics_constraint_mix_timeline self); +SPINE_C_API size_t spine_physics_constraint_mix_timeline_get_frame_entries(spine_physics_constraint_mix_timeline self); +SPINE_C_API size_t spine_physics_constraint_mix_timeline_get_frame_count(spine_physics_constraint_mix_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_mix_timeline_get_frames(spine_physics_constraint_mix_timeline self); +SPINE_C_API float spine_physics_constraint_mix_timeline_get_duration(spine_physics_constraint_mix_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_mix_timeline_get_property_ids(spine_physics_constraint_mix_timeline self); +SPINE_C_API int spine_physics_constraint_mix_timeline_get_constraint_index(spine_physics_constraint_mix_timeline self); +SPINE_C_API void spine_physics_constraint_mix_timeline_set_constraint_index(spine_physics_constraint_mix_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_mix_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTMIXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_MIX_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/physics_constraint_pose.cpp b/spine-c-new/src/generated/physics_constraint_pose.cpp index 91652eaac..dfd53b9bf 100644 --- a/spine-c-new/src/generated/physics_constraint_pose.cpp +++ b/spine-c-new/src/generated/physics_constraint_pose.cpp @@ -1,133 +1,72 @@ -/****************************************************************************** - * 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 "physics_constraint_pose.h" #include using namespace spine; spine_physics_constraint_pose spine_physics_constraint_pose_create(void) { - PhysicsConstraintPose *obj = new (__FILE__, __LINE__) PhysicsConstraintPose(); - return (spine_physics_constraint_pose) obj; + return (spine_physics_constraint_pose) new (__FILE__, __LINE__) PhysicsConstraintPose(); } -void spine_physics_constraint_pose_dispose(spine_physics_constraint_pose obj) { - if (!obj) return; - delete (PhysicsConstraintPose *) obj; +void spine_physics_constraint_pose_dispose(spine_physics_constraint_pose self) { + delete (PhysicsConstraintPose*)self; } -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(*((PhysicsConstraintPose*) value)); +void spine_physics_constraint_pose_set(spine_physics_constraint_pose self, spine_physics_constraint_pose pose) { + ((PhysicsConstraintPose*)self)->set(*((PhysicsConstraintPose*)pose)); } -float spine_physics_constraint_pose_get_inertia(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getInertia(); +float spine_physics_constraint_pose_get_inertia(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getInertia(); } -void spine_physics_constraint_pose_set_inertia(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setInertia(value); +void spine_physics_constraint_pose_set_inertia(spine_physics_constraint_pose self, float inertia) { + ((PhysicsConstraintPose*)self)->setInertia(inertia); } -float spine_physics_constraint_pose_get_strength(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getStrength(); +float spine_physics_constraint_pose_get_strength(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getStrength(); } -void spine_physics_constraint_pose_set_strength(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setStrength(value); +void spine_physics_constraint_pose_set_strength(spine_physics_constraint_pose self, float strength) { + ((PhysicsConstraintPose*)self)->setStrength(strength); } -float spine_physics_constraint_pose_get_damping(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getDamping(); +float spine_physics_constraint_pose_get_damping(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getDamping(); } -void spine_physics_constraint_pose_set_damping(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setDamping(value); +void spine_physics_constraint_pose_set_damping(spine_physics_constraint_pose self, float damping) { + ((PhysicsConstraintPose*)self)->setDamping(damping); } -float spine_physics_constraint_pose_get_mass_inverse(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getMassInverse(); +float spine_physics_constraint_pose_get_mass_inverse(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getMassInverse(); } -void spine_physics_constraint_pose_set_mass_inverse(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setMassInverse(value); +void spine_physics_constraint_pose_set_mass_inverse(spine_physics_constraint_pose self, float massInverse) { + ((PhysicsConstraintPose*)self)->setMassInverse(massInverse); } -float spine_physics_constraint_pose_get_wind(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getWind(); +float spine_physics_constraint_pose_get_wind(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getWind(); } -void spine_physics_constraint_pose_set_wind(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setWind(value); +void spine_physics_constraint_pose_set_wind(spine_physics_constraint_pose self, float wind) { + ((PhysicsConstraintPose*)self)->setWind(wind); } -float spine_physics_constraint_pose_get_gravity(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getGravity(); +float spine_physics_constraint_pose_get_gravity(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getGravity(); } -void spine_physics_constraint_pose_set_gravity(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setGravity(value); +void spine_physics_constraint_pose_set_gravity(spine_physics_constraint_pose self, float gravity) { + ((PhysicsConstraintPose*)self)->setGravity(gravity); } -float spine_physics_constraint_pose_get_mix(spine_physics_constraint_pose obj) { - if (!obj) return 0; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - return _obj->getMix(); +float spine_physics_constraint_pose_get_mix(spine_physics_constraint_pose self) { + return ((PhysicsConstraintPose*)self)->getMix(); } -void spine_physics_constraint_pose_set_mix(spine_physics_constraint_pose obj, float value) { - if (!obj) return; - PhysicsConstraintPose *_obj = (PhysicsConstraintPose *) obj; - _obj->setMix(value); +void spine_physics_constraint_pose_set_mix(spine_physics_constraint_pose self, float mix) { + ((PhysicsConstraintPose*)self)->setMix(mix); } diff --git a/spine-c-new/src/generated/physics_constraint_pose.h b/spine-c-new/src/generated/physics_constraint_pose.h index aef5c6d8a..c67c393fe 100644 --- a/spine-c-new/src/generated/physics_constraint_pose.h +++ b/spine-c-new/src/generated/physics_constraint_pose.h @@ -1,61 +1,35 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_POSE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_POSE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTPOSE_H -#define SPINE_C_PHYSICSCONSTRAINTPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_pose spine_physics_constraint_pose_create(void); -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); -SPINE_C_EXPORT void spine_physics_constraint_pose_set(spine_physics_constraint_pose obj, spine_physics_constraint_pose value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_inertia(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_inertia(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_strength(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_strength(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_damping(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_damping(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_mass_inverse(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_mass_inverse(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_wind(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_wind(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_gravity(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_gravity(spine_physics_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_physics_constraint_pose_get_mix(spine_physics_constraint_pose obj); -SPINE_C_EXPORT void spine_physics_constraint_pose_set_mix(spine_physics_constraint_pose obj, float value); +SPINE_C_API void spine_physics_constraint_pose_dispose(spine_physics_constraint_pose self); + +SPINE_C_API void spine_physics_constraint_pose_set(spine_physics_constraint_pose self, spine_physics_constraint_pose pose); +SPINE_C_API float spine_physics_constraint_pose_get_inertia(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_inertia(spine_physics_constraint_pose self, float inertia); +SPINE_C_API float spine_physics_constraint_pose_get_strength(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_strength(spine_physics_constraint_pose self, float strength); +SPINE_C_API float spine_physics_constraint_pose_get_damping(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_damping(spine_physics_constraint_pose self, float damping); +SPINE_C_API float spine_physics_constraint_pose_get_mass_inverse(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_mass_inverse(spine_physics_constraint_pose self, float massInverse); +SPINE_C_API float spine_physics_constraint_pose_get_wind(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_wind(spine_physics_constraint_pose self, float wind); +SPINE_C_API float spine_physics_constraint_pose_get_gravity(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_gravity(spine_physics_constraint_pose self, float gravity); +SPINE_C_API float spine_physics_constraint_pose_get_mix(spine_physics_constraint_pose self); +SPINE_C_API void spine_physics_constraint_pose_set_mix(spine_physics_constraint_pose self, float mix); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_POSE_H */ \ No newline at end of file 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 e54fde13b..ecec21c76 100644 --- a/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_reset_timeline.cpp @@ -1,113 +1,56 @@ -/****************************************************************************** - * 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 "physics_constraint_reset_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_reset_timeline) new (__FILE__, __LINE__) PhysicsConstraintResetTimeline(frameCount, constraintIndex); } -void spine_physics_constraint_reset_timeline_dispose(spine_physics_constraint_reset_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintResetTimeline *) obj; +void spine_physics_constraint_reset_timeline_dispose(spine_physics_constraint_reset_timeline self) { + delete (PhysicsConstraintResetTimeline*)self; } -spine_rtti spine_physics_constraint_reset_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintResetTimeline::rtti; +spine_rtti spine_physics_constraint_reset_timeline_get_rtti(spine_physics_constraint_reset_timeline self) { + return (spine_rtti)&((PhysicsConstraintResetTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintResetTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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(); +int spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline self) { + return ((PhysicsConstraintResetTimeline*)self)->getFrameCount(); } -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(); +int spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline self) { + return ((PhysicsConstraintResetTimeline*)self)->getConstraintIndex(); } -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); +void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline self, int frame, float time) { + ((PhysicsConstraintResetTimeline*)self)->setFrame(frame, time); } -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(); +size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline self) { + return ((Timeline*)(PhysicsConstraintResetTimeline*)self)->getFrameEntries(); } -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_array_float spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline self) { + return (spine_array_float)&((Timeline*)(PhysicsConstraintResetTimeline*)self)->getFrames(); } -float *spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constraint_reset_timeline self) { + return ((Timeline*)(PhysicsConstraintResetTimeline*)self)->getDuration(); } -float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constraint_reset_timeline obj) { - if (!obj) return 0; - PhysicsConstraintResetTimeline *_obj = (PhysicsConstraintResetTimeline *) obj; - return _obj->getDuration(); +spine_array_property_id spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline self) { + return (spine_array_property_id)&((Timeline*)(PhysicsConstraintResetTimeline*)self)->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(); +void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline self, int inValue) { + ((ConstraintTimeline*)(PhysicsConstraintResetTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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); +spine_rtti spine_physics_constraint_reset_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintResetTimeline::rtti; } 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 eff7c309a..4d14361a6 100644 --- a/spine-c-new/src/generated/physics_constraint_reset_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_reset_timeline.h @@ -1,58 +1,31 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_RESET_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_RESET_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTRESETTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTRESETTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_reset_timeline spine_physics_constraint_reset_timeline_create(size_t frameCount, int 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_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 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 int32_t spine_physics_constraint_reset_timeline_get_num_property_ids(spine_physics_constraint_reset_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_reset_timeline_dispose(spine_physics_constraint_reset_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_reset_timeline_get_rtti(spine_physics_constraint_reset_timeline self); +SPINE_C_API void spine_physics_constraint_reset_timeline_apply(spine_physics_constraint_reset_timeline self, 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_API int spine_physics_constraint_reset_timeline_get_frame_count(spine_physics_constraint_reset_timeline self); +SPINE_C_API int spine_physics_constraint_reset_timeline_get_constraint_index(spine_physics_constraint_reset_timeline self); +SPINE_C_API void spine_physics_constraint_reset_timeline_set_frame(spine_physics_constraint_reset_timeline self, int frame, float time); +SPINE_C_API size_t spine_physics_constraint_reset_timeline_get_frame_entries(spine_physics_constraint_reset_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_reset_timeline_get_frames(spine_physics_constraint_reset_timeline self); +SPINE_C_API float spine_physics_constraint_reset_timeline_get_duration(spine_physics_constraint_reset_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_reset_timeline_get_property_ids(spine_physics_constraint_reset_timeline self); +SPINE_C_API void spine_physics_constraint_reset_timeline_set_constraint_index(spine_physics_constraint_reset_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_reset_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTRESETTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_RESET_TIMELINE_H */ \ No newline at end of file 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 b23195539..c87f4ea0a 100644 --- a/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_strength_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_strength_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_strength_timeline) new (__FILE__, __LINE__) PhysicsConstraintStrengthTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_strength_timeline_dispose(spine_physics_constraint_strength_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintStrengthTimeline *) obj; +void spine_physics_constraint_strength_timeline_dispose(spine_physics_constraint_strength_timeline self) { + delete (PhysicsConstraintStrengthTimeline*)self; } -spine_rtti spine_physics_constraint_strength_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintStrengthTimeline::rtti; +spine_rtti spine_physics_constraint_strength_timeline_get_rtti(spine_physics_constraint_strength_timeline self) { + return (spine_rtti)&((PhysicsConstraintStrengthTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_strength_timeline_get_curve_value(spine_physics_constraint_strength_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_strength_timeline_get_curve_value(spine_physics_constraint_strength_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_strength_timeline_get_relative_value(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_strength_timeline_get_absolute_value_1(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_strength_timeline_get_absolute_value_2(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_strength_timeline_get_scale_value(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_strength_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_strength_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getCurves(); } -float *spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->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(); +float spine_physics_constraint_strength_timeline_get_duration(spine_physics_constraint_strength_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getDuration(); } -float *spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_strength_timeline_get_duration(spine_physics_constraint_strength_timeline obj) { - if (!obj) return 0; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintStrengthTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintStrengthTimeline *_obj = (PhysicsConstraintStrengthTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_strength_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintStrengthTimeline::rtti; } 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 4cd0b8b81..c56f2dc48 100644 --- a/spine-c-new/src/generated/physics_constraint_strength_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_strength_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_STRENGTH_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_STRENGTH_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTSTRENGTHTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTSTRENGTHTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_strength_timeline spine_physics_constraint_strength_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_strength_timeline_get_num_property_ids(spine_physics_constraint_strength_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_strength_timeline_dispose(spine_physics_constraint_strength_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_strength_timeline_get_rtti(spine_physics_constraint_strength_timeline self); +SPINE_C_API void spine_physics_constraint_strength_timeline_apply(spine_physics_constraint_strength_timeline self, 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_API void spine_physics_constraint_strength_timeline_set_frame(spine_physics_constraint_strength_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_curve_value(spine_physics_constraint_strength_timeline self, float time); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_relative_value(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_absolute_value_1(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_absolute_value_2(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_scale_value(spine_physics_constraint_strength_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_strength_timeline_set_linear(spine_physics_constraint_strength_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_strength_timeline_set_stepped(spine_physics_constraint_strength_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_strength_timeline_set_bezier(spine_physics_constraint_strength_timeline self, 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_API float spine_physics_constraint_strength_timeline_get_bezier_value(spine_physics_constraint_strength_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_strength_timeline_get_curves(spine_physics_constraint_strength_timeline self); +SPINE_C_API size_t spine_physics_constraint_strength_timeline_get_frame_entries(spine_physics_constraint_strength_timeline self); +SPINE_C_API size_t spine_physics_constraint_strength_timeline_get_frame_count(spine_physics_constraint_strength_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_strength_timeline_get_frames(spine_physics_constraint_strength_timeline self); +SPINE_C_API float spine_physics_constraint_strength_timeline_get_duration(spine_physics_constraint_strength_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_strength_timeline_get_property_ids(spine_physics_constraint_strength_timeline self); +SPINE_C_API int spine_physics_constraint_strength_timeline_get_constraint_index(spine_physics_constraint_strength_timeline self); +SPINE_C_API void spine_physics_constraint_strength_timeline_set_constraint_index(spine_physics_constraint_strength_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_strength_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTSTRENGTHTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_STRENGTH_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/physics_constraint_timeline.cpp b/spine-c-new/src/generated/physics_constraint_timeline.cpp index e95004d84..b5b7fcd4d 100644 --- a/spine-c-new/src/generated/physics_constraint_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_timeline.cpp @@ -1,179 +1,92 @@ -/****************************************************************************** - * 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 "physics_constraint_timeline.h" #include using namespace spine; -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; +void spine_physics_constraint_timeline_dispose(spine_physics_constraint_timeline self) { + delete (PhysicsConstraintTimeline*)self; } -void spine_physics_constraint_timeline_dispose(spine_physics_constraint_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintTimeline *) obj; +spine_rtti spine_physics_constraint_timeline_get_rtti(spine_physics_constraint_timeline self) { + return (spine_rtti)&((PhysicsConstraintTimeline*)self)->getRTTI(); } -spine_rtti spine_physics_constraint_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintTimeline::rtti; +void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline self, size_t frame, float time, float value) { + ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->setFrame(frame, time, 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); +float spine_physics_constraint_timeline_get_curve_value(spine_physics_constraint_timeline self, float time) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getCurveValue(time); } -float spine_physics_constraint_timeline_get_curve_value(spine_physics_constraint_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_timeline_get_relative_value(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getRelativeValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_timeline_get_absolute_value_1(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->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) { - if (!obj) return 0; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup); +float spine_physics_constraint_timeline_get_absolute_value_2(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup, 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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_timeline_get_scale_value(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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, (MixBlend) blend, (MixDirection) direction, current, setup); +void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline self, size_t frame) { + ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->setLinear(frame); } -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 self, size_t frame) { + ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->setStepped(frame); } -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 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, 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 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getBezierValue(time, frame, valueOffset, 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); +spine_array_float spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->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(); +size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline self) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getFrameEntries(); } -float *spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline self) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getFrameCount(); } -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_array_float spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getFrames(); } -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(); +float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_timeline self) { + return ((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getDuration(); } -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_array_property_id spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline self) { + return (spine_array_property_id)&((CurveTimeline1*)(PhysicsConstraintTimeline*)self)->getPropertyIds(); } -float *spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +int spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline self) { + return ((ConstraintTimeline*)(PhysicsConstraintTimeline*)self)->getConstraintIndex(); } -float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_timeline obj) { - if (!obj) return 0; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return _obj->getDuration(); +void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline self, int inValue) { + ((ConstraintTimeline*)(PhysicsConstraintTimeline*)self)->setConstraintIndex(inValue); } -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(); -} - -int64_t *spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintTimeline *_obj = (PhysicsConstraintTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintTimeline::rtti; } diff --git a/spine-c-new/src/generated/physics_constraint_timeline.h b/spine-c-new/src/generated/physics_constraint_timeline.h index 2768b2b7f..ee81c00bf 100644 --- a/spine-c-new/src/generated/physics_constraint_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_timeline.h @@ -1,69 +1,39 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_physics_constraint_timeline_dispose(spine_physics_constraint_timeline self); -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_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_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, 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 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 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 int32_t spine_physics_constraint_timeline_get_num_property_ids(spine_physics_constraint_timeline obj); -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); +SPINE_C_API spine_rtti spine_physics_constraint_timeline_get_rtti(spine_physics_constraint_timeline self); +SPINE_C_API void spine_physics_constraint_timeline_apply(spine_physics_constraint_timeline self, 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_API void spine_physics_constraint_timeline_set_frame(spine_physics_constraint_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_timeline_get_curve_value(spine_physics_constraint_timeline self, float time); +SPINE_C_API float spine_physics_constraint_timeline_get_relative_value(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_timeline_get_absolute_value_1(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_timeline_get_absolute_value_2(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_timeline_get_scale_value(spine_physics_constraint_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_timeline_set_linear(spine_physics_constraint_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_timeline_set_stepped(spine_physics_constraint_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_timeline_set_bezier(spine_physics_constraint_timeline self, 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_API float spine_physics_constraint_timeline_get_bezier_value(spine_physics_constraint_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_timeline_get_curves(spine_physics_constraint_timeline self); +SPINE_C_API size_t spine_physics_constraint_timeline_get_frame_entries(spine_physics_constraint_timeline self); +SPINE_C_API size_t spine_physics_constraint_timeline_get_frame_count(spine_physics_constraint_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_timeline_get_frames(spine_physics_constraint_timeline self); +SPINE_C_API float spine_physics_constraint_timeline_get_duration(spine_physics_constraint_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_timeline_get_property_ids(spine_physics_constraint_timeline self); +SPINE_C_API int spine_physics_constraint_timeline_get_constraint_index(spine_physics_constraint_timeline self); +SPINE_C_API void spine_physics_constraint_timeline_set_constraint_index(spine_physics_constraint_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_TIMELINE_H */ \ No newline at end of file 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 12ff18075..f8524a631 100644 --- a/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp +++ b/spine-c-new/src/generated/physics_constraint_wind_timeline.cpp @@ -1,179 +1,96 @@ -/****************************************************************************** - * 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 "physics_constraint_wind_timeline.h" #include using namespace spine; 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; + return (spine_physics_constraint_wind_timeline) new (__FILE__, __LINE__) PhysicsConstraintWindTimeline(frameCount, bezierCount, physicsConstraintIndex); } -void spine_physics_constraint_wind_timeline_dispose(spine_physics_constraint_wind_timeline obj) { - if (!obj) return; - delete (PhysicsConstraintWindTimeline *) obj; +void spine_physics_constraint_wind_timeline_dispose(spine_physics_constraint_wind_timeline self) { + delete (PhysicsConstraintWindTimeline*)self; } -spine_rtti spine_physics_constraint_wind_timeline_get_rtti() { - return (spine_rtti) &PhysicsConstraintWindTimeline::rtti; +spine_rtti spine_physics_constraint_wind_timeline_get_rtti(spine_physics_constraint_wind_timeline self) { + return (spine_rtti)&((PhysicsConstraintWindTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline self, size_t frame, float time, float value) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->setFrame(frame, time, value); } -float spine_physics_constraint_wind_timeline_get_curve_value(spine_physics_constraint_wind_timeline obj, float time) { - if (!obj) return 0; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getCurveValue(time); +float spine_physics_constraint_wind_timeline_get_curve_value(spine_physics_constraint_wind_timeline self, float time) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_physics_constraint_wind_timeline_get_relative_value(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_physics_constraint_wind_timeline_get_absolute_value_1(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_physics_constraint_wind_timeline_get_absolute_value_2(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_physics_constraint_wind_timeline_get_scale_value(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_physics_constraint_wind_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->setLinear(frame); } -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_stepped(spine_physics_constraint_wind_timeline self, size_t frame) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->setStepped(frame); } -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); +void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getCurves(); } -float *spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline self) { + return (spine_array_float)&((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->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(); +float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constraint_wind_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getDuration(); } -float *spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline obj) { - if (!obj) return nullptr; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline self) { + return (spine_array_property_id)&((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getPropertyIds(); } -float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constraint_wind_timeline obj) { - if (!obj) return 0; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - return _obj->getDuration(); +int spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline self) { + return ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->getConstraintIndex(); } -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(); +void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline self, int inValue) { + ((PhysicsConstraintTimeline*)(PhysicsConstraintWindTimeline*)self)->setConstraintIndex(inValue); } -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 (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - PhysicsConstraintWindTimeline *_obj = (PhysicsConstraintWindTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_physics_constraint_wind_timeline_rtti(void) { + return (spine_rtti)&PhysicsConstraintWindTimeline::rtti; } 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 5949b4cb4..52d7cf3c6 100644 --- a/spine-c-new/src/generated/physics_constraint_wind_timeline.h +++ b/spine-c-new/src/generated/physics_constraint_wind_timeline.h @@ -1,69 +1,41 @@ -/****************************************************************************** - * 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_SPINE_PHYSICS_CONSTRAINT_WIND_TIMELINE_H +#define SPINE_SPINE_PHYSICS_CONSTRAINT_WIND_TIMELINE_H -#ifndef SPINE_C_PHYSICSCONSTRAINTWINDTIMELINE_H -#define SPINE_C_PHYSICSCONSTRAINTWINDTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_physics_constraint_wind_timeline spine_physics_constraint_wind_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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, 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 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 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 int32_t spine_physics_constraint_wind_timeline_get_num_property_ids(spine_physics_constraint_wind_timeline obj); -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); +SPINE_C_API void spine_physics_constraint_wind_timeline_dispose(spine_physics_constraint_wind_timeline self); + +SPINE_C_API spine_rtti spine_physics_constraint_wind_timeline_get_rtti(spine_physics_constraint_wind_timeline self); +SPINE_C_API void spine_physics_constraint_wind_timeline_apply(spine_physics_constraint_wind_timeline self, 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_API void spine_physics_constraint_wind_timeline_set_frame(spine_physics_constraint_wind_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_curve_value(spine_physics_constraint_wind_timeline self, float time); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_relative_value(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_absolute_value_1(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_absolute_value_2(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_scale_value(spine_physics_constraint_wind_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_physics_constraint_wind_timeline_set_linear(spine_physics_constraint_wind_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_wind_timeline_set_stepped(spine_physics_constraint_wind_timeline self, size_t frame); +SPINE_C_API void spine_physics_constraint_wind_timeline_set_bezier(spine_physics_constraint_wind_timeline self, 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_API float spine_physics_constraint_wind_timeline_get_bezier_value(spine_physics_constraint_wind_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_physics_constraint_wind_timeline_get_curves(spine_physics_constraint_wind_timeline self); +SPINE_C_API size_t spine_physics_constraint_wind_timeline_get_frame_entries(spine_physics_constraint_wind_timeline self); +SPINE_C_API size_t spine_physics_constraint_wind_timeline_get_frame_count(spine_physics_constraint_wind_timeline self); +SPINE_C_API spine_array_float spine_physics_constraint_wind_timeline_get_frames(spine_physics_constraint_wind_timeline self); +SPINE_C_API float spine_physics_constraint_wind_timeline_get_duration(spine_physics_constraint_wind_timeline self); +SPINE_C_API spine_array_property_id spine_physics_constraint_wind_timeline_get_property_ids(spine_physics_constraint_wind_timeline self); +SPINE_C_API int spine_physics_constraint_wind_timeline_get_constraint_index(spine_physics_constraint_wind_timeline self); +SPINE_C_API void spine_physics_constraint_wind_timeline_set_constraint_index(spine_physics_constraint_wind_timeline self, int inValue); +SPINE_C_API spine_rtti spine_physics_constraint_wind_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_PHYSICSCONSTRAINTWINDTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_PHYSICS_CONSTRAINT_WIND_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/point_attachment.cpp b/spine-c-new/src/generated/point_attachment.cpp index 9ba57b30a..89bce2505 100644 --- a/spine-c-new/src/generated/point_attachment.cpp +++ b/spine-c-new/src/generated/point_attachment.cpp @@ -1,131 +1,76 @@ -/****************************************************************************** - * 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 "point_attachment.h" #include using namespace spine; spine_point_attachment spine_point_attachment_create(const char* name) { - PointAttachment *obj = new (__FILE__, __LINE__) PointAttachment(String(name)); - return (spine_point_attachment) obj; + return (spine_point_attachment) new (__FILE__, __LINE__) PointAttachment(*((const String*)name)); } -void spine_point_attachment_dispose(spine_point_attachment obj) { - if (!obj) return; - delete (PointAttachment *) obj; +void spine_point_attachment_dispose(spine_point_attachment self) { + delete (PointAttachment*)self; } -spine_rtti spine_point_attachment_get_rtti() { - return (spine_rtti) &PointAttachment::rtti; +spine_rtti spine_point_attachment_get_rtti(spine_point_attachment self) { + return (spine_rtti)&((PointAttachment*)self)->getRTTI(); } -float spine_point_attachment_get_x(spine_point_attachment obj) { - if (!obj) return 0; - PointAttachment *_obj = (PointAttachment *) obj; - return _obj->getX(); +float spine_point_attachment_get_x(spine_point_attachment self) { + return ((PointAttachment*)self)->getX(); } -void spine_point_attachment_set_x(spine_point_attachment obj, float value) { - if (!obj) return; - PointAttachment *_obj = (PointAttachment *) obj; - _obj->setX(value); +void spine_point_attachment_set_x(spine_point_attachment self, float inValue) { + ((PointAttachment*)self)->setX(inValue); } -float spine_point_attachment_get_y(spine_point_attachment obj) { - if (!obj) return 0; - PointAttachment *_obj = (PointAttachment *) obj; - return _obj->getY(); +float spine_point_attachment_get_y(spine_point_attachment self) { + return ((PointAttachment*)self)->getY(); } -void spine_point_attachment_set_y(spine_point_attachment obj, float value) { - if (!obj) return; - PointAttachment *_obj = (PointAttachment *) obj; - _obj->setY(value); +void spine_point_attachment_set_y(spine_point_attachment self, float inValue) { + ((PointAttachment*)self)->setY(inValue); } -float spine_point_attachment_get_rotation(spine_point_attachment obj) { - if (!obj) return 0; - PointAttachment *_obj = (PointAttachment *) obj; - return _obj->getRotation(); +float spine_point_attachment_get_rotation(spine_point_attachment self) { + return ((PointAttachment*)self)->getRotation(); } -void spine_point_attachment_set_rotation(spine_point_attachment obj, float value) { - if (!obj) return; - PointAttachment *_obj = (PointAttachment *) obj; - _obj->setRotation(value); +void spine_point_attachment_set_rotation(spine_point_attachment self, float inValue) { + ((PointAttachment*)self)->setRotation(inValue); } -spine_color spine_point_attachment_get_color(spine_point_attachment obj) { - if (!obj) return (spine_color) 0; - PointAttachment *_obj = (PointAttachment *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_point_attachment_get_color(spine_point_attachment self) { + return (spine_color)&((PointAttachment*)self)->getColor(); } -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(*(BonePose*) bone, *ox, *oy); +void spine_point_attachment_compute_world_position(spine_point_attachment self, spine_bone_pose bone, float* ox, float* oy) { + ((PointAttachment*)self)->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(*(BonePose*) bone); +float spine_point_attachment_compute_world_rotation(spine_point_attachment self, spine_bone_pose bone) { + return ((PointAttachment*)self)->computeWorldRotation(*((BonePose*)bone)); } -spine_attachment spine_point_attachment_copy(spine_point_attachment obj) { - if (!obj) return (spine_attachment) 0; - PointAttachment *_obj = (PointAttachment *) obj; - return (spine_attachment) _obj->copy(); +spine_attachment spine_point_attachment_copy(spine_point_attachment self) { + return (spine_attachment)((PointAttachment*)self)->copy(); } -const char* spine_point_attachment_get_name(spine_point_attachment obj) { - if (!obj) return nullptr; - PointAttachment *_obj = (PointAttachment *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_point_attachment_get_name(spine_point_attachment self) { + return (const char*)&((Attachment*)(PointAttachment*)self)->getName(); } -int spine_point_attachment_get_ref_count(spine_point_attachment obj) { - if (!obj) return 0; - PointAttachment *_obj = (PointAttachment *) obj; - return _obj->getRefCount(); +int spine_point_attachment_get_ref_count(spine_point_attachment self) { + return ((Attachment*)(PointAttachment*)self)->getRefCount(); } -void spine_point_attachment_reference(spine_point_attachment obj) { - if (!obj) return ; - PointAttachment *_obj = (PointAttachment *) obj; - _obj->reference(); +void spine_point_attachment_reference(spine_point_attachment self) { + ((Attachment*)(PointAttachment*)self)->reference(); } -void spine_point_attachment_dereference(spine_point_attachment obj) { - if (!obj) return ; - PointAttachment *_obj = (PointAttachment *) obj; - _obj->dereference(); +void spine_point_attachment_dereference(spine_point_attachment self) { + ((Attachment*)(PointAttachment*)self)->dereference(); +} + +spine_rtti spine_point_attachment_rtti(void) { + return (spine_rtti)&PointAttachment::rtti; } diff --git a/spine-c-new/src/generated/point_attachment.h b/spine-c-new/src/generated/point_attachment.h index 8eb07b2e5..da5b90847 100644 --- a/spine-c-new/src/generated/point_attachment.h +++ b/spine-c-new/src/generated/point_attachment.h @@ -1,61 +1,36 @@ -/****************************************************************************** - * 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_SPINE_POINT_ATTACHMENT_H +#define SPINE_SPINE_POINT_ATTACHMENT_H -#ifndef SPINE_C_POINTATTACHMENT_H -#define SPINE_C_POINTATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_point_attachment spine_point_attachment_create(const char* 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_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); -SPINE_C_EXPORT void spine_point_attachment_set_y(spine_point_attachment obj, float value); -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 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 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); +SPINE_C_API void spine_point_attachment_dispose(spine_point_attachment self); + +SPINE_C_API spine_rtti spine_point_attachment_get_rtti(spine_point_attachment self); +SPINE_C_API float spine_point_attachment_get_x(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_set_x(spine_point_attachment self, float inValue); +SPINE_C_API float spine_point_attachment_get_y(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_set_y(spine_point_attachment self, float inValue); +SPINE_C_API float spine_point_attachment_get_rotation(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_set_rotation(spine_point_attachment self, float inValue); +SPINE_C_API spine_color spine_point_attachment_get_color(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_compute_world_position(spine_point_attachment self, spine_bone_pose bone, float* ox, float* oy); +SPINE_C_API float spine_point_attachment_compute_world_rotation(spine_point_attachment self, spine_bone_pose bone); +SPINE_C_API spine_attachment spine_point_attachment_copy(spine_point_attachment self); +SPINE_C_API const char* spine_point_attachment_get_name(spine_point_attachment self); +SPINE_C_API int spine_point_attachment_get_ref_count(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_reference(spine_point_attachment self); +SPINE_C_API void spine_point_attachment_dereference(spine_point_attachment self); +SPINE_C_API spine_rtti spine_point_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_POINTATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_POINT_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/polygon.cpp b/spine-c-new/src/generated/polygon.cpp index b3acf250d..35831b33f 100644 --- a/spine-c-new/src/generated/polygon.cpp +++ b/spine-c-new/src/generated/polygon.cpp @@ -1,43 +1,28 @@ -/****************************************************************************** - * 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 "polygon.h" #include using namespace spine; spine_polygon spine_polygon_create(void) { - Polygon *obj = new (__FILE__, __LINE__) Polygon(); - return (spine_polygon) obj; + return (spine_polygon) new (__FILE__, __LINE__) Polygon(); } -void spine_polygon_dispose(spine_polygon obj) { - if (!obj) return; - delete (Polygon *) obj; +void spine_polygon_dispose(spine_polygon self) { + delete (Polygon*)self; +} + +spine_array_float spine_polygon_get__vertices(spine_polygon self) { + return (spine_array_float)&((Polygon*)self)->_vertices; +} + +void spine_polygon_set__vertices(spine_polygon self, spine_array_float value) { + ((Polygon*)self)->_vertices = *((Array*)value); +} + +int spine_polygon_get__count(spine_polygon self) { + return ((Polygon*)self)->_count; +} + +void spine_polygon_set__count(spine_polygon self, int value) { + ((Polygon*)self)->_count = value; } diff --git a/spine-c-new/src/generated/polygon.h b/spine-c-new/src/generated/polygon.h index 5ac7a66bc..939231dc4 100644 --- a/spine-c-new/src/generated/polygon.h +++ b/spine-c-new/src/generated/polygon.h @@ -1,46 +1,24 @@ -/****************************************************************************** - * 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_SPINE_POLYGON_H +#define SPINE_SPINE_POLYGON_H -#ifndef SPINE_C_POLYGON_H -#define SPINE_C_POLYGON_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_polygon spine_polygon_create(void); -SPINE_C_EXPORT spine_polygon spine_polygon_create(void); -SPINE_C_EXPORT void spine_polygon_dispose(spine_polygon obj); +SPINE_C_API void spine_polygon_dispose(spine_polygon self); + +SPINE_C_API spine_array_float spine_polygon_get__vertices(spine_polygon self); +SPINE_C_API void spine_polygon_set__vertices(spine_polygon self, spine_array_float value); +SPINE_C_API int spine_polygon_get__count(spine_polygon self); +SPINE_C_API void spine_polygon_set__count(spine_polygon self, int value); #ifdef __cplusplus } #endif -#endif // SPINE_C_POLYGON_H \ No newline at end of file +#endif /* SPINE_SPINE_POLYGON_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/posed.cpp b/spine-c-new/src/generated/posed.cpp index ff372bfa9..c844dcae5 100644 --- a/spine-c-new/src/generated/posed.cpp +++ b/spine-c-new/src/generated/posed.cpp @@ -1,68 +1,20 @@ -/****************************************************************************** - * 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.h" #include using namespace spine; -void spine_posed_dispose(spine_posed obj) { - if (!obj) return; - delete (Posed *) obj; +void spine_posed_dispose(spine_posed self) { + delete (Posed*)self; } -void spine_posed_setup_pose(spine_posed obj) { - if (!obj) return ; - Posed *_obj = (Posed *) obj; - _obj->setupPose(); +void spine_posed_constrained(spine_posed self) { + ((Posed*)self)->constrained(); } -void spine_posed_pose(spine_posed obj) { - if (!obj) return ; - Posed *_obj = (Posed *) obj; - _obj->pose(); +void spine_posed_reset_constrained(spine_posed self) { + ((Posed*)self)->resetConstrained(); } -void spine_posed_constrained(spine_posed obj) { - if (!obj) return ; - Posed *_obj = (Posed *) obj; - _obj->constrained(); -} - -void spine_posed_reset_constrained(spine_posed obj) { - if (!obj) return ; - Posed *_obj = (Posed *) obj; - _obj->resetConstrained(); -} - -bool spine_posed_is_pose_equal_to_applied(spine_posed obj) { - if (!obj) return false; - Posed *_obj = (Posed *) obj; - return _obj->isPoseEqualToApplied(); +bool spine_posed_is_pose_equal_to_applied(spine_posed self) { + return ((Posed*)self)->isPoseEqualToApplied(); } diff --git a/spine-c-new/src/generated/posed.h b/spine-c-new/src/generated/posed.h index c12357a56..fa919e7ff 100644 --- a/spine-c-new/src/generated/posed.h +++ b/spine-c-new/src/generated/posed.h @@ -1,50 +1,21 @@ -/****************************************************************************** - * 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_SPINE_POSED_H +#define SPINE_SPINE_POSED_H -#ifndef SPINE_C_POSED_H -#define SPINE_C_POSED_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_posed_dispose(spine_posed self); -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 bool spine_posed_is_pose_equal_to_applied(spine_posed obj); +SPINE_C_API void spine_posed_constrained(spine_posed self); +SPINE_C_API void spine_posed_reset_constrained(spine_posed self); +SPINE_C_API bool spine_posed_is_pose_equal_to_applied(spine_posed self); #ifdef __cplusplus } #endif -#endif // SPINE_C_POSED_H \ No newline at end of file +#endif /* SPINE_SPINE_POSED_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/posed_active.cpp b/spine-c-new/src/generated/posed_active.cpp index b45487669..82b59f838 100644 --- a/spine-c-new/src/generated/posed_active.cpp +++ b/spine-c-new/src/generated/posed_active.cpp @@ -1,55 +1,16 @@ -/****************************************************************************** - * 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_active.h" #include using namespace spine; -spine_posed_active spine_posed_active_create(void) { - PosedActive *obj = new (__FILE__, __LINE__) PosedActive(); - return (spine_posed_active) obj; +void spine_posed_active_dispose(spine_posed_active self) { + delete (PosedActive*)self; } -void spine_posed_active_dispose(spine_posed_active obj) { - if (!obj) return; - delete (PosedActive *) obj; +bool spine_posed_active_is_active(spine_posed_active self) { + return ((PosedActive*)self)->isActive(); } -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, bool value) { - if (!obj) return; - PosedActive *_obj = (PosedActive *) obj; - _obj->setActive(value); +void spine_posed_active_set_active(spine_posed_active self, bool active) { + ((PosedActive*)self)->setActive(active); } diff --git a/spine-c-new/src/generated/posed_active.h b/spine-c-new/src/generated/posed_active.h index 24726cb02..0bf04fc55 100644 --- a/spine-c-new/src/generated/posed_active.h +++ b/spine-c-new/src/generated/posed_active.h @@ -1,48 +1,20 @@ -/****************************************************************************** - * 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_SPINE_POSED_ACTIVE_H +#define SPINE_SPINE_POSED_ACTIVE_H -#ifndef SPINE_C_POSEDACTIVE_H -#define SPINE_C_POSEDACTIVE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_posed_active_dispose(spine_posed_active self); -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 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); +SPINE_C_API bool spine_posed_active_is_active(spine_posed_active self); +SPINE_C_API void spine_posed_active_set_active(spine_posed_active self, bool active); #ifdef __cplusplus } #endif -#endif // SPINE_C_POSEDACTIVE_H \ No newline at end of file +#endif /* SPINE_SPINE_POSED_ACTIVE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/posed_data.cpp b/spine-c-new/src/generated/posed_data.cpp index 2d9a81179..7f0519d54 100644 --- a/spine-c-new/src/generated/posed_data.cpp +++ b/spine-c-new/src/generated/posed_data.cpp @@ -1,61 +1,24 @@ -/****************************************************************************** - * 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.h" #include using namespace spine; spine_posed_data spine_posed_data_create(const char* name) { - PosedData *obj = new (__FILE__, __LINE__) PosedData(String(name)); - return (spine_posed_data) obj; + return (spine_posed_data) new (__FILE__, __LINE__) PosedData(*((const String*)name)); } -void spine_posed_data_dispose(spine_posed_data obj) { - if (!obj) return; - delete (PosedData *) obj; +void spine_posed_data_dispose(spine_posed_data self) { + delete (PosedData*)self; } -const char* spine_posed_data_get_name(spine_posed_data obj) { - if (!obj) return nullptr; - PosedData *_obj = (PosedData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_posed_data_get_name(spine_posed_data self) { + return (const char*)&((PosedData*)self)->getName(); } -bool spine_posed_data_is_skin_required(spine_posed_data obj) { - if (!obj) return false; - PosedData *_obj = (PosedData *) obj; - return _obj->isSkinRequired(); +bool spine_posed_data_is_skin_required(spine_posed_data self) { + return ((PosedData*)self)->isSkinRequired(); } -void spine_posed_data_set_skin_required(spine_posed_data obj, bool value) { - if (!obj) return; - PosedData *_obj = (PosedData *) obj; - _obj->setSkinRequired(value); +void spine_posed_data_set_skin_required(spine_posed_data self, bool skinRequired) { + ((PosedData*)self)->setSkinRequired(skinRequired); } diff --git a/spine-c-new/src/generated/posed_data.h b/spine-c-new/src/generated/posed_data.h index da6825192..fdc605837 100644 --- a/spine-c-new/src/generated/posed_data.h +++ b/spine-c-new/src/generated/posed_data.h @@ -1,49 +1,23 @@ -/****************************************************************************** - * 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_SPINE_POSED_DATA_H +#define SPINE_SPINE_POSED_DATA_H -#ifndef SPINE_C_POSEDDATA_H -#define SPINE_C_POSEDDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_posed_data spine_posed_data_create(const char* 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 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); +SPINE_C_API void spine_posed_data_dispose(spine_posed_data self); + +SPINE_C_API const char* spine_posed_data_get_name(spine_posed_data self); +SPINE_C_API bool spine_posed_data_is_skin_required(spine_posed_data self); +SPINE_C_API void spine_posed_data_set_skin_required(spine_posed_data self, bool skinRequired); #ifdef __cplusplus } #endif -#endif // SPINE_C_POSEDDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_POSED_DATA_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 b26f38be9..0a3091481 100644 --- a/spine-c-new/src/generated/position_mode.h +++ b/spine-c-new/src/generated/position_mode.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_POSITIONMODE_H -#define SPINE_C_POSITIONMODE_H - -#include "../base.h" +#ifndef SPINE_SPINE_POSITION_MODE_H +#define SPINE_SPINE_POSITION_MODE_H #ifdef __cplusplus extern "C" { @@ -45,4 +14,4 @@ typedef enum spine_position_mode { } #endif -#endif // SPINE_C_POSITIONMODE_H \ No newline at end of file +#endif /* SPINE_SPINE_POSITION_MODE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/pow_interpolation.cpp b/spine-c-new/src/generated/pow_interpolation.cpp deleted file mode 100644 index e7942e0c6..000000000 --- a/spine-c-new/src/generated/pow_interpolation.cpp +++ /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. - *****************************************************************************/ - -#include "pow_interpolation.h" -#include - -using namespace spine; - -spine_pow_interpolation spine_pow_interpolation_create(int power) { - PowInterpolation *obj = new (__FILE__, __LINE__) PowInterpolation(power); - return (spine_pow_interpolation) obj; -} - -void spine_pow_interpolation_dispose(spine_pow_interpolation obj) { - if (!obj) return; - delete (PowInterpolation *) obj; -} - -float spine_pow_interpolation_apply(spine_pow_interpolation obj, float a) { - if (!obj) return 0; - PowInterpolation *_obj = (PowInterpolation *) obj; - return _obj->apply(a); -} - -float spine_pow_interpolation_interpolate(spine_pow_interpolation obj, float start, float end, float a) { - if (!obj) return 0; - PowInterpolation *_obj = (PowInterpolation *) obj; - return _obj->interpolate(start, end, a); -} diff --git a/spine-c-new/src/generated/pow_interpolation.h b/spine-c-new/src/generated/pow_interpolation.h deleted file mode 100644 index 33112f004..000000000 --- a/spine-c-new/src/generated/pow_interpolation.h +++ /dev/null @@ -1,48 +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_POWINTERPOLATION_H -#define SPINE_C_POWINTERPOLATION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "types.h" - -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); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_POWINTERPOLATION_H \ No newline at end of file diff --git a/spine-c-new/src/generated/pow_out_interpolation.cpp b/spine-c-new/src/generated/pow_out_interpolation.cpp deleted file mode 100644 index 2c4e14c24..000000000 --- a/spine-c-new/src/generated/pow_out_interpolation.cpp +++ /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. - *****************************************************************************/ - -#include "pow_out_interpolation.h" -#include - -using namespace spine; - -spine_pow_out_interpolation spine_pow_out_interpolation_create(int power) { - PowOutInterpolation *obj = new (__FILE__, __LINE__) PowOutInterpolation(power); - return (spine_pow_out_interpolation) obj; -} - -void spine_pow_out_interpolation_dispose(spine_pow_out_interpolation obj) { - if (!obj) return; - delete (PowOutInterpolation *) obj; -} - -float spine_pow_out_interpolation_apply(spine_pow_out_interpolation obj, float a) { - if (!obj) return 0; - PowOutInterpolation *_obj = (PowOutInterpolation *) obj; - return _obj->apply(a); -} - -float spine_pow_out_interpolation_interpolate(spine_pow_out_interpolation obj, float start, float end, float a) { - if (!obj) return 0; - PowOutInterpolation *_obj = (PowOutInterpolation *) obj; - return _obj->interpolate(start, end, a); -} diff --git a/spine-c-new/src/generated/pow_out_interpolation.h b/spine-c-new/src/generated/pow_out_interpolation.h deleted file mode 100644 index 1dc65fd96..000000000 --- a/spine-c-new/src/generated/pow_out_interpolation.h +++ /dev/null @@ -1,48 +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_POWOUTINTERPOLATION_H -#define SPINE_C_POWOUTINTERPOLATION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "types.h" - -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); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_POWOUTINTERPOLATION_H \ No newline at end of file diff --git a/spine-c-new/src/generated/property.h b/spine-c-new/src/generated/property.h index f0367bca4..211ec3610 100644 --- a/spine-c-new/src/generated/property.h +++ b/spine-c-new/src/generated/property.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_PROPERTY_H -#define SPINE_C_PROPERTY_H - -#include "../base.h" +#ifndef SPINE_SPINE_PROPERTY_H +#define SPINE_SPINE_PROPERTY_H #ifdef __cplusplus extern "C" { @@ -74,4 +43,4 @@ typedef enum spine_property { } #endif -#endif // SPINE_C_PROPERTY_H \ No newline at end of file +#endif /* SPINE_SPINE_PROPERTY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/region_attachment.cpp b/spine-c-new/src/generated/region_attachment.cpp index b87e0a4f4..007ea3024 100644 --- a/spine-c-new/src/generated/region_attachment.cpp +++ b/spine-c-new/src/generated/region_attachment.cpp @@ -1,245 +1,144 @@ -/****************************************************************************** - * 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 "region_attachment.h" #include using namespace spine; spine_region_attachment spine_region_attachment_create(const char* name) { - RegionAttachment *obj = new (__FILE__, __LINE__) RegionAttachment(String(name)); - return (spine_region_attachment) obj; + return (spine_region_attachment) new (__FILE__, __LINE__) RegionAttachment(*((const String*)name)); } -void spine_region_attachment_dispose(spine_region_attachment obj) { - if (!obj) return; - delete (RegionAttachment *) obj; +void spine_region_attachment_dispose(spine_region_attachment self) { + delete (RegionAttachment*)self; } -spine_rtti spine_region_attachment_get_rtti() { - return (spine_rtti) &RegionAttachment::rtti; +spine_rtti spine_region_attachment_get_rtti(spine_region_attachment self) { + return (spine_rtti)&((RegionAttachment*)self)->getRTTI(); } -void spine_region_attachment_update_region(spine_region_attachment obj) { - if (!obj) return ; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->updateRegion(); +void spine_region_attachment_update_region(spine_region_attachment self) { + ((RegionAttachment*)self)->updateRegion(); } -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*) slot, (float *) worldVertices, offset, stride); +void spine_region_attachment_compute_world_vertices_1(spine_region_attachment self, spine_slot slot, float * worldVertices, size_t offset, size_t stride) { + ((RegionAttachment*)self)->computeWorldVertices(*((Slot*)slot), worldVertices, offset, 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*) slot, (Array &) worldVertices, offset, stride); +void spine_region_attachment_compute_world_vertices_2(spine_region_attachment self, spine_slot slot, spine_array_float worldVertices, size_t offset, size_t stride) { + ((RegionAttachment*)self)->computeWorldVertices(*((Slot*)slot), *((Array*)worldVertices), offset, stride); } -float spine_region_attachment_get_x(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getX(); +float spine_region_attachment_get_x(spine_region_attachment self) { + return ((RegionAttachment*)self)->getX(); } -void spine_region_attachment_set_x(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setX(value); +void spine_region_attachment_set_x(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setX(inValue); } -float spine_region_attachment_get_y(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getY(); +float spine_region_attachment_get_y(spine_region_attachment self) { + return ((RegionAttachment*)self)->getY(); } -void spine_region_attachment_set_y(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setY(value); +void spine_region_attachment_set_y(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setY(inValue); } -float spine_region_attachment_get_rotation(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getRotation(); +float spine_region_attachment_get_rotation(spine_region_attachment self) { + return ((RegionAttachment*)self)->getRotation(); } -void spine_region_attachment_set_rotation(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setRotation(value); +void spine_region_attachment_set_rotation(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setRotation(inValue); } -float spine_region_attachment_get_scale_x(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getScaleX(); +float spine_region_attachment_get_scale_x(spine_region_attachment self) { + return ((RegionAttachment*)self)->getScaleX(); } -void spine_region_attachment_set_scale_x(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setScaleX(value); +void spine_region_attachment_set_scale_x(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setScaleX(inValue); } -float spine_region_attachment_get_scale_y(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getScaleY(); +float spine_region_attachment_get_scale_y(spine_region_attachment self) { + return ((RegionAttachment*)self)->getScaleY(); } -void spine_region_attachment_set_scale_y(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setScaleY(value); +void spine_region_attachment_set_scale_y(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setScaleY(inValue); } -float spine_region_attachment_get_width(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getWidth(); +float spine_region_attachment_get_width(spine_region_attachment self) { + return ((RegionAttachment*)self)->getWidth(); } -void spine_region_attachment_set_width(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setWidth(value); +void spine_region_attachment_set_width(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setWidth(inValue); } -float spine_region_attachment_get_height(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getHeight(); +float spine_region_attachment_get_height(spine_region_attachment self) { + return ((RegionAttachment*)self)->getHeight(); } -void spine_region_attachment_set_height(spine_region_attachment obj, float value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setHeight(value); +void spine_region_attachment_set_height(spine_region_attachment self, float inValue) { + ((RegionAttachment*)self)->setHeight(inValue); } -spine_color spine_region_attachment_get_color(spine_region_attachment obj) { - if (!obj) return (spine_color) 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_region_attachment_get_color(spine_region_attachment self) { + return (spine_color)&((RegionAttachment*)self)->getColor(); } -const char* spine_region_attachment_get_path(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (const char *) _obj->getPath().buffer(); +const char* spine_region_attachment_get_path(spine_region_attachment self) { + return (const char*)&((RegionAttachment*)self)->getPath(); } -void spine_region_attachment_set_path(spine_region_attachment obj, const char* value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setPath(String(value)); +void spine_region_attachment_set_path(spine_region_attachment self, const char* inValue) { + ((RegionAttachment*)self)->setPath(*((const String*)inValue)); } -spine_texture_region spine_region_attachment_get_region(spine_region_attachment obj) { - if (!obj) return (spine_texture_region) 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_texture_region) _obj->getRegion(); +spine_texture_region spine_region_attachment_get_region(spine_region_attachment self) { + return (spine_texture_region)((RegionAttachment*)self)->getRegion(); } -void spine_region_attachment_set_region(spine_region_attachment obj, spine_texture_region value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setRegion((TextureRegion *) value); +void spine_region_attachment_set_region(spine_region_attachment self, spine_texture_region region) { + ((RegionAttachment*)self)->setRegion((TextureRegion *)region); } -spine_sequence spine_region_attachment_get_sequence(spine_region_attachment obj) { - if (!obj) return (spine_sequence) 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_sequence) _obj->getSequence(); +spine_sequence spine_region_attachment_get_sequence(spine_region_attachment self) { + return (spine_sequence)((RegionAttachment*)self)->getSequence(); } -void spine_region_attachment_set_sequence(spine_region_attachment obj, spine_sequence value) { - if (!obj) return; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->setSequence((Sequence *) value); +void spine_region_attachment_set_sequence(spine_region_attachment self, spine_sequence sequence) { + ((RegionAttachment*)self)->setSequence((Sequence *)sequence); } -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_array_float spine_region_attachment_get_offset(spine_region_attachment self) { + return (spine_array_float)&((RegionAttachment*)self)->getOffset(); } -float *spine_region_attachment_get_offset(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (float *) _obj->getOffset().buffer(); +spine_array_float spine_region_attachment_get_u_vs(spine_region_attachment self) { + return (spine_array_float)&((RegionAttachment*)self)->getUVs(); } -int32_t spine_region_attachment_get_num_u_vs(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (int32_t) _obj->getUVs().size(); +spine_attachment spine_region_attachment_copy(spine_region_attachment self) { + return (spine_attachment)((RegionAttachment*)self)->copy(); } -float *spine_region_attachment_get_u_vs(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (float *) _obj->getUVs().buffer(); +const char* spine_region_attachment_get_name(spine_region_attachment self) { + return (const char*)&((Attachment*)(RegionAttachment*)self)->getName(); } -spine_attachment spine_region_attachment_copy(spine_region_attachment obj) { - if (!obj) return (spine_attachment) 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (spine_attachment) _obj->copy(); +int spine_region_attachment_get_ref_count(spine_region_attachment self) { + return ((Attachment*)(RegionAttachment*)self)->getRefCount(); } -const char* spine_region_attachment_get_name(spine_region_attachment obj) { - if (!obj) return nullptr; - RegionAttachment *_obj = (RegionAttachment *) obj; - return (const char *) _obj->getName().buffer(); +void spine_region_attachment_reference(spine_region_attachment self) { + ((Attachment*)(RegionAttachment*)self)->reference(); } -int spine_region_attachment_get_ref_count(spine_region_attachment obj) { - if (!obj) return 0; - RegionAttachment *_obj = (RegionAttachment *) obj; - return _obj->getRefCount(); +void spine_region_attachment_dereference(spine_region_attachment self) { + ((Attachment*)(RegionAttachment*)self)->dereference(); } -void spine_region_attachment_reference(spine_region_attachment obj) { - if (!obj) return ; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->reference(); -} - -void spine_region_attachment_dereference(spine_region_attachment obj) { - if (!obj) return ; - RegionAttachment *_obj = (RegionAttachment *) obj; - _obj->dereference(); +spine_rtti spine_region_attachment_rtti(void) { + return (spine_rtti)&RegionAttachment::rtti; } diff --git a/spine-c-new/src/generated/region_attachment.h b/spine-c-new/src/generated/region_attachment.h index 33dcacf09..d87524b02 100644 --- a/spine-c-new/src/generated/region_attachment.h +++ b/spine-c-new/src/generated/region_attachment.h @@ -1,80 +1,53 @@ -/****************************************************************************** - * 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_SPINE_REGION_ATTACHMENT_H +#define SPINE_SPINE_REGION_ATTACHMENT_H -#ifndef SPINE_C_REGIONATTACHMENT_H -#define SPINE_C_REGIONATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_region_attachment spine_region_attachment_create(const char* 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_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, 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); -SPINE_C_EXPORT void spine_region_attachment_set_y(spine_region_attachment obj, float value); -SPINE_C_EXPORT float spine_region_attachment_get_rotation(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_set_rotation(spine_region_attachment obj, float value); -SPINE_C_EXPORT float spine_region_attachment_get_scale_x(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_set_scale_x(spine_region_attachment obj, float value); -SPINE_C_EXPORT float spine_region_attachment_get_scale_y(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_set_scale_y(spine_region_attachment obj, float value); -SPINE_C_EXPORT float spine_region_attachment_get_width(spine_region_attachment obj); -SPINE_C_EXPORT void spine_region_attachment_set_width(spine_region_attachment obj, float value); -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 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 int32_t spine_region_attachment_get_num_offset(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 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 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); +SPINE_C_API void spine_region_attachment_dispose(spine_region_attachment self); + +SPINE_C_API spine_rtti spine_region_attachment_get_rtti(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_update_region(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_compute_world_vertices_1(spine_region_attachment self, spine_slot slot, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_region_attachment_compute_world_vertices_2(spine_region_attachment self, spine_slot slot, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API float spine_region_attachment_get_x(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_x(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_y(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_y(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_rotation(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_rotation(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_scale_x(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_scale_x(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_scale_y(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_scale_y(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_width(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_width(spine_region_attachment self, float inValue); +SPINE_C_API float spine_region_attachment_get_height(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_height(spine_region_attachment self, float inValue); +SPINE_C_API spine_color spine_region_attachment_get_color(spine_region_attachment self); +SPINE_C_API const char* spine_region_attachment_get_path(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_path(spine_region_attachment self, const char* inValue); +SPINE_C_API spine_texture_region spine_region_attachment_get_region(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_region(spine_region_attachment self, spine_texture_region region); +SPINE_C_API spine_sequence spine_region_attachment_get_sequence(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_set_sequence(spine_region_attachment self, spine_sequence sequence); +SPINE_C_API spine_array_float spine_region_attachment_get_offset(spine_region_attachment self); +SPINE_C_API spine_array_float spine_region_attachment_get_u_vs(spine_region_attachment self); +SPINE_C_API spine_attachment spine_region_attachment_copy(spine_region_attachment self); +SPINE_C_API const char* spine_region_attachment_get_name(spine_region_attachment self); +SPINE_C_API int spine_region_attachment_get_ref_count(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_reference(spine_region_attachment self); +SPINE_C_API void spine_region_attachment_dereference(spine_region_attachment self); +SPINE_C_API spine_rtti spine_region_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_REGIONATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_REGION_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/render_command.cpp b/spine-c-new/src/generated/render_command.cpp index b9f918c9c..bfceac989 100644 --- a/spine-c-new/src/generated/render_command.cpp +++ b/spine-c-new/src/generated/render_command.cpp @@ -1,38 +1,48 @@ -/****************************************************************************** - * 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 "render_command.h" #include using namespace spine; -void spine_render_command_dispose(spine_render_command obj) { - if (!obj) return; - delete (RenderCommand *) obj; +void spine_render_command_dispose(spine_render_command self) { + delete (RenderCommand*)self; +} + +float * spine_render_command_get_positions(spine_render_command self) { + return ((RenderCommand*)self)->positions; +} + +float * spine_render_command_get_uvs(spine_render_command self) { + return ((RenderCommand*)self)->uvs; +} + +uint32_t * spine_render_command_get_colors(spine_render_command self) { + return ((RenderCommand*)self)->colors; +} + +uint32_t * spine_render_command_get_dark_colors(spine_render_command self) { + return ((RenderCommand*)self)->darkColors; +} + +int32_t spine_render_command_get_num_vertices(spine_render_command self) { + return ((RenderCommand*)self)->numVertices; +} + +uint16_t * spine_render_command_get_indices(spine_render_command self) { + return ((RenderCommand*)self)->indices; +} + +int32_t spine_render_command_get_num_indices(spine_render_command self) { + return ((RenderCommand*)self)->numIndices; +} + +spine_blend_mode spine_render_command_get_blend_mode(spine_render_command self) { + return (spine_blend_mode)((RenderCommand*)self)->blendMode; +} + +void * spine_render_command_get_texture(spine_render_command self) { + return ((RenderCommand*)self)->texture; +} + +spine_render_command spine_render_command_get_next(spine_render_command self) { + return (spine_render_command)((RenderCommand*)self)->next; } diff --git a/spine-c-new/src/generated/render_command.h b/spine-c-new/src/generated/render_command.h index 95e3b3a14..3e1056965 100644 --- a/spine-c-new/src/generated/render_command.h +++ b/spine-c-new/src/generated/render_command.h @@ -1,45 +1,28 @@ -/****************************************************************************** - * 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_SPINE_RENDER_COMMAND_H +#define SPINE_SPINE_RENDER_COMMAND_H -#ifndef SPINE_C_RENDERCOMMAND_H -#define SPINE_C_RENDERCOMMAND_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_render_command_dispose(spine_render_command self); -SPINE_C_EXPORT void spine_render_command_dispose(spine_render_command obj); +SPINE_C_API float * spine_render_command_get_positions(spine_render_command self); +SPINE_C_API float * spine_render_command_get_uvs(spine_render_command self); +SPINE_C_API uint32_t * spine_render_command_get_colors(spine_render_command self); +SPINE_C_API uint32_t * spine_render_command_get_dark_colors(spine_render_command self); +SPINE_C_API int32_t spine_render_command_get_num_vertices(spine_render_command self); +SPINE_C_API uint16_t * spine_render_command_get_indices(spine_render_command self); +SPINE_C_API int32_t spine_render_command_get_num_indices(spine_render_command self); +SPINE_C_API spine_blend_mode spine_render_command_get_blend_mode(spine_render_command self); +SPINE_C_API void * spine_render_command_get_texture(spine_render_command self); +SPINE_C_API spine_render_command spine_render_command_get_next(spine_render_command self); #ifdef __cplusplus } #endif -#endif // SPINE_C_RENDERCOMMAND_H \ No newline at end of file +#endif /* SPINE_SPINE_RENDER_COMMAND_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rgb2_timeline.cpp b/spine-c-new/src/generated/rgb2_timeline.cpp index 043287ad0..31472ae82 100644 --- a/spine-c-new/src/generated/rgb2_timeline.cpp +++ b/spine-c-new/src/generated/rgb2_timeline.cpp @@ -1,59 +1,76 @@ -/****************************************************************************** - * 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 "rgb2_timeline.h" #include using namespace spine; 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; + return (spine_rgb2_timeline) new (__FILE__, __LINE__) RGB2Timeline(frameCount, bezierCount, slotIndex); } -void spine_rgb2_timeline_dispose(spine_rgb2_timeline obj) { - if (!obj) return; - delete (RGB2Timeline *) obj; +void spine_rgb2_timeline_dispose(spine_rgb2_timeline self) { + delete (RGB2Timeline*)self; } -spine_rtti spine_rgb2_timeline_get_rtti() { - return (spine_rtti) &RGB2Timeline::rtti; +spine_rtti spine_rgb2_timeline_get_rtti(spine_rgb2_timeline self) { + return (spine_rtti)&((RGB2Timeline*)self)->getRTTI(); } -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_set_frame(spine_rgb2_timeline self, int frame, float time, float r, float g, float b, float r2, float g2, float b2) { + ((RGB2Timeline*)self)->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, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_rgb2_timeline_apply(spine_rgb2_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)(RGB2Timeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); +} + +void spine_rgb2_timeline_set_linear(spine_rgb2_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGB2Timeline*)self)->setLinear(frame); +} + +void spine_rgb2_timeline_set_stepped(spine_rgb2_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGB2Timeline*)self)->setStepped(frame); +} + +void spine_rgb2_timeline_set_bezier(spine_rgb2_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((SlotCurveTimeline*)(RGB2Timeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_rgb2_timeline_get_bezier_value(spine_rgb2_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((SlotCurveTimeline*)(RGB2Timeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_rgb2_timeline_get_curves(spine_rgb2_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGB2Timeline*)self)->getCurves(); +} + +size_t spine_rgb2_timeline_get_frame_entries(spine_rgb2_timeline self) { + return ((SlotCurveTimeline*)(RGB2Timeline*)self)->getFrameEntries(); +} + +size_t spine_rgb2_timeline_get_frame_count(spine_rgb2_timeline self) { + return ((SlotCurveTimeline*)(RGB2Timeline*)self)->getFrameCount(); +} + +spine_array_float spine_rgb2_timeline_get_frames(spine_rgb2_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGB2Timeline*)self)->getFrames(); +} + +float spine_rgb2_timeline_get_duration(spine_rgb2_timeline self) { + return ((SlotCurveTimeline*)(RGB2Timeline*)self)->getDuration(); +} + +spine_array_property_id spine_rgb2_timeline_get_property_ids(spine_rgb2_timeline self) { + return (spine_array_property_id)&((SlotCurveTimeline*)(RGB2Timeline*)self)->getPropertyIds(); +} + +int spine_rgb2_timeline_get_slot_index(spine_rgb2_timeline self) { + return ((SlotCurveTimeline*)(RGB2Timeline*)self)->getSlotIndex(); +} + +void spine_rgb2_timeline_set_slot_index(spine_rgb2_timeline self, int inValue) { + ((SlotCurveTimeline*)(RGB2Timeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_rgb2_timeline_rtti(void) { + return (spine_rtti)&RGB2Timeline::rtti; } diff --git a/spine-c-new/src/generated/rgb2_timeline.h b/spine-c-new/src/generated/rgb2_timeline.h index b0562cff6..ab0c4af6f 100644 --- a/spine-c-new/src/generated/rgb2_timeline.h +++ b/spine-c-new/src/generated/rgb2_timeline.h @@ -1,49 +1,36 @@ -/****************************************************************************** - * 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_SPINE_RGB2_TIMELINE_H +#define SPINE_SPINE_RGB2_TIMELINE_H -#ifndef SPINE_C_RGB2TIMELINE_H -#define SPINE_C_RGB2TIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_rgb2_timeline spine_rgb2_timeline_create(size_t frameCount, size_t bezierCount, int 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_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); +SPINE_C_API void spine_rgb2_timeline_dispose(spine_rgb2_timeline self); + +SPINE_C_API spine_rtti spine_rgb2_timeline_get_rtti(spine_rgb2_timeline self); +SPINE_C_API void spine_rgb2_timeline_set_frame(spine_rgb2_timeline self, int frame, float time, float r, float g, float b, float r2, float g2, float b2); +SPINE_C_API void spine_rgb2_timeline_apply(spine_rgb2_timeline self, 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_API void spine_rgb2_timeline_set_linear(spine_rgb2_timeline self, size_t frame); +SPINE_C_API void spine_rgb2_timeline_set_stepped(spine_rgb2_timeline self, size_t frame); +SPINE_C_API void spine_rgb2_timeline_set_bezier(spine_rgb2_timeline self, 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_API float spine_rgb2_timeline_get_bezier_value(spine_rgb2_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_rgb2_timeline_get_curves(spine_rgb2_timeline self); +SPINE_C_API size_t spine_rgb2_timeline_get_frame_entries(spine_rgb2_timeline self); +SPINE_C_API size_t spine_rgb2_timeline_get_frame_count(spine_rgb2_timeline self); +SPINE_C_API spine_array_float spine_rgb2_timeline_get_frames(spine_rgb2_timeline self); +SPINE_C_API float spine_rgb2_timeline_get_duration(spine_rgb2_timeline self); +SPINE_C_API spine_array_property_id spine_rgb2_timeline_get_property_ids(spine_rgb2_timeline self); +SPINE_C_API int spine_rgb2_timeline_get_slot_index(spine_rgb2_timeline self); +SPINE_C_API void spine_rgb2_timeline_set_slot_index(spine_rgb2_timeline self, int inValue); +SPINE_C_API spine_rtti spine_rgb2_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_RGB2TIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_RGB2_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rgb_timeline.cpp b/spine-c-new/src/generated/rgb_timeline.cpp index c17acc149..baba70dda 100644 --- a/spine-c-new/src/generated/rgb_timeline.cpp +++ b/spine-c-new/src/generated/rgb_timeline.cpp @@ -1,59 +1,76 @@ -/****************************************************************************** - * 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 "rgb_timeline.h" #include using namespace spine; 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; + return (spine_rgb_timeline) new (__FILE__, __LINE__) RGBTimeline(frameCount, bezierCount, slotIndex); } -void spine_rgb_timeline_dispose(spine_rgb_timeline obj) { - if (!obj) return; - delete (RGBTimeline *) obj; +void spine_rgb_timeline_dispose(spine_rgb_timeline self) { + delete (RGBTimeline*)self; } -spine_rtti spine_rgb_timeline_get_rtti() { - return (spine_rtti) &RGBTimeline::rtti; +spine_rtti spine_rgb_timeline_get_rtti(spine_rgb_timeline self) { + return (spine_rtti)&((RGBTimeline*)self)->getRTTI(); } -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_set_frame(spine_rgb_timeline self, int frame, float time, float r, float g, float b) { + ((RGBTimeline*)self)->setFrame(frame, time, r, g, b); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_rgb_timeline_apply(spine_rgb_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)(RGBTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); +} + +void spine_rgb_timeline_set_linear(spine_rgb_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBTimeline*)self)->setLinear(frame); +} + +void spine_rgb_timeline_set_stepped(spine_rgb_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBTimeline*)self)->setStepped(frame); +} + +void spine_rgb_timeline_set_bezier(spine_rgb_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((SlotCurveTimeline*)(RGBTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_rgb_timeline_get_bezier_value(spine_rgb_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((SlotCurveTimeline*)(RGBTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_rgb_timeline_get_curves(spine_rgb_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBTimeline*)self)->getCurves(); +} + +size_t spine_rgb_timeline_get_frame_entries(spine_rgb_timeline self) { + return ((SlotCurveTimeline*)(RGBTimeline*)self)->getFrameEntries(); +} + +size_t spine_rgb_timeline_get_frame_count(spine_rgb_timeline self) { + return ((SlotCurveTimeline*)(RGBTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_rgb_timeline_get_frames(spine_rgb_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBTimeline*)self)->getFrames(); +} + +float spine_rgb_timeline_get_duration(spine_rgb_timeline self) { + return ((SlotCurveTimeline*)(RGBTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_rgb_timeline_get_property_ids(spine_rgb_timeline self) { + return (spine_array_property_id)&((SlotCurveTimeline*)(RGBTimeline*)self)->getPropertyIds(); +} + +int spine_rgb_timeline_get_slot_index(spine_rgb_timeline self) { + return ((SlotCurveTimeline*)(RGBTimeline*)self)->getSlotIndex(); +} + +void spine_rgb_timeline_set_slot_index(spine_rgb_timeline self, int inValue) { + ((SlotCurveTimeline*)(RGBTimeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_rgb_timeline_rtti(void) { + return (spine_rtti)&RGBTimeline::rtti; } diff --git a/spine-c-new/src/generated/rgb_timeline.h b/spine-c-new/src/generated/rgb_timeline.h index 5f3a520b5..b2deda910 100644 --- a/spine-c-new/src/generated/rgb_timeline.h +++ b/spine-c-new/src/generated/rgb_timeline.h @@ -1,49 +1,36 @@ -/****************************************************************************** - * 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_SPINE_RGB_TIMELINE_H +#define SPINE_SPINE_RGB_TIMELINE_H -#ifndef SPINE_C_RGBTIMELINE_H -#define SPINE_C_RGBTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_rgb_timeline spine_rgb_timeline_create(size_t frameCount, size_t bezierCount, int 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_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); +SPINE_C_API void spine_rgb_timeline_dispose(spine_rgb_timeline self); + +SPINE_C_API spine_rtti spine_rgb_timeline_get_rtti(spine_rgb_timeline self); +SPINE_C_API void spine_rgb_timeline_set_frame(spine_rgb_timeline self, int frame, float time, float r, float g, float b); +SPINE_C_API void spine_rgb_timeline_apply(spine_rgb_timeline self, 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_API void spine_rgb_timeline_set_linear(spine_rgb_timeline self, size_t frame); +SPINE_C_API void spine_rgb_timeline_set_stepped(spine_rgb_timeline self, size_t frame); +SPINE_C_API void spine_rgb_timeline_set_bezier(spine_rgb_timeline self, 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_API float spine_rgb_timeline_get_bezier_value(spine_rgb_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_rgb_timeline_get_curves(spine_rgb_timeline self); +SPINE_C_API size_t spine_rgb_timeline_get_frame_entries(spine_rgb_timeline self); +SPINE_C_API size_t spine_rgb_timeline_get_frame_count(spine_rgb_timeline self); +SPINE_C_API spine_array_float spine_rgb_timeline_get_frames(spine_rgb_timeline self); +SPINE_C_API float spine_rgb_timeline_get_duration(spine_rgb_timeline self); +SPINE_C_API spine_array_property_id spine_rgb_timeline_get_property_ids(spine_rgb_timeline self); +SPINE_C_API int spine_rgb_timeline_get_slot_index(spine_rgb_timeline self); +SPINE_C_API void spine_rgb_timeline_set_slot_index(spine_rgb_timeline self, int inValue); +SPINE_C_API spine_rtti spine_rgb_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_RGBTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_RGB_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rgba2_timeline.cpp b/spine-c-new/src/generated/rgba2_timeline.cpp index 0abcd0cd6..0a1e3ea28 100644 --- a/spine-c-new/src/generated/rgba2_timeline.cpp +++ b/spine-c-new/src/generated/rgba2_timeline.cpp @@ -1,59 +1,76 @@ -/****************************************************************************** - * 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 "rgba2_timeline.h" #include using namespace spine; 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; + return (spine_rgba2_timeline) new (__FILE__, __LINE__) RGBA2Timeline(frameCount, bezierCount, slotIndex); } -void spine_rgba2_timeline_dispose(spine_rgba2_timeline obj) { - if (!obj) return; - delete (RGBA2Timeline *) obj; +void spine_rgba2_timeline_dispose(spine_rgba2_timeline self) { + delete (RGBA2Timeline*)self; } -spine_rtti spine_rgba2_timeline_get_rtti() { - return (spine_rtti) &RGBA2Timeline::rtti; +spine_rtti spine_rgba2_timeline_get_rtti(spine_rgba2_timeline self) { + return (spine_rtti)&((RGBA2Timeline*)self)->getRTTI(); } -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_set_frame(spine_rgba2_timeline self, int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2) { + ((RGBA2Timeline*)self)->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, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_rgba2_timeline_apply(spine_rgba2_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)(RGBA2Timeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); +} + +void spine_rgba2_timeline_set_linear(spine_rgba2_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBA2Timeline*)self)->setLinear(frame); +} + +void spine_rgba2_timeline_set_stepped(spine_rgba2_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBA2Timeline*)self)->setStepped(frame); +} + +void spine_rgba2_timeline_set_bezier(spine_rgba2_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((SlotCurveTimeline*)(RGBA2Timeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_rgba2_timeline_get_bezier_value(spine_rgba2_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((SlotCurveTimeline*)(RGBA2Timeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_rgba2_timeline_get_curves(spine_rgba2_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBA2Timeline*)self)->getCurves(); +} + +size_t spine_rgba2_timeline_get_frame_entries(spine_rgba2_timeline self) { + return ((SlotCurveTimeline*)(RGBA2Timeline*)self)->getFrameEntries(); +} + +size_t spine_rgba2_timeline_get_frame_count(spine_rgba2_timeline self) { + return ((SlotCurveTimeline*)(RGBA2Timeline*)self)->getFrameCount(); +} + +spine_array_float spine_rgba2_timeline_get_frames(spine_rgba2_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBA2Timeline*)self)->getFrames(); +} + +float spine_rgba2_timeline_get_duration(spine_rgba2_timeline self) { + return ((SlotCurveTimeline*)(RGBA2Timeline*)self)->getDuration(); +} + +spine_array_property_id spine_rgba2_timeline_get_property_ids(spine_rgba2_timeline self) { + return (spine_array_property_id)&((SlotCurveTimeline*)(RGBA2Timeline*)self)->getPropertyIds(); +} + +int spine_rgba2_timeline_get_slot_index(spine_rgba2_timeline self) { + return ((SlotCurveTimeline*)(RGBA2Timeline*)self)->getSlotIndex(); +} + +void spine_rgba2_timeline_set_slot_index(spine_rgba2_timeline self, int inValue) { + ((SlotCurveTimeline*)(RGBA2Timeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_rgba2_timeline_rtti(void) { + return (spine_rtti)&RGBA2Timeline::rtti; } diff --git a/spine-c-new/src/generated/rgba2_timeline.h b/spine-c-new/src/generated/rgba2_timeline.h index 6b6249a03..d72e7fcea 100644 --- a/spine-c-new/src/generated/rgba2_timeline.h +++ b/spine-c-new/src/generated/rgba2_timeline.h @@ -1,49 +1,36 @@ -/****************************************************************************** - * 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_SPINE_RGBA2_TIMELINE_H +#define SPINE_SPINE_RGBA2_TIMELINE_H -#ifndef SPINE_C_RGBA2TIMELINE_H -#define SPINE_C_RGBA2TIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_rgba2_timeline spine_rgba2_timeline_create(size_t frameCount, size_t bezierCount, int 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_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); +SPINE_C_API void spine_rgba2_timeline_dispose(spine_rgba2_timeline self); + +SPINE_C_API spine_rtti spine_rgba2_timeline_get_rtti(spine_rgba2_timeline self); +SPINE_C_API void spine_rgba2_timeline_set_frame(spine_rgba2_timeline self, int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2); +SPINE_C_API void spine_rgba2_timeline_apply(spine_rgba2_timeline self, 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_API void spine_rgba2_timeline_set_linear(spine_rgba2_timeline self, size_t frame); +SPINE_C_API void spine_rgba2_timeline_set_stepped(spine_rgba2_timeline self, size_t frame); +SPINE_C_API void spine_rgba2_timeline_set_bezier(spine_rgba2_timeline self, 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_API float spine_rgba2_timeline_get_bezier_value(spine_rgba2_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_rgba2_timeline_get_curves(spine_rgba2_timeline self); +SPINE_C_API size_t spine_rgba2_timeline_get_frame_entries(spine_rgba2_timeline self); +SPINE_C_API size_t spine_rgba2_timeline_get_frame_count(spine_rgba2_timeline self); +SPINE_C_API spine_array_float spine_rgba2_timeline_get_frames(spine_rgba2_timeline self); +SPINE_C_API float spine_rgba2_timeline_get_duration(spine_rgba2_timeline self); +SPINE_C_API spine_array_property_id spine_rgba2_timeline_get_property_ids(spine_rgba2_timeline self); +SPINE_C_API int spine_rgba2_timeline_get_slot_index(spine_rgba2_timeline self); +SPINE_C_API void spine_rgba2_timeline_set_slot_index(spine_rgba2_timeline self, int inValue); +SPINE_C_API spine_rtti spine_rgba2_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_RGBA2TIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_RGBA2_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rgba_timeline.cpp b/spine-c-new/src/generated/rgba_timeline.cpp index 7f38c1cc4..780c6d37b 100644 --- a/spine-c-new/src/generated/rgba_timeline.cpp +++ b/spine-c-new/src/generated/rgba_timeline.cpp @@ -1,59 +1,76 @@ -/****************************************************************************** - * 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 "rgba_timeline.h" #include using namespace spine; 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; + return (spine_rgba_timeline) new (__FILE__, __LINE__) RGBATimeline(frameCount, bezierCount, slotIndex); } -void spine_rgba_timeline_dispose(spine_rgba_timeline obj) { - if (!obj) return; - delete (RGBATimeline *) obj; +void spine_rgba_timeline_dispose(spine_rgba_timeline self) { + delete (RGBATimeline*)self; } -spine_rtti spine_rgba_timeline_get_rtti() { - return (spine_rtti) &RGBATimeline::rtti; +spine_rtti spine_rgba_timeline_get_rtti(spine_rgba_timeline self) { + return (spine_rtti)&((RGBATimeline*)self)->getRTTI(); } -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_set_frame(spine_rgba_timeline self, int frame, float time, float r, float g, float b, float a) { + ((RGBATimeline*)self)->setFrame(frame, time, r, g, b, a); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_rgba_timeline_apply(spine_rgba_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)(RGBATimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); +} + +void spine_rgba_timeline_set_linear(spine_rgba_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBATimeline*)self)->setLinear(frame); +} + +void spine_rgba_timeline_set_stepped(spine_rgba_timeline self, size_t frame) { + ((SlotCurveTimeline*)(RGBATimeline*)self)->setStepped(frame); +} + +void spine_rgba_timeline_set_bezier(spine_rgba_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((SlotCurveTimeline*)(RGBATimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_rgba_timeline_get_bezier_value(spine_rgba_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((SlotCurveTimeline*)(RGBATimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_rgba_timeline_get_curves(spine_rgba_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBATimeline*)self)->getCurves(); +} + +size_t spine_rgba_timeline_get_frame_entries(spine_rgba_timeline self) { + return ((SlotCurveTimeline*)(RGBATimeline*)self)->getFrameEntries(); +} + +size_t spine_rgba_timeline_get_frame_count(spine_rgba_timeline self) { + return ((SlotCurveTimeline*)(RGBATimeline*)self)->getFrameCount(); +} + +spine_array_float spine_rgba_timeline_get_frames(spine_rgba_timeline self) { + return (spine_array_float)&((SlotCurveTimeline*)(RGBATimeline*)self)->getFrames(); +} + +float spine_rgba_timeline_get_duration(spine_rgba_timeline self) { + return ((SlotCurveTimeline*)(RGBATimeline*)self)->getDuration(); +} + +spine_array_property_id spine_rgba_timeline_get_property_ids(spine_rgba_timeline self) { + return (spine_array_property_id)&((SlotCurveTimeline*)(RGBATimeline*)self)->getPropertyIds(); +} + +int spine_rgba_timeline_get_slot_index(spine_rgba_timeline self) { + return ((SlotCurveTimeline*)(RGBATimeline*)self)->getSlotIndex(); +} + +void spine_rgba_timeline_set_slot_index(spine_rgba_timeline self, int inValue) { + ((SlotCurveTimeline*)(RGBATimeline*)self)->setSlotIndex(inValue); +} + +spine_rtti spine_rgba_timeline_rtti(void) { + return (spine_rtti)&RGBATimeline::rtti; } diff --git a/spine-c-new/src/generated/rgba_timeline.h b/spine-c-new/src/generated/rgba_timeline.h index 529a81dbb..64e9548a0 100644 --- a/spine-c-new/src/generated/rgba_timeline.h +++ b/spine-c-new/src/generated/rgba_timeline.h @@ -1,49 +1,36 @@ -/****************************************************************************** - * 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_SPINE_RGBA_TIMELINE_H +#define SPINE_SPINE_RGBA_TIMELINE_H -#ifndef SPINE_C_RGBATIMELINE_H -#define SPINE_C_RGBATIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_rgba_timeline spine_rgba_timeline_create(size_t frameCount, size_t bezierCount, int 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_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); +SPINE_C_API void spine_rgba_timeline_dispose(spine_rgba_timeline self); + +SPINE_C_API spine_rtti spine_rgba_timeline_get_rtti(spine_rgba_timeline self); +SPINE_C_API void spine_rgba_timeline_set_frame(spine_rgba_timeline self, int frame, float time, float r, float g, float b, float a); +SPINE_C_API void spine_rgba_timeline_apply(spine_rgba_timeline self, 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_API void spine_rgba_timeline_set_linear(spine_rgba_timeline self, size_t frame); +SPINE_C_API void spine_rgba_timeline_set_stepped(spine_rgba_timeline self, size_t frame); +SPINE_C_API void spine_rgba_timeline_set_bezier(spine_rgba_timeline self, 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_API float spine_rgba_timeline_get_bezier_value(spine_rgba_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_rgba_timeline_get_curves(spine_rgba_timeline self); +SPINE_C_API size_t spine_rgba_timeline_get_frame_entries(spine_rgba_timeline self); +SPINE_C_API size_t spine_rgba_timeline_get_frame_count(spine_rgba_timeline self); +SPINE_C_API spine_array_float spine_rgba_timeline_get_frames(spine_rgba_timeline self); +SPINE_C_API float spine_rgba_timeline_get_duration(spine_rgba_timeline self); +SPINE_C_API spine_array_property_id spine_rgba_timeline_get_property_ids(spine_rgba_timeline self); +SPINE_C_API int spine_rgba_timeline_get_slot_index(spine_rgba_timeline self); +SPINE_C_API void spine_rgba_timeline_set_slot_index(spine_rgba_timeline self, int inValue); +SPINE_C_API spine_rtti spine_rgba_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_RGBATIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_RGBA_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rotate_mode.h b/spine-c-new/src/generated/rotate_mode.h index 6db197d04..f85c80f26 100644 --- a/spine-c-new/src/generated/rotate_mode.h +++ b/spine-c-new/src/generated/rotate_mode.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_ROTATEMODE_H -#define SPINE_C_ROTATEMODE_H - -#include "../base.h" +#ifndef SPINE_SPINE_ROTATE_MODE_H +#define SPINE_SPINE_ROTATE_MODE_H #ifdef __cplusplus extern "C" { @@ -46,4 +15,4 @@ typedef enum spine_rotate_mode { } #endif -#endif // SPINE_C_ROTATEMODE_H \ No newline at end of file +#endif /* SPINE_SPINE_ROTATE_MODE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rotate_timeline.cpp b/spine-c-new/src/generated/rotate_timeline.cpp index c6f79f4bf..408773251 100644 --- a/spine-c-new/src/generated/rotate_timeline.cpp +++ b/spine-c-new/src/generated/rotate_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "rotate_timeline.h" #include using namespace spine; 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; + return (spine_rotate_timeline) new (__FILE__, __LINE__) RotateTimeline(frameCount, bezierCount, boneIndex); } -void spine_rotate_timeline_dispose(spine_rotate_timeline obj) { - if (!obj) return; - delete (RotateTimeline *) obj; +void spine_rotate_timeline_dispose(spine_rotate_timeline self) { + delete (RotateTimeline*)self; } -spine_rtti spine_rotate_timeline_get_rtti() { - return (spine_rtti) &RotateTimeline::rtti; +spine_rtti spine_rotate_timeline_get_rtti(spine_rotate_timeline self) { + return (spine_rtti)&((RotateTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_rotate_timeline_apply(spine_rotate_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(RotateTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_rotate_timeline_set_frame(spine_rotate_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(RotateTimeline*)self)->setFrame(frame, time, value); } -float spine_rotate_timeline_get_curve_value(spine_rotate_timeline obj, float time) { - if (!obj) return 0; - RotateTimeline *_obj = (RotateTimeline *) obj; - return _obj->getCurveValue(time); +float spine_rotate_timeline_get_curve_value(spine_rotate_timeline self, float time) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_rotate_timeline_get_relative_value(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(RotateTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_rotate_timeline_get_absolute_value_1(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_rotate_timeline_get_absolute_value_2(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(RotateTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_rotate_timeline_get_scale_value(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_rotate_timeline self, size_t frame) { + ((BoneTimeline1*)(RotateTimeline*)self)->setLinear(frame); } -void spine_rotate_timeline_set_bone_index(spine_rotate_timeline obj, int value) { - if (!obj) return; - RotateTimeline *_obj = (RotateTimeline *) obj; - _obj->setBoneIndex(value); +void spine_rotate_timeline_set_stepped(spine_rotate_timeline self, size_t frame) { + ((BoneTimeline1*)(RotateTimeline*)self)->setStepped(frame); +} + +void spine_rotate_timeline_set_bezier(spine_rotate_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(RotateTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_rotate_timeline_get_bezier_value(spine_rotate_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_rotate_timeline_get_curves(spine_rotate_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(RotateTimeline*)self)->getCurves(); +} + +size_t spine_rotate_timeline_get_frame_entries(spine_rotate_timeline self) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getFrameEntries(); +} + +size_t spine_rotate_timeline_get_frame_count(spine_rotate_timeline self) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_rotate_timeline_get_frames(spine_rotate_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(RotateTimeline*)self)->getFrames(); +} + +float spine_rotate_timeline_get_duration(spine_rotate_timeline self) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_rotate_timeline_get_property_ids(spine_rotate_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(RotateTimeline*)self)->getPropertyIds(); +} + +int spine_rotate_timeline_get_bone_index(spine_rotate_timeline self) { + return ((BoneTimeline1*)(RotateTimeline*)self)->getBoneIndex(); +} + +void spine_rotate_timeline_set_bone_index(spine_rotate_timeline self, int inValue) { + ((BoneTimeline1*)(RotateTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_rotate_timeline_rtti(void) { + return (spine_rtti)&RotateTimeline::rtti; } diff --git a/spine-c-new/src/generated/rotate_timeline.h b/spine-c-new/src/generated/rotate_timeline.h index 0ba6d8a15..b0b6e15fd 100644 --- a/spine-c-new/src/generated/rotate_timeline.h +++ b/spine-c-new/src/generated/rotate_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_ROTATE_TIMELINE_H +#define SPINE_SPINE_ROTATE_TIMELINE_H -#ifndef SPINE_C_ROTATETIMELINE_H -#define SPINE_C_ROTATETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_rotate_timeline spine_rotate_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_rotate_timeline_dispose(spine_rotate_timeline self); + +SPINE_C_API spine_rtti spine_rotate_timeline_get_rtti(spine_rotate_timeline self); +SPINE_C_API void spine_rotate_timeline_apply(spine_rotate_timeline self, 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_API void spine_rotate_timeline_set_frame(spine_rotate_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_rotate_timeline_get_curve_value(spine_rotate_timeline self, float time); +SPINE_C_API float spine_rotate_timeline_get_relative_value(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_rotate_timeline_get_absolute_value_1(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_rotate_timeline_get_absolute_value_2(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_rotate_timeline_get_scale_value(spine_rotate_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_rotate_timeline_set_linear(spine_rotate_timeline self, size_t frame); +SPINE_C_API void spine_rotate_timeline_set_stepped(spine_rotate_timeline self, size_t frame); +SPINE_C_API void spine_rotate_timeline_set_bezier(spine_rotate_timeline self, 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_API float spine_rotate_timeline_get_bezier_value(spine_rotate_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_rotate_timeline_get_curves(spine_rotate_timeline self); +SPINE_C_API size_t spine_rotate_timeline_get_frame_entries(spine_rotate_timeline self); +SPINE_C_API size_t spine_rotate_timeline_get_frame_count(spine_rotate_timeline self); +SPINE_C_API spine_array_float spine_rotate_timeline_get_frames(spine_rotate_timeline self); +SPINE_C_API float spine_rotate_timeline_get_duration(spine_rotate_timeline self); +SPINE_C_API spine_array_property_id spine_rotate_timeline_get_property_ids(spine_rotate_timeline self); +SPINE_C_API int spine_rotate_timeline_get_bone_index(spine_rotate_timeline self); +SPINE_C_API void spine_rotate_timeline_set_bone_index(spine_rotate_timeline self, int inValue); +SPINE_C_API spine_rtti spine_rotate_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_ROTATETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_ROTATE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/rtti.cpp b/spine-c-new/src/generated/rtti.cpp index b7018bbd2..b468b9d89 100644 --- a/spine-c-new/src/generated/rtti.cpp +++ b/spine-c-new/src/generated/rtti.cpp @@ -1,71 +1,20 @@ -/****************************************************************************** - * 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 "rtti.h" #include using namespace spine; -spine_rtti spine_rtti_create(const char * className) { - RTTI *obj = new (__FILE__, __LINE__) RTTI((const char *) className); - return (spine_rtti) obj; +void spine_rtti_dispose(spine_rtti self) { + delete (RTTI*)self; } -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; +const char * spine_rtti_get_class_name(spine_rtti self) { + return ((RTTI*)self)->getClassName(); } -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; +bool spine_rtti_is_exactly(spine_rtti self, spine_rtti rtti) { + return ((RTTI*)self)->isExactly(*((const RTTI*)rtti)); } -void spine_rtti_dispose(spine_rtti obj) { - if (!obj) return; - delete (RTTI *) obj; -} - -const char * spine_rtti_get_class_name(spine_rtti obj) { - if (!obj) return nullptr; - RTTI *_obj = (RTTI *) obj; - return (const char *) _obj->getClassName(); -} - -bool spine_rtti_is_exactly(spine_rtti obj, spine_rtti rtti) { - if (!obj) return false; - RTTI *_obj = (RTTI *) obj; - return _obj->isExactly(*(RTTI*) rtti); -} - -bool spine_rtti_instance_of(spine_rtti obj, spine_rtti rtti) { - if (!obj) return false; - RTTI *_obj = (RTTI *) obj; - return _obj->instanceOf(*(RTTI*) rtti); +bool spine_rtti_instance_of(spine_rtti self, spine_rtti rtti) { + return ((RTTI*)self)->instanceOf(*((const RTTI*)rtti)); } diff --git a/spine-c-new/src/generated/rtti.h b/spine-c-new/src/generated/rtti.h index 38968284d..6bb29a008 100644 --- a/spine-c-new/src/generated/rtti.h +++ b/spine-c-new/src/generated/rtti.h @@ -1,51 +1,21 @@ -/****************************************************************************** - * 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_SPINE_RTTI_H +#define SPINE_SPINE_RTTI_H -#ifndef SPINE_C_RTTI_H -#define SPINE_C_RTTI_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_rtti_dispose(spine_rtti self); -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 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); +SPINE_C_API const char * spine_rtti_get_class_name(spine_rtti self); +SPINE_C_API bool spine_rtti_is_exactly(spine_rtti self, spine_rtti rtti); +SPINE_C_API bool spine_rtti_instance_of(spine_rtti self, spine_rtti rtti); #ifdef __cplusplus } #endif -#endif // SPINE_C_RTTI_H \ No newline at end of file +#endif /* SPINE_SPINE_RTTI_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/scale_timeline.cpp b/spine-c-new/src/generated/scale_timeline.cpp index e35f0cad7..878b4e002 100644 --- a/spine-c-new/src/generated/scale_timeline.cpp +++ b/spine-c-new/src/generated/scale_timeline.cpp @@ -1,77 +1,80 @@ -/****************************************************************************** - * 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 "scale_timeline.h" #include using namespace spine; 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; + return (spine_scale_timeline) new (__FILE__, __LINE__) ScaleTimeline(frameCount, bezierCount, boneIndex); } -void spine_scale_timeline_dispose(spine_scale_timeline obj) { - if (!obj) return; - delete (ScaleTimeline *) obj; +void spine_scale_timeline_dispose(spine_scale_timeline self) { + delete (ScaleTimeline*)self; } -spine_rtti spine_scale_timeline_get_rtti() { - return (spine_rtti) &ScaleTimeline::rtti; +spine_rtti spine_scale_timeline_get_rtti(spine_scale_timeline self) { + return (spine_rtti)&((ScaleTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_scale_timeline_apply(spine_scale_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline2*)(ScaleTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_scale_timeline_set_frame(spine_scale_timeline self, size_t frame, float time, float value1, float value2) { + ((BoneTimeline2*)(ScaleTimeline*)self)->setFrame(frame, time, value1, value2); } -float spine_scale_timeline_get_curve_value(spine_scale_timeline obj, float time) { - if (!obj) return 0; - ScaleTimeline *_obj = (ScaleTimeline *) obj; - return _obj->getCurveValue(time); +float spine_scale_timeline_get_curve_value(spine_scale_timeline self, float time) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getCurveValue(time); } -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_linear(spine_scale_timeline self, size_t frame) { + ((BoneTimeline2*)(ScaleTimeline*)self)->setLinear(frame); } -void spine_scale_timeline_set_bone_index(spine_scale_timeline obj, int value) { - if (!obj) return; - ScaleTimeline *_obj = (ScaleTimeline *) obj; - _obj->setBoneIndex(value); +void spine_scale_timeline_set_stepped(spine_scale_timeline self, size_t frame) { + ((BoneTimeline2*)(ScaleTimeline*)self)->setStepped(frame); +} + +void spine_scale_timeline_set_bezier(spine_scale_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline2*)(ScaleTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_scale_timeline_get_bezier_value(spine_scale_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_scale_timeline_get_curves(spine_scale_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(ScaleTimeline*)self)->getCurves(); +} + +size_t spine_scale_timeline_get_frame_entries(spine_scale_timeline self) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getFrameEntries(); +} + +size_t spine_scale_timeline_get_frame_count(spine_scale_timeline self) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_scale_timeline_get_frames(spine_scale_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(ScaleTimeline*)self)->getFrames(); +} + +float spine_scale_timeline_get_duration(spine_scale_timeline self) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_scale_timeline_get_property_ids(spine_scale_timeline self) { + return (spine_array_property_id)&((BoneTimeline2*)(ScaleTimeline*)self)->getPropertyIds(); +} + +int spine_scale_timeline_get_bone_index(spine_scale_timeline self) { + return ((BoneTimeline2*)(ScaleTimeline*)self)->getBoneIndex(); +} + +void spine_scale_timeline_set_bone_index(spine_scale_timeline self, int inValue) { + ((BoneTimeline2*)(ScaleTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_scale_timeline_rtti(void) { + return (spine_rtti)&ScaleTimeline::rtti; } diff --git a/spine-c-new/src/generated/scale_timeline.h b/spine-c-new/src/generated/scale_timeline.h index 4a8aff0ab..d7f2de6bc 100644 --- a/spine-c-new/src/generated/scale_timeline.h +++ b/spine-c-new/src/generated/scale_timeline.h @@ -1,52 +1,37 @@ -/****************************************************************************** - * 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_SPINE_SCALE_TIMELINE_H +#define SPINE_SPINE_SCALE_TIMELINE_H -#ifndef SPINE_C_SCALETIMELINE_H -#define SPINE_C_SCALETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_scale_timeline spine_scale_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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); +SPINE_C_API void spine_scale_timeline_dispose(spine_scale_timeline self); + +SPINE_C_API spine_rtti spine_scale_timeline_get_rtti(spine_scale_timeline self); +SPINE_C_API void spine_scale_timeline_apply(spine_scale_timeline self, 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_API void spine_scale_timeline_set_frame(spine_scale_timeline self, size_t frame, float time, float value1, float value2); +SPINE_C_API float spine_scale_timeline_get_curve_value(spine_scale_timeline self, float time); +SPINE_C_API void spine_scale_timeline_set_linear(spine_scale_timeline self, size_t frame); +SPINE_C_API void spine_scale_timeline_set_stepped(spine_scale_timeline self, size_t frame); +SPINE_C_API void spine_scale_timeline_set_bezier(spine_scale_timeline self, 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_API float spine_scale_timeline_get_bezier_value(spine_scale_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_scale_timeline_get_curves(spine_scale_timeline self); +SPINE_C_API size_t spine_scale_timeline_get_frame_entries(spine_scale_timeline self); +SPINE_C_API size_t spine_scale_timeline_get_frame_count(spine_scale_timeline self); +SPINE_C_API spine_array_float spine_scale_timeline_get_frames(spine_scale_timeline self); +SPINE_C_API float spine_scale_timeline_get_duration(spine_scale_timeline self); +SPINE_C_API spine_array_property_id spine_scale_timeline_get_property_ids(spine_scale_timeline self); +SPINE_C_API int spine_scale_timeline_get_bone_index(spine_scale_timeline self); +SPINE_C_API void spine_scale_timeline_set_bone_index(spine_scale_timeline self, int inValue); +SPINE_C_API spine_rtti spine_scale_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SCALETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SCALE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/scale_x_timeline.cpp b/spine-c-new/src/generated/scale_x_timeline.cpp index 222568204..1deb86f44 100644 --- a/spine-c-new/src/generated/scale_x_timeline.cpp +++ b/spine-c-new/src/generated/scale_x_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "scale_x_timeline.h" #include using namespace spine; 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; + return (spine_scale_x_timeline) new (__FILE__, __LINE__) ScaleXTimeline(frameCount, bezierCount, boneIndex); } -void spine_scale_x_timeline_dispose(spine_scale_x_timeline obj) { - if (!obj) return; - delete (ScaleXTimeline *) obj; +void spine_scale_x_timeline_dispose(spine_scale_x_timeline self) { + delete (ScaleXTimeline*)self; } -spine_rtti spine_scale_x_timeline_get_rtti() { - return (spine_rtti) &ScaleXTimeline::rtti; +spine_rtti spine_scale_x_timeline_get_rtti(spine_scale_x_timeline self) { + return (spine_rtti)&((ScaleXTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_scale_x_timeline_apply(spine_scale_x_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_scale_x_timeline_set_frame(spine_scale_x_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->setFrame(frame, time, value); } -float spine_scale_x_timeline_get_curve_value(spine_scale_x_timeline obj, float time) { - if (!obj) return 0; - ScaleXTimeline *_obj = (ScaleXTimeline *) obj; - return _obj->getCurveValue(time); +float spine_scale_x_timeline_get_curve_value(spine_scale_x_timeline self, float time) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_scale_x_timeline_get_relative_value(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_scale_x_timeline_get_absolute_value_1(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_scale_x_timeline_get_absolute_value_2(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_scale_x_timeline_get_scale_value(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_scale_x_timeline self, size_t frame) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->setLinear(frame); } -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); +void spine_scale_x_timeline_set_stepped(spine_scale_x_timeline self, size_t frame) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->setStepped(frame); +} + +void spine_scale_x_timeline_set_bezier(spine_scale_x_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_scale_x_timeline_get_bezier_value(spine_scale_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_scale_x_timeline_get_curves(spine_scale_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ScaleXTimeline*)self)->getCurves(); +} + +size_t spine_scale_x_timeline_get_frame_entries(spine_scale_x_timeline self) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getFrameEntries(); +} + +size_t spine_scale_x_timeline_get_frame_count(spine_scale_x_timeline self) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_scale_x_timeline_get_frames(spine_scale_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ScaleXTimeline*)self)->getFrames(); +} + +float spine_scale_x_timeline_get_duration(spine_scale_x_timeline self) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_scale_x_timeline_get_property_ids(spine_scale_x_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(ScaleXTimeline*)self)->getPropertyIds(); +} + +int spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline self) { + return ((BoneTimeline1*)(ScaleXTimeline*)self)->getBoneIndex(); +} + +void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline self, int inValue) { + ((BoneTimeline1*)(ScaleXTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_scale_x_timeline_rtti(void) { + return (spine_rtti)&ScaleXTimeline::rtti; } diff --git a/spine-c-new/src/generated/scale_x_timeline.h b/spine-c-new/src/generated/scale_x_timeline.h index fd6061c63..9468f4795 100644 --- a/spine-c-new/src/generated/scale_x_timeline.h +++ b/spine-c-new/src/generated/scale_x_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SCALE_X_TIMELINE_H +#define SPINE_SPINE_SCALE_X_TIMELINE_H -#ifndef SPINE_C_SCALEXTIMELINE_H -#define SPINE_C_SCALEXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_scale_x_timeline spine_scale_x_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_scale_x_timeline_dispose(spine_scale_x_timeline self); + +SPINE_C_API spine_rtti spine_scale_x_timeline_get_rtti(spine_scale_x_timeline self); +SPINE_C_API void spine_scale_x_timeline_apply(spine_scale_x_timeline self, 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_API void spine_scale_x_timeline_set_frame(spine_scale_x_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_scale_x_timeline_get_curve_value(spine_scale_x_timeline self, float time); +SPINE_C_API float spine_scale_x_timeline_get_relative_value(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_scale_x_timeline_get_absolute_value_1(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_scale_x_timeline_get_absolute_value_2(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_scale_x_timeline_get_scale_value(spine_scale_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_scale_x_timeline_set_linear(spine_scale_x_timeline self, size_t frame); +SPINE_C_API void spine_scale_x_timeline_set_stepped(spine_scale_x_timeline self, size_t frame); +SPINE_C_API void spine_scale_x_timeline_set_bezier(spine_scale_x_timeline self, 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_API float spine_scale_x_timeline_get_bezier_value(spine_scale_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_scale_x_timeline_get_curves(spine_scale_x_timeline self); +SPINE_C_API size_t spine_scale_x_timeline_get_frame_entries(spine_scale_x_timeline self); +SPINE_C_API size_t spine_scale_x_timeline_get_frame_count(spine_scale_x_timeline self); +SPINE_C_API spine_array_float spine_scale_x_timeline_get_frames(spine_scale_x_timeline self); +SPINE_C_API float spine_scale_x_timeline_get_duration(spine_scale_x_timeline self); +SPINE_C_API spine_array_property_id spine_scale_x_timeline_get_property_ids(spine_scale_x_timeline self); +SPINE_C_API int spine_scale_x_timeline_get_bone_index(spine_scale_x_timeline self); +SPINE_C_API void spine_scale_x_timeline_set_bone_index(spine_scale_x_timeline self, int inValue); +SPINE_C_API spine_rtti spine_scale_x_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SCALEXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SCALE_X_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/scale_y_timeline.cpp b/spine-c-new/src/generated/scale_y_timeline.cpp index 074e24d44..553e96c84 100644 --- a/spine-c-new/src/generated/scale_y_timeline.cpp +++ b/spine-c-new/src/generated/scale_y_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "scale_y_timeline.h" #include using namespace spine; 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; + return (spine_scale_y_timeline) new (__FILE__, __LINE__) ScaleYTimeline(frameCount, bezierCount, boneIndex); } -void spine_scale_y_timeline_dispose(spine_scale_y_timeline obj) { - if (!obj) return; - delete (ScaleYTimeline *) obj; +void spine_scale_y_timeline_dispose(spine_scale_y_timeline self) { + delete (ScaleYTimeline*)self; } -spine_rtti spine_scale_y_timeline_get_rtti() { - return (spine_rtti) &ScaleYTimeline::rtti; +spine_rtti spine_scale_y_timeline_get_rtti(spine_scale_y_timeline self) { + return (spine_rtti)&((ScaleYTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_scale_y_timeline_apply(spine_scale_y_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_scale_y_timeline_set_frame(spine_scale_y_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->setFrame(frame, time, value); } -float spine_scale_y_timeline_get_curve_value(spine_scale_y_timeline obj, float time) { - if (!obj) return 0; - ScaleYTimeline *_obj = (ScaleYTimeline *) obj; - return _obj->getCurveValue(time); +float spine_scale_y_timeline_get_curve_value(spine_scale_y_timeline self, float time) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_scale_y_timeline_get_relative_value(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_scale_y_timeline_get_absolute_value_1(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_scale_y_timeline_get_absolute_value_2(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_scale_y_timeline_get_scale_value(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_scale_y_timeline self, size_t frame) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->setLinear(frame); } -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); +void spine_scale_y_timeline_set_stepped(spine_scale_y_timeline self, size_t frame) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->setStepped(frame); +} + +void spine_scale_y_timeline_set_bezier(spine_scale_y_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_scale_y_timeline_get_bezier_value(spine_scale_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_scale_y_timeline_get_curves(spine_scale_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ScaleYTimeline*)self)->getCurves(); +} + +size_t spine_scale_y_timeline_get_frame_entries(spine_scale_y_timeline self) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getFrameEntries(); +} + +size_t spine_scale_y_timeline_get_frame_count(spine_scale_y_timeline self) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_scale_y_timeline_get_frames(spine_scale_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ScaleYTimeline*)self)->getFrames(); +} + +float spine_scale_y_timeline_get_duration(spine_scale_y_timeline self) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_scale_y_timeline_get_property_ids(spine_scale_y_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(ScaleYTimeline*)self)->getPropertyIds(); +} + +int spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline self) { + return ((BoneTimeline1*)(ScaleYTimeline*)self)->getBoneIndex(); +} + +void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline self, int inValue) { + ((BoneTimeline1*)(ScaleYTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_scale_y_timeline_rtti(void) { + return (spine_rtti)&ScaleYTimeline::rtti; } diff --git a/spine-c-new/src/generated/scale_y_timeline.h b/spine-c-new/src/generated/scale_y_timeline.h index f740d389c..74074c94d 100644 --- a/spine-c-new/src/generated/scale_y_timeline.h +++ b/spine-c-new/src/generated/scale_y_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SCALE_Y_TIMELINE_H +#define SPINE_SPINE_SCALE_Y_TIMELINE_H -#ifndef SPINE_C_SCALEYTIMELINE_H -#define SPINE_C_SCALEYTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_scale_y_timeline spine_scale_y_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_scale_y_timeline_dispose(spine_scale_y_timeline self); + +SPINE_C_API spine_rtti spine_scale_y_timeline_get_rtti(spine_scale_y_timeline self); +SPINE_C_API void spine_scale_y_timeline_apply(spine_scale_y_timeline self, 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_API void spine_scale_y_timeline_set_frame(spine_scale_y_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_scale_y_timeline_get_curve_value(spine_scale_y_timeline self, float time); +SPINE_C_API float spine_scale_y_timeline_get_relative_value(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_scale_y_timeline_get_absolute_value_1(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_scale_y_timeline_get_absolute_value_2(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_scale_y_timeline_get_scale_value(spine_scale_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_scale_y_timeline_set_linear(spine_scale_y_timeline self, size_t frame); +SPINE_C_API void spine_scale_y_timeline_set_stepped(spine_scale_y_timeline self, size_t frame); +SPINE_C_API void spine_scale_y_timeline_set_bezier(spine_scale_y_timeline self, 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_API float spine_scale_y_timeline_get_bezier_value(spine_scale_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_scale_y_timeline_get_curves(spine_scale_y_timeline self); +SPINE_C_API size_t spine_scale_y_timeline_get_frame_entries(spine_scale_y_timeline self); +SPINE_C_API size_t spine_scale_y_timeline_get_frame_count(spine_scale_y_timeline self); +SPINE_C_API spine_array_float spine_scale_y_timeline_get_frames(spine_scale_y_timeline self); +SPINE_C_API float spine_scale_y_timeline_get_duration(spine_scale_y_timeline self); +SPINE_C_API spine_array_property_id spine_scale_y_timeline_get_property_ids(spine_scale_y_timeline self); +SPINE_C_API int spine_scale_y_timeline_get_bone_index(spine_scale_y_timeline self); +SPINE_C_API void spine_scale_y_timeline_set_bone_index(spine_scale_y_timeline self, int inValue); +SPINE_C_API spine_rtti spine_scale_y_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SCALEYTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SCALE_Y_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/sequence.cpp b/spine-c-new/src/generated/sequence.cpp index 2e15a4815..40c3ee851 100644 --- a/spine-c-new/src/generated/sequence.cpp +++ b/spine-c-new/src/generated/sequence.cpp @@ -1,121 +1,60 @@ -/****************************************************************************** - * 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 "sequence.h" #include using namespace spine; spine_sequence spine_sequence_create(int count) { - Sequence *obj = new (__FILE__, __LINE__) Sequence(count); - return (spine_sequence) obj; + return (spine_sequence) new (__FILE__, __LINE__) Sequence(count); } -void spine_sequence_dispose(spine_sequence obj) { - if (!obj) return; - delete (Sequence *) obj; +void spine_sequence_dispose(spine_sequence self) { + delete (Sequence*)self; } -spine_sequence spine_sequence_copy(spine_sequence obj) { - if (!obj) return (spine_sequence) 0; - Sequence *_obj = (Sequence *) obj; - return (spine_sequence) _obj->copy(); +spine_sequence spine_sequence_copy(spine_sequence self) { + return (spine_sequence)((Sequence*)self)->copy(); } -void spine_sequence_apply(spine_sequence obj, spine_slot_pose slot, spine_attachment attachment) { - if (!obj) return ; - Sequence *_obj = (Sequence *) obj; - _obj->apply((SlotPose *) slot, (Attachment *) attachment); +void spine_sequence_apply(spine_sequence self, spine_slot_pose slot, spine_attachment attachment) { + ((Sequence*)self)->apply((SlotPose *)slot, (Attachment *)attachment); } -const char* spine_sequence_get_path(spine_sequence obj, const char* basePath, int index) { - if (!obj) return nullptr; - Sequence *_obj = (Sequence *) obj; - return (const char *) _obj->getPath(String(basePath), index).buffer(); +const char* spine_sequence_get_path(spine_sequence self, const char* basePath, int index) { + return ((Sequence*)self)->getPath(*((const String*)basePath), index).buffer(); } -int spine_sequence_get_id(spine_sequence obj) { - if (!obj) return 0; - Sequence *_obj = (Sequence *) obj; - return _obj->getId(); +int spine_sequence_get_id(spine_sequence self) { + return ((Sequence*)self)->getId(); } -void spine_sequence_set_id(spine_sequence obj, int value) { - if (!obj) return; - Sequence *_obj = (Sequence *) obj; - _obj->setId(value); +void spine_sequence_set_id(spine_sequence self, int id) { + ((Sequence*)self)->setId(id); } -int spine_sequence_get_start(spine_sequence obj) { - if (!obj) return 0; - Sequence *_obj = (Sequence *) obj; - return _obj->getStart(); +int spine_sequence_get_start(spine_sequence self) { + return ((Sequence*)self)->getStart(); } -void spine_sequence_set_start(spine_sequence obj, int value) { - if (!obj) return; - Sequence *_obj = (Sequence *) obj; - _obj->setStart(value); +void spine_sequence_set_start(spine_sequence self, int start) { + ((Sequence*)self)->setStart(start); } -int spine_sequence_get_digits(spine_sequence obj) { - if (!obj) return 0; - Sequence *_obj = (Sequence *) obj; - return _obj->getDigits(); +int spine_sequence_get_digits(spine_sequence self) { + return ((Sequence*)self)->getDigits(); } -void spine_sequence_set_digits(spine_sequence obj, int value) { - if (!obj) return; - Sequence *_obj = (Sequence *) obj; - _obj->setDigits(value); +void spine_sequence_set_digits(spine_sequence self, int digits) { + ((Sequence*)self)->setDigits(digits); } -int spine_sequence_get_setup_index(spine_sequence obj) { - if (!obj) return 0; - Sequence *_obj = (Sequence *) obj; - return _obj->getSetupIndex(); +int spine_sequence_get_setup_index(spine_sequence self) { + return ((Sequence*)self)->getSetupIndex(); } -void spine_sequence_set_setup_index(spine_sequence obj, int value) { - if (!obj) return; - Sequence *_obj = (Sequence *) obj; - _obj->setSetupIndex(value); +void spine_sequence_set_setup_index(spine_sequence self, int setupIndex) { + ((Sequence*)self)->setSetupIndex(setupIndex); } -int32_t spine_sequence_get_num_regions(spine_sequence obj) { - if (!obj) return 0; - Sequence *_obj = (Sequence *) obj; - return (int32_t) _obj->getRegions().size(); -} - -spine_texture_region *spine_sequence_get_regions(spine_sequence obj) { - if (!obj) return nullptr; - Sequence *_obj = (Sequence *) obj; - return (spine_texture_region *) _obj->getRegions().buffer(); +spine_array_texture_region spine_sequence_get_regions(spine_sequence self) { + return (spine_array_texture_region)&((Sequence*)self)->getRegions(); } diff --git a/spine-c-new/src/generated/sequence.h b/spine-c-new/src/generated/sequence.h index 2aaafc1eb..72ed546b7 100644 --- a/spine-c-new/src/generated/sequence.h +++ b/spine-c-new/src/generated/sequence.h @@ -1,59 +1,32 @@ -/****************************************************************************** - * 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_SPINE_SEQUENCE_H +#define SPINE_SPINE_SEQUENCE_H -#ifndef SPINE_C_SEQUENCE_H -#define SPINE_C_SEQUENCE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_sequence spine_sequence_create(int 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 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); +SPINE_C_API void spine_sequence_dispose(spine_sequence self); + +SPINE_C_API spine_sequence spine_sequence_copy(spine_sequence self); +SPINE_C_API void spine_sequence_apply(spine_sequence self, spine_slot_pose slot, spine_attachment attachment); +SPINE_C_API const char* spine_sequence_get_path(spine_sequence self, const char* basePath, int index); +SPINE_C_API int spine_sequence_get_id(spine_sequence self); +SPINE_C_API void spine_sequence_set_id(spine_sequence self, int id); +SPINE_C_API int spine_sequence_get_start(spine_sequence self); +SPINE_C_API void spine_sequence_set_start(spine_sequence self, int start); +SPINE_C_API int spine_sequence_get_digits(spine_sequence self); +SPINE_C_API void spine_sequence_set_digits(spine_sequence self, int digits); +SPINE_C_API int spine_sequence_get_setup_index(spine_sequence self); +SPINE_C_API void spine_sequence_set_setup_index(spine_sequence self, int setupIndex); +SPINE_C_API spine_array_texture_region spine_sequence_get_regions(spine_sequence self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SEQUENCE_H \ No newline at end of file +#endif /* SPINE_SPINE_SEQUENCE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/sequence_mode.h b/spine-c-new/src/generated/sequence_mode.h index 7cd6a6815..b50d490ae 100644 --- a/spine-c-new/src/generated/sequence_mode.h +++ b/spine-c-new/src/generated/sequence_mode.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_SEQUENCEMODE_H -#define SPINE_C_SEQUENCEMODE_H - -#include "../base.h" +#ifndef SPINE_SPINE_SEQUENCE_MODE_H +#define SPINE_SPINE_SEQUENCE_MODE_H #ifdef __cplusplus extern "C" { @@ -50,4 +19,4 @@ typedef enum spine_sequence_mode { } #endif -#endif // SPINE_C_SEQUENCEMODE_H \ No newline at end of file +#endif /* SPINE_SPINE_SEQUENCE_MODE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/sequence_timeline.cpp b/spine-c-new/src/generated/sequence_timeline.cpp index e046853e9..2b1a437ca 100644 --- a/spine-c-new/src/generated/sequence_timeline.cpp +++ b/spine-c-new/src/generated/sequence_timeline.cpp @@ -1,119 +1,60 @@ -/****************************************************************************** - * 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 "sequence_timeline.h" #include using namespace spine; 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; + return (spine_sequence_timeline) new (__FILE__, __LINE__) SequenceTimeline(frameCount, slotIndex, (Attachment *)attachment); } -void spine_sequence_timeline_dispose(spine_sequence_timeline obj) { - if (!obj) return; - delete (SequenceTimeline *) obj; +void spine_sequence_timeline_dispose(spine_sequence_timeline self) { + delete (SequenceTimeline*)self; } -spine_rtti spine_sequence_timeline_get_rtti() { - return (spine_rtti) &SequenceTimeline::rtti; +spine_rtti spine_sequence_timeline_get_rtti(spine_sequence_timeline self) { + return (spine_rtti)&((SequenceTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_sequence_timeline_apply(spine_sequence_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SequenceTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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, (SequenceMode) mode, index, delay); +void spine_sequence_timeline_set_frame(spine_sequence_timeline self, int frame, float time, spine_sequence_mode mode, int index, float delay) { + ((SequenceTimeline*)self)->setFrame(frame, time, (SequenceMode)mode, index, delay); } -spine_attachment spine_sequence_timeline_get_attachment(spine_sequence_timeline obj) { - if (!obj) return (spine_attachment) 0; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (spine_attachment) _obj->getAttachment(); +spine_attachment spine_sequence_timeline_get_attachment(spine_sequence_timeline self) { + return (spine_attachment)((SequenceTimeline*)self)->getAttachment(); } -size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline obj) { - if (!obj) return 0; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return _obj->getFrameEntries(); +size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline self) { + return ((Timeline*)(SequenceTimeline*)self)->getFrameEntries(); } -size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline obj) { - if (!obj) return 0; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return _obj->getFrameCount(); +size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline self) { + return ((Timeline*)(SequenceTimeline*)self)->getFrameCount(); } -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_array_float spine_sequence_timeline_get_frames(spine_sequence_timeline self) { + return (spine_array_float)&((Timeline*)(SequenceTimeline*)self)->getFrames(); } -float *spine_sequence_timeline_get_frames(spine_sequence_timeline obj) { - if (!obj) return nullptr; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +float spine_sequence_timeline_get_duration(spine_sequence_timeline self) { + return ((Timeline*)(SequenceTimeline*)self)->getDuration(); } -float spine_sequence_timeline_get_duration(spine_sequence_timeline obj) { - if (!obj) return 0; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return _obj->getDuration(); +spine_array_property_id spine_sequence_timeline_get_property_ids(spine_sequence_timeline self) { + return (spine_array_property_id)&((Timeline*)(SequenceTimeline*)self)->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(); +int spine_sequence_timeline_get_slot_index(spine_sequence_timeline self) { + return ((SlotTimeline*)(SequenceTimeline*)self)->getSlotIndex(); } -int64_t *spine_sequence_timeline_get_property_ids(spine_sequence_timeline obj) { - if (!obj) return nullptr; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +void spine_sequence_timeline_set_slot_index(spine_sequence_timeline self, int inValue) { + ((SlotTimeline*)(SequenceTimeline*)self)->setSlotIndex(inValue); } -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, int value) { - if (!obj) return; - SequenceTimeline *_obj = (SequenceTimeline *) obj; - _obj->setSlotIndex(value); +spine_rtti spine_sequence_timeline_rtti(void) { + return (spine_rtti)&SequenceTimeline::rtti; } diff --git a/spine-c-new/src/generated/sequence_timeline.h b/spine-c-new/src/generated/sequence_timeline.h index ad8a2e52d..7a14039f5 100644 --- a/spine-c-new/src/generated/sequence_timeline.h +++ b/spine-c-new/src/generated/sequence_timeline.h @@ -1,59 +1,32 @@ -/****************************************************************************** - * 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_SPINE_SEQUENCE_TIMELINE_H +#define SPINE_SPINE_SEQUENCE_TIMELINE_H -#ifndef SPINE_C_SEQUENCETIMELINE_H -#define SPINE_C_SEQUENCETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_sequence_timeline spine_sequence_timeline_create(size_t frameCount, int slotIndex, 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_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 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 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 int32_t spine_sequence_timeline_get_num_property_ids(spine_sequence_timeline obj); -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); +SPINE_C_API void spine_sequence_timeline_dispose(spine_sequence_timeline self); + +SPINE_C_API spine_rtti spine_sequence_timeline_get_rtti(spine_sequence_timeline self); +SPINE_C_API void spine_sequence_timeline_apply(spine_sequence_timeline self, 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_API void spine_sequence_timeline_set_frame(spine_sequence_timeline self, int frame, float time, spine_sequence_mode mode, int index, float delay); +SPINE_C_API spine_attachment spine_sequence_timeline_get_attachment(spine_sequence_timeline self); +SPINE_C_API size_t spine_sequence_timeline_get_frame_entries(spine_sequence_timeline self); +SPINE_C_API size_t spine_sequence_timeline_get_frame_count(spine_sequence_timeline self); +SPINE_C_API spine_array_float spine_sequence_timeline_get_frames(spine_sequence_timeline self); +SPINE_C_API float spine_sequence_timeline_get_duration(spine_sequence_timeline self); +SPINE_C_API spine_array_property_id spine_sequence_timeline_get_property_ids(spine_sequence_timeline self); +SPINE_C_API int spine_sequence_timeline_get_slot_index(spine_sequence_timeline self); +SPINE_C_API void spine_sequence_timeline_set_slot_index(spine_sequence_timeline self, int inValue); +SPINE_C_API spine_rtti spine_sequence_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SEQUENCETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SEQUENCE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/shear_timeline.cpp b/spine-c-new/src/generated/shear_timeline.cpp index de3f71b1b..9fdd1704d 100644 --- a/spine-c-new/src/generated/shear_timeline.cpp +++ b/spine-c-new/src/generated/shear_timeline.cpp @@ -1,77 +1,80 @@ -/****************************************************************************** - * 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 "shear_timeline.h" #include using namespace spine; 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; + return (spine_shear_timeline) new (__FILE__, __LINE__) ShearTimeline(frameCount, bezierCount, boneIndex); } -void spine_shear_timeline_dispose(spine_shear_timeline obj) { - if (!obj) return; - delete (ShearTimeline *) obj; +void spine_shear_timeline_dispose(spine_shear_timeline self) { + delete (ShearTimeline*)self; } -spine_rtti spine_shear_timeline_get_rtti() { - return (spine_rtti) &ShearTimeline::rtti; +spine_rtti spine_shear_timeline_get_rtti(spine_shear_timeline self) { + return (spine_rtti)&((ShearTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_shear_timeline_apply(spine_shear_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline2*)(ShearTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_shear_timeline_set_frame(spine_shear_timeline self, size_t frame, float time, float value1, float value2) { + ((BoneTimeline2*)(ShearTimeline*)self)->setFrame(frame, time, value1, value2); } -float spine_shear_timeline_get_curve_value(spine_shear_timeline obj, float time) { - if (!obj) return 0; - ShearTimeline *_obj = (ShearTimeline *) obj; - return _obj->getCurveValue(time); +float spine_shear_timeline_get_curve_value(spine_shear_timeline self, float time) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getCurveValue(time); } -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_linear(spine_shear_timeline self, size_t frame) { + ((BoneTimeline2*)(ShearTimeline*)self)->setLinear(frame); } -void spine_shear_timeline_set_bone_index(spine_shear_timeline obj, int value) { - if (!obj) return; - ShearTimeline *_obj = (ShearTimeline *) obj; - _obj->setBoneIndex(value); +void spine_shear_timeline_set_stepped(spine_shear_timeline self, size_t frame) { + ((BoneTimeline2*)(ShearTimeline*)self)->setStepped(frame); +} + +void spine_shear_timeline_set_bezier(spine_shear_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline2*)(ShearTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_shear_timeline_get_bezier_value(spine_shear_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_shear_timeline_get_curves(spine_shear_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(ShearTimeline*)self)->getCurves(); +} + +size_t spine_shear_timeline_get_frame_entries(spine_shear_timeline self) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getFrameEntries(); +} + +size_t spine_shear_timeline_get_frame_count(spine_shear_timeline self) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_shear_timeline_get_frames(spine_shear_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(ShearTimeline*)self)->getFrames(); +} + +float spine_shear_timeline_get_duration(spine_shear_timeline self) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_shear_timeline_get_property_ids(spine_shear_timeline self) { + return (spine_array_property_id)&((BoneTimeline2*)(ShearTimeline*)self)->getPropertyIds(); +} + +int spine_shear_timeline_get_bone_index(spine_shear_timeline self) { + return ((BoneTimeline2*)(ShearTimeline*)self)->getBoneIndex(); +} + +void spine_shear_timeline_set_bone_index(spine_shear_timeline self, int inValue) { + ((BoneTimeline2*)(ShearTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_shear_timeline_rtti(void) { + return (spine_rtti)&ShearTimeline::rtti; } diff --git a/spine-c-new/src/generated/shear_timeline.h b/spine-c-new/src/generated/shear_timeline.h index 312fa32b3..c34b463ee 100644 --- a/spine-c-new/src/generated/shear_timeline.h +++ b/spine-c-new/src/generated/shear_timeline.h @@ -1,52 +1,37 @@ -/****************************************************************************** - * 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_SPINE_SHEAR_TIMELINE_H +#define SPINE_SPINE_SHEAR_TIMELINE_H -#ifndef SPINE_C_SHEARTIMELINE_H -#define SPINE_C_SHEARTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_shear_timeline spine_shear_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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); +SPINE_C_API void spine_shear_timeline_dispose(spine_shear_timeline self); + +SPINE_C_API spine_rtti spine_shear_timeline_get_rtti(spine_shear_timeline self); +SPINE_C_API void spine_shear_timeline_apply(spine_shear_timeline self, 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_API void spine_shear_timeline_set_frame(spine_shear_timeline self, size_t frame, float time, float value1, float value2); +SPINE_C_API float spine_shear_timeline_get_curve_value(spine_shear_timeline self, float time); +SPINE_C_API void spine_shear_timeline_set_linear(spine_shear_timeline self, size_t frame); +SPINE_C_API void spine_shear_timeline_set_stepped(spine_shear_timeline self, size_t frame); +SPINE_C_API void spine_shear_timeline_set_bezier(spine_shear_timeline self, 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_API float spine_shear_timeline_get_bezier_value(spine_shear_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_shear_timeline_get_curves(spine_shear_timeline self); +SPINE_C_API size_t spine_shear_timeline_get_frame_entries(spine_shear_timeline self); +SPINE_C_API size_t spine_shear_timeline_get_frame_count(spine_shear_timeline self); +SPINE_C_API spine_array_float spine_shear_timeline_get_frames(spine_shear_timeline self); +SPINE_C_API float spine_shear_timeline_get_duration(spine_shear_timeline self); +SPINE_C_API spine_array_property_id spine_shear_timeline_get_property_ids(spine_shear_timeline self); +SPINE_C_API int spine_shear_timeline_get_bone_index(spine_shear_timeline self); +SPINE_C_API void spine_shear_timeline_set_bone_index(spine_shear_timeline self, int inValue); +SPINE_C_API spine_rtti spine_shear_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SHEARTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SHEAR_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/shear_x_timeline.cpp b/spine-c-new/src/generated/shear_x_timeline.cpp index d86e5009a..2f4ccce5e 100644 --- a/spine-c-new/src/generated/shear_x_timeline.cpp +++ b/spine-c-new/src/generated/shear_x_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "shear_x_timeline.h" #include using namespace spine; 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; + return (spine_shear_x_timeline) new (__FILE__, __LINE__) ShearXTimeline(frameCount, bezierCount, boneIndex); } -void spine_shear_x_timeline_dispose(spine_shear_x_timeline obj) { - if (!obj) return; - delete (ShearXTimeline *) obj; +void spine_shear_x_timeline_dispose(spine_shear_x_timeline self) { + delete (ShearXTimeline*)self; } -spine_rtti spine_shear_x_timeline_get_rtti() { - return (spine_rtti) &ShearXTimeline::rtti; +spine_rtti spine_shear_x_timeline_get_rtti(spine_shear_x_timeline self) { + return (spine_rtti)&((ShearXTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_shear_x_timeline_apply(spine_shear_x_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(ShearXTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - ShearXTimeline *_obj = (ShearXTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_shear_x_timeline_set_frame(spine_shear_x_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(ShearXTimeline*)self)->setFrame(frame, time, value); } -float spine_shear_x_timeline_get_curve_value(spine_shear_x_timeline obj, float time) { - if (!obj) return 0; - ShearXTimeline *_obj = (ShearXTimeline *) obj; - return _obj->getCurveValue(time); +float spine_shear_x_timeline_get_curve_value(spine_shear_x_timeline self, float time) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_shear_x_timeline_get_relative_value(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_shear_x_timeline_get_absolute_value_1(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_shear_x_timeline_get_absolute_value_2(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_shear_x_timeline_get_scale_value(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_shear_x_timeline self, size_t frame) { + ((BoneTimeline1*)(ShearXTimeline*)self)->setLinear(frame); } -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); +void spine_shear_x_timeline_set_stepped(spine_shear_x_timeline self, size_t frame) { + ((BoneTimeline1*)(ShearXTimeline*)self)->setStepped(frame); +} + +void spine_shear_x_timeline_set_bezier(spine_shear_x_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(ShearXTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_shear_x_timeline_get_bezier_value(spine_shear_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_shear_x_timeline_get_curves(spine_shear_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ShearXTimeline*)self)->getCurves(); +} + +size_t spine_shear_x_timeline_get_frame_entries(spine_shear_x_timeline self) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getFrameEntries(); +} + +size_t spine_shear_x_timeline_get_frame_count(spine_shear_x_timeline self) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_shear_x_timeline_get_frames(spine_shear_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ShearXTimeline*)self)->getFrames(); +} + +float spine_shear_x_timeline_get_duration(spine_shear_x_timeline self) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_shear_x_timeline_get_property_ids(spine_shear_x_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(ShearXTimeline*)self)->getPropertyIds(); +} + +int spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline self) { + return ((BoneTimeline1*)(ShearXTimeline*)self)->getBoneIndex(); +} + +void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline self, int inValue) { + ((BoneTimeline1*)(ShearXTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_shear_x_timeline_rtti(void) { + return (spine_rtti)&ShearXTimeline::rtti; } diff --git a/spine-c-new/src/generated/shear_x_timeline.h b/spine-c-new/src/generated/shear_x_timeline.h index 09cb6e658..05f9c47cd 100644 --- a/spine-c-new/src/generated/shear_x_timeline.h +++ b/spine-c-new/src/generated/shear_x_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SHEAR_X_TIMELINE_H +#define SPINE_SPINE_SHEAR_X_TIMELINE_H -#ifndef SPINE_C_SHEARXTIMELINE_H -#define SPINE_C_SHEARXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_shear_x_timeline spine_shear_x_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_shear_x_timeline_dispose(spine_shear_x_timeline self); + +SPINE_C_API spine_rtti spine_shear_x_timeline_get_rtti(spine_shear_x_timeline self); +SPINE_C_API void spine_shear_x_timeline_apply(spine_shear_x_timeline self, 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_API void spine_shear_x_timeline_set_frame(spine_shear_x_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_shear_x_timeline_get_curve_value(spine_shear_x_timeline self, float time); +SPINE_C_API float spine_shear_x_timeline_get_relative_value(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_shear_x_timeline_get_absolute_value_1(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_shear_x_timeline_get_absolute_value_2(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_shear_x_timeline_get_scale_value(spine_shear_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_shear_x_timeline_set_linear(spine_shear_x_timeline self, size_t frame); +SPINE_C_API void spine_shear_x_timeline_set_stepped(spine_shear_x_timeline self, size_t frame); +SPINE_C_API void spine_shear_x_timeline_set_bezier(spine_shear_x_timeline self, 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_API float spine_shear_x_timeline_get_bezier_value(spine_shear_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_shear_x_timeline_get_curves(spine_shear_x_timeline self); +SPINE_C_API size_t spine_shear_x_timeline_get_frame_entries(spine_shear_x_timeline self); +SPINE_C_API size_t spine_shear_x_timeline_get_frame_count(spine_shear_x_timeline self); +SPINE_C_API spine_array_float spine_shear_x_timeline_get_frames(spine_shear_x_timeline self); +SPINE_C_API float spine_shear_x_timeline_get_duration(spine_shear_x_timeline self); +SPINE_C_API spine_array_property_id spine_shear_x_timeline_get_property_ids(spine_shear_x_timeline self); +SPINE_C_API int spine_shear_x_timeline_get_bone_index(spine_shear_x_timeline self); +SPINE_C_API void spine_shear_x_timeline_set_bone_index(spine_shear_x_timeline self, int inValue); +SPINE_C_API spine_rtti spine_shear_x_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SHEARXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SHEAR_X_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/shear_y_timeline.cpp b/spine-c-new/src/generated/shear_y_timeline.cpp index 3394cd704..6d590a2f0 100644 --- a/spine-c-new/src/generated/shear_y_timeline.cpp +++ b/spine-c-new/src/generated/shear_y_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "shear_y_timeline.h" #include using namespace spine; 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; + return (spine_shear_y_timeline) new (__FILE__, __LINE__) ShearYTimeline(frameCount, bezierCount, boneIndex); } -void spine_shear_y_timeline_dispose(spine_shear_y_timeline obj) { - if (!obj) return; - delete (ShearYTimeline *) obj; +void spine_shear_y_timeline_dispose(spine_shear_y_timeline self) { + delete (ShearYTimeline*)self; } -spine_rtti spine_shear_y_timeline_get_rtti() { - return (spine_rtti) &ShearYTimeline::rtti; +spine_rtti spine_shear_y_timeline_get_rtti(spine_shear_y_timeline self) { + return (spine_rtti)&((ShearYTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_shear_y_timeline_apply(spine_shear_y_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(ShearYTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - ShearYTimeline *_obj = (ShearYTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_shear_y_timeline_set_frame(spine_shear_y_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(ShearYTimeline*)self)->setFrame(frame, time, value); } -float spine_shear_y_timeline_get_curve_value(spine_shear_y_timeline obj, float time) { - if (!obj) return 0; - ShearYTimeline *_obj = (ShearYTimeline *) obj; - return _obj->getCurveValue(time); +float spine_shear_y_timeline_get_curve_value(spine_shear_y_timeline self, float time) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_shear_y_timeline_get_relative_value(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_shear_y_timeline_get_absolute_value_1(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_shear_y_timeline_get_absolute_value_2(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_shear_y_timeline_get_scale_value(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_shear_y_timeline self, size_t frame) { + ((BoneTimeline1*)(ShearYTimeline*)self)->setLinear(frame); } -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); +void spine_shear_y_timeline_set_stepped(spine_shear_y_timeline self, size_t frame) { + ((BoneTimeline1*)(ShearYTimeline*)self)->setStepped(frame); +} + +void spine_shear_y_timeline_set_bezier(spine_shear_y_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(ShearYTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_shear_y_timeline_get_bezier_value(spine_shear_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_shear_y_timeline_get_curves(spine_shear_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ShearYTimeline*)self)->getCurves(); +} + +size_t spine_shear_y_timeline_get_frame_entries(spine_shear_y_timeline self) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getFrameEntries(); +} + +size_t spine_shear_y_timeline_get_frame_count(spine_shear_y_timeline self) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_shear_y_timeline_get_frames(spine_shear_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(ShearYTimeline*)self)->getFrames(); +} + +float spine_shear_y_timeline_get_duration(spine_shear_y_timeline self) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_shear_y_timeline_get_property_ids(spine_shear_y_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(ShearYTimeline*)self)->getPropertyIds(); +} + +int spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline self) { + return ((BoneTimeline1*)(ShearYTimeline*)self)->getBoneIndex(); +} + +void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline self, int inValue) { + ((BoneTimeline1*)(ShearYTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_shear_y_timeline_rtti(void) { + return (spine_rtti)&ShearYTimeline::rtti; } diff --git a/spine-c-new/src/generated/shear_y_timeline.h b/spine-c-new/src/generated/shear_y_timeline.h index 9f840c483..7a7ead79f 100644 --- a/spine-c-new/src/generated/shear_y_timeline.h +++ b/spine-c-new/src/generated/shear_y_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SHEAR_Y_TIMELINE_H +#define SPINE_SPINE_SHEAR_Y_TIMELINE_H -#ifndef SPINE_C_SHEARYTIMELINE_H -#define SPINE_C_SHEARYTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_shear_y_timeline spine_shear_y_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_shear_y_timeline_dispose(spine_shear_y_timeline self); + +SPINE_C_API spine_rtti spine_shear_y_timeline_get_rtti(spine_shear_y_timeline self); +SPINE_C_API void spine_shear_y_timeline_apply(spine_shear_y_timeline self, 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_API void spine_shear_y_timeline_set_frame(spine_shear_y_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_shear_y_timeline_get_curve_value(spine_shear_y_timeline self, float time); +SPINE_C_API float spine_shear_y_timeline_get_relative_value(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_shear_y_timeline_get_absolute_value_1(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_shear_y_timeline_get_absolute_value_2(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_shear_y_timeline_get_scale_value(spine_shear_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_shear_y_timeline_set_linear(spine_shear_y_timeline self, size_t frame); +SPINE_C_API void spine_shear_y_timeline_set_stepped(spine_shear_y_timeline self, size_t frame); +SPINE_C_API void spine_shear_y_timeline_set_bezier(spine_shear_y_timeline self, 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_API float spine_shear_y_timeline_get_bezier_value(spine_shear_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_shear_y_timeline_get_curves(spine_shear_y_timeline self); +SPINE_C_API size_t spine_shear_y_timeline_get_frame_entries(spine_shear_y_timeline self); +SPINE_C_API size_t spine_shear_y_timeline_get_frame_count(spine_shear_y_timeline self); +SPINE_C_API spine_array_float spine_shear_y_timeline_get_frames(spine_shear_y_timeline self); +SPINE_C_API float spine_shear_y_timeline_get_duration(spine_shear_y_timeline self); +SPINE_C_API spine_array_property_id spine_shear_y_timeline_get_property_ids(spine_shear_y_timeline self); +SPINE_C_API int spine_shear_y_timeline_get_bone_index(spine_shear_y_timeline self); +SPINE_C_API void spine_shear_y_timeline_set_bone_index(spine_shear_y_timeline self, int inValue); +SPINE_C_API spine_rtti spine_shear_y_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SHEARYTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SHEAR_Y_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton.cpp b/spine-c-new/src/generated/skeleton.cpp index 4c06f2e98..6f8503d03 100644 --- a/spine-c-new/src/generated/skeleton.cpp +++ b/spine-c-new/src/generated/skeleton.cpp @@ -1,397 +1,228 @@ -/****************************************************************************** - * 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 "skeleton.h" #include using namespace spine; spine_skeleton spine_skeleton_create(spine_skeleton_data skeletonData) { - Skeleton *obj = new (__FILE__, __LINE__) Skeleton(*(SkeletonData*) skeletonData); - return (spine_skeleton) obj; + return (spine_skeleton) new (__FILE__, __LINE__) Skeleton(*((SkeletonData*)skeletonData)); } -void spine_skeleton_dispose(spine_skeleton obj) { - if (!obj) return; - delete (Skeleton *) obj; +void spine_skeleton_dispose(spine_skeleton self) { + delete (Skeleton*)self; } -void spine_skeleton_update_cache(spine_skeleton obj) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->updateCache(); +void spine_skeleton_update_cache(spine_skeleton self) { + ((Skeleton*)self)->updateCache(); } -void spine_skeleton_print_update_cache(spine_skeleton obj) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->printUpdateCache(); +void spine_skeleton_print_update_cache(spine_skeleton self) { + ((Skeleton*)self)->printUpdateCache(); } -void spine_skeleton_constrained(spine_skeleton obj, spine_posed object) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->constrained(*(Posed*) object); +void spine_skeleton_constrained(spine_skeleton self, spine_posed object) { + ((Skeleton*)self)->constrained(*((Posed*)object)); } -void spine_skeleton_sort_bone(spine_skeleton obj, spine_bone bone) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->sortBone((Bone *) bone); +void spine_skeleton_sort_bone(spine_skeleton self, spine_bone bone) { + ((Skeleton*)self)->sortBone((Bone *)bone); } -void spine_skeleton_update_world_transform(spine_skeleton obj, spine_physics physics) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->updateWorldTransform((Physics) physics); +void spine_skeleton_sort_reset(spine_array_bone bones) { + Skeleton::sortReset(*((Array*)bones)); } -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) physics, (BonePose *) parent); +void spine_skeleton_update_world_transform_1(spine_skeleton self, spine_physics physics) { + ((Skeleton*)self)->updateWorldTransform((Physics)physics); } -void spine_skeleton_setup_pose(spine_skeleton obj) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setupPose(); +void spine_skeleton_update_world_transform_2(spine_skeleton self, spine_physics physics, spine_bone_pose parent) { + ((Skeleton*)self)->updateWorldTransform((Physics)physics, (BonePose *)parent); } -void spine_skeleton_setup_pose_bones(spine_skeleton obj) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setupPoseBones(); +void spine_skeleton_setup_pose(spine_skeleton self) { + ((Skeleton*)self)->setupPose(); } -void spine_skeleton_setup_pose_slots(spine_skeleton obj) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setupPoseSlots(); +void spine_skeleton_setup_pose_bones(spine_skeleton self) { + ((Skeleton*)self)->setupPoseBones(); } -spine_skeleton_data spine_skeleton_get_data(spine_skeleton obj) { - if (!obj) return (spine_skeleton_data) 0; - Skeleton *_obj = (Skeleton *) obj; - return (spine_skeleton_data) _obj->getData(); +void spine_skeleton_setup_pose_slots(spine_skeleton self) { + ((Skeleton*)self)->setupPoseSlots(); } -int32_t spine_skeleton_get_num_bones(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getBones().size(); +spine_skeleton_data spine_skeleton_get_data(spine_skeleton self) { + return (spine_skeleton_data)((Skeleton*)self)->getData(); } -spine_bone *spine_skeleton_get_bones(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_bone *) _obj->getBones().buffer(); +spine_array_bone spine_skeleton_get_bones(spine_skeleton self) { + return (spine_array_bone)&((Skeleton*)self)->getBones(); } -int32_t spine_skeleton_get_num_update_cache(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getUpdateCache().size(); +spine_array_update spine_skeleton_get_update_cache(spine_skeleton self) { + return (spine_array_update)&((Skeleton*)self)->getUpdateCache(); } -spine_update *spine_skeleton_get_update_cache(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_update *) _obj->getUpdateCache().buffer(); +spine_bone spine_skeleton_get_root_bone(spine_skeleton self) { + return (spine_bone)((Skeleton*)self)->getRootBone(); } -spine_bone spine_skeleton_get_root_bone(spine_skeleton obj) { - if (!obj) return (spine_bone) 0; - Skeleton *_obj = (Skeleton *) obj; - return (spine_bone) _obj->getRootBone(); +spine_bone spine_skeleton_find_bone(spine_skeleton self, const char* boneName) { + return (spine_bone)((Skeleton*)self)->findBone(*((const String*)boneName)); } -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)); +spine_array_slot spine_skeleton_get_slots(spine_skeleton self) { + return (spine_array_slot)&((Skeleton*)self)->getSlots(); } -int32_t spine_skeleton_get_num_slots(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getSlots().size(); +spine_slot spine_skeleton_find_slot(spine_skeleton self, const char* slotName) { + return (spine_slot)((Skeleton*)self)->findSlot(*((const String*)slotName)); } -spine_slot *spine_skeleton_get_slots(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_slot *) _obj->getSlots().buffer(); +spine_array_slot spine_skeleton_get_draw_order(spine_skeleton self) { + return (spine_array_slot)&((Skeleton*)self)->getDrawOrder(); } -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)); +spine_skin spine_skeleton_get_skin(spine_skeleton self) { + return (spine_skin)((Skeleton*)self)->getSkin(); } -int32_t spine_skeleton_get_num_draw_order(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getDrawOrder().size(); +void spine_skeleton_set_skin_1(spine_skeleton self, const char* skinName) { + ((Skeleton*)self)->setSkin(*((const String*)skinName)); } -spine_slot *spine_skeleton_get_draw_order(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_slot *) _obj->getDrawOrder().buffer(); +void spine_skeleton_set_skin_2(spine_skeleton self, spine_skin newSkin) { + ((Skeleton*)self)->setSkin((Skin *)newSkin); } -spine_skin spine_skeleton_get_skin(spine_skeleton obj) { - if (!obj) return (spine_skin) 0; - Skeleton *_obj = (Skeleton *) obj; - return (spine_skin) _obj->getSkin(); +spine_attachment spine_skeleton_get_attachment_1(spine_skeleton self, const char* slotName, const char* attachmentName) { + return (spine_attachment)((Skeleton*)self)->getAttachment(*((const String*)slotName), *((const String*)attachmentName)); } -void spine_skeleton_set_skin(spine_skeleton obj, const char* value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setSkin(String(value)); +spine_attachment spine_skeleton_get_attachment_2(spine_skeleton self, int slotIndex, const char* attachmentName) { + return (spine_attachment)((Skeleton*)self)->getAttachment(slotIndex, *((const String*)attachmentName)); } -void spine_skeleton_set_skin(spine_skeleton obj, spine_skin value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setSkin((Skin *) value); +void spine_skeleton_set_attachment(spine_skeleton self, const char* slotName, const char* attachmentName) { + ((Skeleton*)self)->setAttachment(*((const String*)slotName), *((const String*)attachmentName)); } -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_array_constraint spine_skeleton_get_constraints(spine_skeleton self) { + return (spine_array_constraint)&((Skeleton*)self)->getConstraints(); } -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)); +spine_array_physics_constraint spine_skeleton_get_physics_constraints(spine_skeleton self) { + return (spine_array_physics_constraint)&((Skeleton*)self)->getPhysicsConstraints(); } -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_bounds_1(spine_skeleton self, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer) { + ((Skeleton*)self)->getBounds(*outX, *outY, *outWidth, *outHeight, *((Array*)outVertexBuffer)); } -int32_t spine_skeleton_get_num_constraints(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getConstraints().size(); +void spine_skeleton_get_bounds_2(spine_skeleton self, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer, spine_skeleton_clipping clipper) { + ((Skeleton*)self)->getBounds(*outX, *outY, *outWidth, *outHeight, *((Array*)outVertexBuffer), (SkeletonClipping *)clipper); } -spine_constraint *spine_skeleton_get_constraints(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_constraint *) _obj->getConstraints().buffer(); +spine_color spine_skeleton_get_color(spine_skeleton self) { + return (spine_color)&((Skeleton*)self)->getColor(); } -int32_t spine_skeleton_get_num_physics_constraints(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return (int32_t) _obj->getPhysicsConstraints().size(); +void spine_skeleton_set_color_1(spine_skeleton self, spine_color color) { + ((Skeleton*)self)->setColor(*((Color*)color)); } -spine_physics_constraint *spine_skeleton_get_physics_constraints(spine_skeleton obj) { - if (!obj) return nullptr; - Skeleton *_obj = (Skeleton *) obj; - return (spine_physics_constraint *) _obj->getPhysicsConstraints().buffer(); +void spine_skeleton_set_color_2(spine_skeleton self, float r, float g, float b, float a) { + ((Skeleton*)self)->setColor(r, g, b, a); } -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, (Array &) outVertexBuffer); +float spine_skeleton_get_scale_x(spine_skeleton self) { + return ((Skeleton*)self)->getScaleX(); } -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, (Array &) outVertexBuffer, (SkeletonClipping *) clipper); +void spine_skeleton_set_scale_x(spine_skeleton self, float inValue) { + ((Skeleton*)self)->setScaleX(inValue); } -spine_color spine_skeleton_get_color(spine_skeleton obj) { - if (!obj) return (spine_color) 0; - Skeleton *_obj = (Skeleton *) obj; - return (spine_color) &_obj->getColor(); +float spine_skeleton_get_scale_y(spine_skeleton self) { + return ((Skeleton*)self)->getScaleY(); } -void spine_skeleton_set_color(spine_skeleton obj, spine_color value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setColor(*((Color*) value)); +void spine_skeleton_set_scale_y(spine_skeleton self, float inValue) { + ((Skeleton*)self)->setScaleY(inValue); } -void spine_skeleton_set_color(spine_skeleton obj, float r, float g, float b, float a) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setColor(r, g, b, a); +void spine_skeleton_set_scale(spine_skeleton self, float scaleX, float scaleY) { + ((Skeleton*)self)->setScale(scaleX, scaleY); } -float spine_skeleton_get_scale_x(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getScaleX(); +float spine_skeleton_get_x(spine_skeleton self) { + return ((Skeleton*)self)->getX(); } -void spine_skeleton_set_scale_x(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setScaleX(value); +void spine_skeleton_set_x(spine_skeleton self, float inValue) { + ((Skeleton*)self)->setX(inValue); } -float spine_skeleton_get_scale_y(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getScaleY(); +float spine_skeleton_get_y(spine_skeleton self) { + return ((Skeleton*)self)->getY(); } -void spine_skeleton_set_scale_y(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setScaleY(value); +void spine_skeleton_set_y(spine_skeleton self, float inValue) { + ((Skeleton*)self)->setY(inValue); } -void spine_skeleton_set_scale(spine_skeleton obj, float scaleX, float scaleY) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setScale(scaleX, scaleY); +void spine_skeleton_set_position(spine_skeleton self, float x, float y) { + ((Skeleton*)self)->setPosition(x, y); } -float spine_skeleton_get_x(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getX(); +float spine_skeleton_get_wind_x(spine_skeleton self) { + return ((Skeleton*)self)->getWindX(); } -void spine_skeleton_set_x(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setX(value); +void spine_skeleton_set_wind_x(spine_skeleton self, float windX) { + ((Skeleton*)self)->setWindX(windX); } -float spine_skeleton_get_y(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getY(); +float spine_skeleton_get_wind_y(spine_skeleton self) { + return ((Skeleton*)self)->getWindY(); } -void spine_skeleton_set_y(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setY(value); +void spine_skeleton_set_wind_y(spine_skeleton self, float windY) { + ((Skeleton*)self)->setWindY(windY); } -void spine_skeleton_set_position(spine_skeleton obj, float x, float y) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->setPosition(x, y); +float spine_skeleton_get_gravity_x(spine_skeleton self) { + return ((Skeleton*)self)->getGravityX(); } -float spine_skeleton_get_wind_x(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getWindX(); +void spine_skeleton_set_gravity_x(spine_skeleton self, float gravityX) { + ((Skeleton*)self)->setGravityX(gravityX); } -void spine_skeleton_set_wind_x(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setWindX(value); +float spine_skeleton_get_gravity_y(spine_skeleton self) { + return ((Skeleton*)self)->getGravityY(); } -float spine_skeleton_get_wind_y(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getWindY(); +void spine_skeleton_set_gravity_y(spine_skeleton self, float gravityY) { + ((Skeleton*)self)->setGravityY(gravityY); } -void spine_skeleton_set_wind_y(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setWindY(value); +void spine_skeleton_physics_translate(spine_skeleton self, float x, float y) { + ((Skeleton*)self)->physicsTranslate(x, y); } -float spine_skeleton_get_gravity_x(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getGravityX(); +void spine_skeleton_physics_rotate(spine_skeleton self, float x, float y, float degrees) { + ((Skeleton*)self)->physicsRotate(x, y, degrees); } -void spine_skeleton_set_gravity_x(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setGravityX(value); +float spine_skeleton_get_time(spine_skeleton self) { + return ((Skeleton*)self)->getTime(); } -float spine_skeleton_get_gravity_y(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getGravityY(); +void spine_skeleton_set_time(spine_skeleton self, float time) { + ((Skeleton*)self)->setTime(time); } -void spine_skeleton_set_gravity_y(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setGravityY(value); -} - -void spine_skeleton_physics_translate(spine_skeleton obj, float x, float y) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->physicsTranslate(x, y); -} - -void spine_skeleton_physics_rotate(spine_skeleton obj, float x, float y, float degrees) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->physicsRotate(x, y, degrees); -} - -float spine_skeleton_get_time(spine_skeleton obj) { - if (!obj) return 0; - Skeleton *_obj = (Skeleton *) obj; - return _obj->getTime(); -} - -void spine_skeleton_set_time(spine_skeleton obj, float value) { - if (!obj) return; - Skeleton *_obj = (Skeleton *) obj; - _obj->setTime(value); -} - -void spine_skeleton_update(spine_skeleton obj, float delta) { - if (!obj) return ; - Skeleton *_obj = (Skeleton *) obj; - _obj->update(delta); +void spine_skeleton_update(spine_skeleton self, float delta) { + ((Skeleton*)self)->update(delta); } diff --git a/spine-c-new/src/generated/skeleton.h b/spine-c-new/src/generated/skeleton.h index b4784715a..aac265657 100644 --- a/spine-c-new/src/generated/skeleton.h +++ b/spine-c-new/src/generated/skeleton.h @@ -1,105 +1,74 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_H +#define SPINE_SPINE_SKELETON_H -#ifndef SPINE_C_SKELETON_H -#define SPINE_C_SKELETON_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton spine_skeleton_create(spine_skeleton_data skeletonData); -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_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 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 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 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 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 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 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 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, 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); -SPINE_C_EXPORT float spine_skeleton_get_scale_x(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_scale_x(spine_skeleton obj, float value); -SPINE_C_EXPORT float spine_skeleton_get_scale_y(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_scale_y(spine_skeleton obj, float value); -SPINE_C_EXPORT void spine_skeleton_set_scale(spine_skeleton obj, float scaleX, float scaleY); -SPINE_C_EXPORT float spine_skeleton_get_x(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_x(spine_skeleton obj, float value); -SPINE_C_EXPORT float spine_skeleton_get_y(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_y(spine_skeleton obj, float value); -SPINE_C_EXPORT void spine_skeleton_set_position(spine_skeleton obj, float x, float y); -SPINE_C_EXPORT float spine_skeleton_get_wind_x(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_wind_x(spine_skeleton obj, float value); -SPINE_C_EXPORT float spine_skeleton_get_wind_y(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_wind_y(spine_skeleton obj, float value); -SPINE_C_EXPORT float spine_skeleton_get_gravity_x(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_gravity_x(spine_skeleton obj, float value); -SPINE_C_EXPORT float spine_skeleton_get_gravity_y(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_gravity_y(spine_skeleton obj, float value); -SPINE_C_EXPORT void spine_skeleton_physics_translate(spine_skeleton obj, float x, float y); -SPINE_C_EXPORT void spine_skeleton_physics_rotate(spine_skeleton obj, float x, float y, float degrees); -SPINE_C_EXPORT float spine_skeleton_get_time(spine_skeleton obj); -SPINE_C_EXPORT void spine_skeleton_set_time(spine_skeleton obj, float value); -SPINE_C_EXPORT void spine_skeleton_update(spine_skeleton obj, float delta); +SPINE_C_API void spine_skeleton_dispose(spine_skeleton self); + +SPINE_C_API void spine_skeleton_update_cache(spine_skeleton self); +SPINE_C_API void spine_skeleton_print_update_cache(spine_skeleton self); +SPINE_C_API void spine_skeleton_constrained(spine_skeleton self, spine_posed object); +SPINE_C_API void spine_skeleton_sort_bone(spine_skeleton self, spine_bone bone); +SPINE_C_API void spine_skeleton_sort_reset(spine_array_bone bones); +SPINE_C_API void spine_skeleton_update_world_transform_1(spine_skeleton self, spine_physics physics); +SPINE_C_API void spine_skeleton_update_world_transform_2(spine_skeleton self, spine_physics physics, spine_bone_pose parent); +SPINE_C_API void spine_skeleton_setup_pose(spine_skeleton self); +SPINE_C_API void spine_skeleton_setup_pose_bones(spine_skeleton self); +SPINE_C_API void spine_skeleton_setup_pose_slots(spine_skeleton self); +SPINE_C_API spine_skeleton_data spine_skeleton_get_data(spine_skeleton self); +SPINE_C_API spine_array_bone spine_skeleton_get_bones(spine_skeleton self); +SPINE_C_API spine_array_update spine_skeleton_get_update_cache(spine_skeleton self); +SPINE_C_API spine_bone spine_skeleton_get_root_bone(spine_skeleton self); +SPINE_C_API spine_bone spine_skeleton_find_bone(spine_skeleton self, const char* boneName); +SPINE_C_API spine_array_slot spine_skeleton_get_slots(spine_skeleton self); +SPINE_C_API spine_slot spine_skeleton_find_slot(spine_skeleton self, const char* slotName); +SPINE_C_API spine_array_slot spine_skeleton_get_draw_order(spine_skeleton self); +SPINE_C_API spine_skin spine_skeleton_get_skin(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_skin_1(spine_skeleton self, const char* skinName); +SPINE_C_API void spine_skeleton_set_skin_2(spine_skeleton self, spine_skin newSkin); +SPINE_C_API spine_attachment spine_skeleton_get_attachment_1(spine_skeleton self, const char* slotName, const char* attachmentName); +SPINE_C_API spine_attachment spine_skeleton_get_attachment_2(spine_skeleton self, int slotIndex, const char* attachmentName); +SPINE_C_API void spine_skeleton_set_attachment(spine_skeleton self, const char* slotName, const char* attachmentName); +SPINE_C_API spine_array_constraint spine_skeleton_get_constraints(spine_skeleton self); +SPINE_C_API spine_array_physics_constraint spine_skeleton_get_physics_constraints(spine_skeleton self); +SPINE_C_API void spine_skeleton_get_bounds_1(spine_skeleton self, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer); +SPINE_C_API void spine_skeleton_get_bounds_2(spine_skeleton self, float* outX, float* outY, float* outWidth, float* outHeight, spine_array_float outVertexBuffer, spine_skeleton_clipping clipper); +SPINE_C_API spine_color spine_skeleton_get_color(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_color_1(spine_skeleton self, spine_color color); +SPINE_C_API void spine_skeleton_set_color_2(spine_skeleton self, float r, float g, float b, float a); +SPINE_C_API float spine_skeleton_get_scale_x(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_scale_x(spine_skeleton self, float inValue); +SPINE_C_API float spine_skeleton_get_scale_y(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_scale_y(spine_skeleton self, float inValue); +SPINE_C_API void spine_skeleton_set_scale(spine_skeleton self, float scaleX, float scaleY); +SPINE_C_API float spine_skeleton_get_x(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_x(spine_skeleton self, float inValue); +SPINE_C_API float spine_skeleton_get_y(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_y(spine_skeleton self, float inValue); +SPINE_C_API void spine_skeleton_set_position(spine_skeleton self, float x, float y); +SPINE_C_API float spine_skeleton_get_wind_x(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_wind_x(spine_skeleton self, float windX); +SPINE_C_API float spine_skeleton_get_wind_y(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_wind_y(spine_skeleton self, float windY); +SPINE_C_API float spine_skeleton_get_gravity_x(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_gravity_x(spine_skeleton self, float gravityX); +SPINE_C_API float spine_skeleton_get_gravity_y(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_gravity_y(spine_skeleton self, float gravityY); +SPINE_C_API void spine_skeleton_physics_translate(spine_skeleton self, float x, float y); +SPINE_C_API void spine_skeleton_physics_rotate(spine_skeleton self, float x, float y, float degrees); +SPINE_C_API float spine_skeleton_get_time(spine_skeleton self); +SPINE_C_API void spine_skeleton_set_time(spine_skeleton self, float time); +SPINE_C_API void spine_skeleton_update(spine_skeleton self, float delta); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETON_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_binary.cpp b/spine-c-new/src/generated/skeleton_binary.cpp index 0c955a3d9..d7f49ed5e 100644 --- a/spine-c-new/src/generated/skeleton_binary.cpp +++ b/spine-c-new/src/generated/skeleton_binary.cpp @@ -1,72 +1,32 @@ -/****************************************************************************** - * 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 "skeleton_binary.h" #include using namespace spine; spine_skeleton_binary spine_skeleton_binary_create(spine_atlas atlas) { - SkeletonBinary *obj = new (__FILE__, __LINE__) SkeletonBinary((Atlas *) atlas); - return (spine_skeleton_binary) obj; + return (spine_skeleton_binary) new (__FILE__, __LINE__) SkeletonBinary((Atlas *)atlas); } -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; +spine_skeleton_binary spine_skeleton_binary_create2(spine_attachment_loader attachmentLoader, bool ownsLoader) { + return (spine_skeleton_binary) new (__FILE__, __LINE__) SkeletonBinary((AttachmentLoader *)attachmentLoader, ownsLoader); } -void spine_skeleton_binary_dispose(spine_skeleton_binary obj) { - if (!obj) return; - delete (SkeletonBinary *) obj; +void spine_skeleton_binary_dispose(spine_skeleton_binary self) { + delete (SkeletonBinary*)self; } -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(spine_skeleton_binary self, const unsigned char * binary, int length) { + return (spine_skeleton_data)((SkeletonBinary*)self)->readSkeletonData(binary, length); } -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)); +spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary self, const char* path) { + return (spine_skeleton_data)((SkeletonBinary*)self)->readSkeletonDataFile(*((const String*)path)); } -void spine_skeleton_binary_set_scale(spine_skeleton_binary obj, float value) { - if (!obj) return; - SkeletonBinary *_obj = (SkeletonBinary *) obj; - _obj->setScale(value); +void spine_skeleton_binary_set_scale(spine_skeleton_binary self, float scale) { + ((SkeletonBinary*)self)->setScale(scale); } -const char* spine_skeleton_binary_get_error(spine_skeleton_binary obj) { - if (!obj) return nullptr; - SkeletonBinary *_obj = (SkeletonBinary *) obj; - return (const char *) _obj->getError().buffer(); +const char* spine_skeleton_binary_get_error(spine_skeleton_binary self) { + return (const char*)&((SkeletonBinary*)self)->getError(); } diff --git a/spine-c-new/src/generated/skeleton_binary.h b/spine-c-new/src/generated/skeleton_binary.h index d4395a4d1..57c600194 100644 --- a/spine-c-new/src/generated/skeleton_binary.h +++ b/spine-c-new/src/generated/skeleton_binary.h @@ -1,51 +1,25 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_BINARY_H +#define SPINE_SPINE_SKELETON_BINARY_H -#ifndef SPINE_C_SKELETONBINARY_H -#define SPINE_C_SKELETONBINARY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton_binary spine_skeleton_binary_create(spine_atlas atlas); +SPINE_C_API spine_skeleton_binary spine_skeleton_binary_create2(spine_attachment_loader attachmentLoader, bool ownsLoader); -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, 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, 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 char* spine_skeleton_binary_get_error(spine_skeleton_binary obj); +SPINE_C_API void spine_skeleton_binary_dispose(spine_skeleton_binary self); + +SPINE_C_API spine_skeleton_data spine_skeleton_binary_read_skeleton_data(spine_skeleton_binary self, const unsigned char * binary, int length); +SPINE_C_API spine_skeleton_data spine_skeleton_binary_read_skeleton_data_file(spine_skeleton_binary self, const char* path); +SPINE_C_API void spine_skeleton_binary_set_scale(spine_skeleton_binary self, float scale); +SPINE_C_API const char* spine_skeleton_binary_get_error(spine_skeleton_binary self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETONBINARY_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_BINARY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_bounds.cpp b/spine-c-new/src/generated/skeleton_bounds.cpp index 9292fcfba..935780efb 100644 --- a/spine-c-new/src/generated/skeleton_bounds.cpp +++ b/spine-c-new/src/generated/skeleton_bounds.cpp @@ -1,163 +1,84 @@ -/****************************************************************************** - * 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 "skeleton_bounds.h" #include using namespace spine; spine_skeleton_bounds spine_skeleton_bounds_create(void) { - SkeletonBounds *obj = new (__FILE__, __LINE__) SkeletonBounds(); - return (spine_skeleton_bounds) obj; + return (spine_skeleton_bounds) new (__FILE__, __LINE__) SkeletonBounds(); } -void spine_skeleton_bounds_dispose(spine_skeleton_bounds obj) { - if (!obj) return; - delete (SkeletonBounds *) obj; +void spine_skeleton_bounds_dispose(spine_skeleton_bounds self) { + delete (SkeletonBounds*)self; } -void spine_skeleton_bounds_update(spine_skeleton_bounds obj, spine_skeleton skeleton, bool updateAabb) { - if (!obj) return ; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - _obj->update(*(Skeleton*) skeleton, updateAabb); +void spine_skeleton_bounds_update(spine_skeleton_bounds self, spine_skeleton skeleton, bool updateAabb) { + ((SkeletonBounds*)self)->update(*((Skeleton*)skeleton), updateAabb); } -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); +bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds self, float x, float y) { + return ((SkeletonBounds*)self)->aabbContainsPoint(x, y); } -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); +bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds self, float x1, float y1, float x2, float y2) { + return ((SkeletonBounds*)self)->aabbIntersectsSegment(x1, y1, x2, y2); } -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(*(SkeletonBounds*) bounds); +bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds self, spine_skeleton_bounds bounds) { + return ((SkeletonBounds*)self)->aabbIntersectsSkeleton(*((SkeletonBounds*)bounds)); } -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); +bool spine_skeleton_bounds_contains_point_1(spine_skeleton_bounds self, spine_polygon polygon, float x, float y) { + return ((SkeletonBounds*)self)->containsPoint((Polygon *)polygon, x, y); } -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_contains_point_2(spine_skeleton_bounds self, float x, float y) { + return (spine_bounding_box_attachment)((SkeletonBounds*)self)->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 (spine_bounding_box_attachment) 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (spine_bounding_box_attachment) _obj->intersectsSegment(x1, y1, x2, y2); +spine_bounding_box_attachment spine_skeleton_bounds_intersects_segment_1(spine_skeleton_bounds self, float x1, float y1, float x2, float y2) { + return (spine_bounding_box_attachment)((SkeletonBounds*)self)->intersectsSegment(x1, y1, x2, y2); } -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); +bool spine_skeleton_bounds_intersects_segment_2(spine_skeleton_bounds self, spine_polygon polygon, float x1, float y1, float x2, float y2) { + return ((SkeletonBounds*)self)->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 (spine_polygon) 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (spine_polygon) _obj->getPolygon((BoundingBoxAttachment *) attachment); +spine_polygon spine_skeleton_bounds_get_polygon(spine_skeleton_bounds self, spine_bounding_box_attachment attachment) { + return (spine_polygon)((SkeletonBounds*)self)->getPolygon((BoundingBoxAttachment *)attachment); } -spine_bounding_box_attachment spine_skeleton_bounds_get_bounding_box(spine_skeleton_bounds obj, spine_polygon polygon) { - if (!obj) return (spine_bounding_box_attachment) 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (spine_bounding_box_attachment) _obj->getBoundingBox((Polygon *) polygon); +spine_bounding_box_attachment spine_skeleton_bounds_get_bounding_box(spine_skeleton_bounds self, spine_polygon polygon) { + return (spine_bounding_box_attachment)((SkeletonBounds*)self)->getBoundingBox((Polygon *)polygon); } -int32_t spine_skeleton_bounds_get_num_polygons(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (int32_t) _obj->getPolygons().size(); +spine_array_polygon spine_skeleton_bounds_get_polygons(spine_skeleton_bounds self) { + return (spine_array_polygon)&((SkeletonBounds*)self)->getPolygons(); } -spine_polygon *spine_skeleton_bounds_get_polygons(spine_skeleton_bounds obj) { - if (!obj) return nullptr; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (spine_polygon *) _obj->getPolygons().buffer(); +spine_array_bounding_box_attachment spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds self) { + return (spine_array_bounding_box_attachment)&((SkeletonBounds*)self)->getBoundingBoxes(); } -int32_t spine_skeleton_bounds_get_num_bounding_boxes(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (int32_t) _obj->getBoundingBoxes().size(); +float spine_skeleton_bounds_get_min_x(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getMinX(); } -spine_bounding_box_attachment *spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds obj) { - if (!obj) return nullptr; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return (spine_bounding_box_attachment *) _obj->getBoundingBoxes().buffer(); +float spine_skeleton_bounds_get_min_y(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getMinY(); } -float spine_skeleton_bounds_get_min_x(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getMinX(); +float spine_skeleton_bounds_get_max_x(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getMaxX(); } -float spine_skeleton_bounds_get_min_y(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getMinY(); +float spine_skeleton_bounds_get_max_y(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getMaxY(); } -float spine_skeleton_bounds_get_max_x(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getMaxX(); +float spine_skeleton_bounds_get_width(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getWidth(); } -float spine_skeleton_bounds_get_max_y(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getMaxY(); -} - -float spine_skeleton_bounds_get_width(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getWidth(); -} - -float spine_skeleton_bounds_get_height(spine_skeleton_bounds obj) { - if (!obj) return 0; - SkeletonBounds *_obj = (SkeletonBounds *) obj; - return _obj->getHeight(); +float spine_skeleton_bounds_get_height(spine_skeleton_bounds self) { + return ((SkeletonBounds*)self)->getHeight(); } diff --git a/spine-c-new/src/generated/skeleton_bounds.h b/spine-c-new/src/generated/skeleton_bounds.h index 57c49e02d..5da7a3595 100644 --- a/spine-c-new/src/generated/skeleton_bounds.h +++ b/spine-c-new/src/generated/skeleton_bounds.h @@ -1,66 +1,38 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_BOUNDS_H +#define SPINE_SPINE_SKELETON_BOUNDS_H -#ifndef SPINE_C_SKELETONBOUNDS_H -#define SPINE_C_SKELETONBOUNDS_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton_bounds spine_skeleton_bounds_create(void); -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, 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 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 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 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); -SPINE_C_EXPORT float spine_skeleton_bounds_get_min_y(spine_skeleton_bounds obj); -SPINE_C_EXPORT float spine_skeleton_bounds_get_max_x(spine_skeleton_bounds obj); -SPINE_C_EXPORT float spine_skeleton_bounds_get_max_y(spine_skeleton_bounds obj); -SPINE_C_EXPORT float spine_skeleton_bounds_get_width(spine_skeleton_bounds obj); -SPINE_C_EXPORT float spine_skeleton_bounds_get_height(spine_skeleton_bounds obj); +SPINE_C_API void spine_skeleton_bounds_dispose(spine_skeleton_bounds self); + +SPINE_C_API void spine_skeleton_bounds_update(spine_skeleton_bounds self, spine_skeleton skeleton, bool updateAabb); +SPINE_C_API bool spine_skeleton_bounds_aabb_contains_point(spine_skeleton_bounds self, float x, float y); +SPINE_C_API bool spine_skeleton_bounds_aabb_intersects_segment(spine_skeleton_bounds self, float x1, float y1, float x2, float y2); +SPINE_C_API bool spine_skeleton_bounds_aabb_intersects_skeleton(spine_skeleton_bounds self, spine_skeleton_bounds bounds); +SPINE_C_API bool spine_skeleton_bounds_contains_point_1(spine_skeleton_bounds self, spine_polygon polygon, float x, float y); +SPINE_C_API spine_bounding_box_attachment spine_skeleton_bounds_contains_point_2(spine_skeleton_bounds self, float x, float y); +SPINE_C_API spine_bounding_box_attachment spine_skeleton_bounds_intersects_segment_1(spine_skeleton_bounds self, float x1, float y1, float x2, float y2); +SPINE_C_API bool spine_skeleton_bounds_intersects_segment_2(spine_skeleton_bounds self, spine_polygon polygon, float x1, float y1, float x2, float y2); +SPINE_C_API spine_polygon spine_skeleton_bounds_get_polygon(spine_skeleton_bounds self, spine_bounding_box_attachment attachment); +SPINE_C_API spine_bounding_box_attachment spine_skeleton_bounds_get_bounding_box(spine_skeleton_bounds self, spine_polygon polygon); +SPINE_C_API spine_array_polygon spine_skeleton_bounds_get_polygons(spine_skeleton_bounds self); +SPINE_C_API spine_array_bounding_box_attachment spine_skeleton_bounds_get_bounding_boxes(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_min_x(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_min_y(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_max_x(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_max_y(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_width(spine_skeleton_bounds self); +SPINE_C_API float spine_skeleton_bounds_get_height(spine_skeleton_bounds self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETONBOUNDS_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_BOUNDS_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_clipping.cpp b/spine-c-new/src/generated/skeleton_clipping.cpp new file mode 100644 index 000000000..34de6b394 --- /dev/null +++ b/spine-c-new/src/generated/skeleton_clipping.cpp @@ -0,0 +1,52 @@ +#include "skeleton_clipping.h" +#include + +using namespace spine; + +spine_skeleton_clipping spine_skeleton_clipping_create(void) { + return (spine_skeleton_clipping) new (__FILE__, __LINE__) SkeletonClipping(); +} + +void spine_skeleton_clipping_dispose(spine_skeleton_clipping self) { + delete (SkeletonClipping*)self; +} + +size_t spine_skeleton_clipping_clip_start(spine_skeleton_clipping self, spine_skeleton skeleton, spine_slot slot, spine_clipping_attachment clip) { + return ((SkeletonClipping*)self)->clipStart(*((Skeleton*)skeleton), *((Slot*)slot), (ClippingAttachment *)clip); +} + +void spine_skeleton_clipping_clip_end_1(spine_skeleton_clipping self, spine_slot slot) { + ((SkeletonClipping*)self)->clipEnd(*((Slot*)slot)); +} + +void spine_skeleton_clipping_clip_end_2(spine_skeleton_clipping self) { + ((SkeletonClipping*)self)->clipEnd(); +} + +bool spine_skeleton_clipping_clip_triangles_1(spine_skeleton_clipping self, float * vertices, unsigned short * triangles, size_t trianglesLength) { + return ((SkeletonClipping*)self)->clipTriangles(vertices, triangles, trianglesLength); +} + +bool spine_skeleton_clipping_clip_triangles_2(spine_skeleton_clipping self, float * vertices, unsigned short * triangles, size_t trianglesLength, float * uvs, size_t stride) { + return ((SkeletonClipping*)self)->clipTriangles(vertices, triangles, trianglesLength, uvs, stride); +} + +bool spine_skeleton_clipping_clip_triangles_3(spine_skeleton_clipping self, spine_array_float vertices, spine_array_unsigned_short triangles, spine_array_float uvs, size_t stride) { + return ((SkeletonClipping*)self)->clipTriangles(*((Array*)vertices), *((Array*)triangles), *((Array*)uvs), stride); +} + +bool spine_skeleton_clipping_is_clipping(spine_skeleton_clipping self) { + return ((SkeletonClipping*)self)->isClipping(); +} + +spine_array_float spine_skeleton_clipping_get_clipped_vertices(spine_skeleton_clipping self) { + return (spine_array_float)&((SkeletonClipping*)self)->getClippedVertices(); +} + +spine_array_unsigned_short spine_skeleton_clipping_get_clipped_triangles(spine_skeleton_clipping self) { + return (spine_array_unsigned_short)&((SkeletonClipping*)self)->getClippedTriangles(); +} + +spine_array_float spine_skeleton_clipping_get_clipped_u_vs(spine_skeleton_clipping self) { + return (spine_array_float)&((SkeletonClipping*)self)->getClippedUVs(); +} diff --git a/spine-c-new/src/generated/skeleton_clipping.h b/spine-c-new/src/generated/skeleton_clipping.h new file mode 100644 index 000000000..6a3cffcea --- /dev/null +++ b/spine-c-new/src/generated/skeleton_clipping.h @@ -0,0 +1,30 @@ +#ifndef SPINE_SPINE_SKELETON_CLIPPING_H +#define SPINE_SPINE_SKELETON_CLIPPING_H + +#include "../base.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SPINE_C_API spine_skeleton_clipping spine_skeleton_clipping_create(void); + +SPINE_C_API void spine_skeleton_clipping_dispose(spine_skeleton_clipping self); + +SPINE_C_API size_t spine_skeleton_clipping_clip_start(spine_skeleton_clipping self, spine_skeleton skeleton, spine_slot slot, spine_clipping_attachment clip); +SPINE_C_API void spine_skeleton_clipping_clip_end_1(spine_skeleton_clipping self, spine_slot slot); +SPINE_C_API void spine_skeleton_clipping_clip_end_2(spine_skeleton_clipping self); +SPINE_C_API bool spine_skeleton_clipping_clip_triangles_1(spine_skeleton_clipping self, float * vertices, unsigned short * triangles, size_t trianglesLength); +SPINE_C_API bool spine_skeleton_clipping_clip_triangles_2(spine_skeleton_clipping self, float * vertices, unsigned short * triangles, size_t trianglesLength, float * uvs, size_t stride); +SPINE_C_API bool spine_skeleton_clipping_clip_triangles_3(spine_skeleton_clipping self, spine_array_float vertices, spine_array_unsigned_short triangles, spine_array_float uvs, size_t stride); +SPINE_C_API bool spine_skeleton_clipping_is_clipping(spine_skeleton_clipping self); +SPINE_C_API spine_array_float spine_skeleton_clipping_get_clipped_vertices(spine_skeleton_clipping self); +SPINE_C_API spine_array_unsigned_short spine_skeleton_clipping_get_clipped_triangles(spine_skeleton_clipping self); +SPINE_C_API spine_array_float spine_skeleton_clipping_get_clipped_u_vs(spine_skeleton_clipping self); + +#ifdef __cplusplus +} +#endif + +#endif /* SPINE_SPINE_SKELETON_CLIPPING_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_data.cpp b/spine-c-new/src/generated/skeleton_data.cpp index e348988f1..5b248ecec 100644 --- a/spine-c-new/src/generated/skeleton_data.cpp +++ b/spine-c-new/src/generated/skeleton_data.cpp @@ -1,361 +1,184 @@ -/****************************************************************************** - * 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 "skeleton_data.h" #include using namespace spine; spine_skeleton_data spine_skeleton_data_create(void) { - SkeletonData *obj = new (__FILE__, __LINE__) SkeletonData(); - return (spine_skeleton_data) obj; + return (spine_skeleton_data) new (__FILE__, __LINE__) SkeletonData(); } -void spine_skeleton_data_dispose(spine_skeleton_data obj) { - if (!obj) return; - delete (SkeletonData *) obj; +void spine_skeleton_data_dispose(spine_skeleton_data self) { + delete (SkeletonData*)self; } -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_bone_data spine_skeleton_data_find_bone(spine_skeleton_data self, const char* boneName) { + return (spine_bone_data)((SkeletonData*)self)->findBone(*((const String*)boneName)); } -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_slot_data spine_skeleton_data_find_slot(spine_skeleton_data self, const char* slotName) { + return (spine_slot_data)((SkeletonData*)self)->findSlot(*((const String*)slotName)); } -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_skin spine_skeleton_data_find_skin(spine_skeleton_data self, const char* skinName) { + return (spine_skin)((SkeletonData*)self)->findSkin(*((const String*)skinName)); } -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_event_data) _obj->findEvent(String(eventDataName)); +spine_event_data spine_skeleton_data_find_event(spine_skeleton_data self, const char* eventDataName) { + return (spine_event_data)((SkeletonData*)self)->findEvent(*((const String*)eventDataName)); } -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_animation spine_skeleton_data_find_animation(spine_skeleton_data self, const char* animationName) { + return (spine_animation)((SkeletonData*)self)->findAnimation(*((const String*)animationName)); } -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_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data self, const char* constraintName) { + return (spine_ik_constraint_data)((SkeletonData*)self)->findIkConstraint(*((const String*)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_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data self, const char* constraintName) { + return (spine_transform_constraint_data)((SkeletonData*)self)->findTransformConstraint(*((const String*)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_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data self, const char* constraintName) { + return (spine_path_constraint_data)((SkeletonData*)self)->findPathConstraint(*((const String*)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)); +spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data self, const char* constraintName) { + return (spine_physics_constraint_data)((SkeletonData*)self)->findPhysicsConstraint(*((const String*)constraintName)); } -const char* spine_skeleton_data_get_name(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_skeleton_data_get_name(spine_skeleton_data self) { + return (const char*)&((SkeletonData*)self)->getName(); } -void spine_skeleton_data_set_name(spine_skeleton_data obj, const char* value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setName(String(value)); +void spine_skeleton_data_set_name(spine_skeleton_data self, const char* inValue) { + ((SkeletonData*)self)->setName(*((const String*)inValue)); } -int32_t spine_skeleton_data_get_num_bones(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_data spine_skeleton_data_get_bones(spine_skeleton_data self) { + return (spine_array_bone_data)&((SkeletonData*)self)->getBones(); } -spine_bone_data *spine_skeleton_data_get_bones(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_bone_data *) _obj->getBones().buffer(); +spine_array_slot_data spine_skeleton_data_get_slots(spine_skeleton_data self) { + return (spine_array_slot_data)&((SkeletonData*)self)->getSlots(); } -int32_t spine_skeleton_data_get_num_slots(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getSlots().size(); +spine_array_skin spine_skeleton_data_get_skins(spine_skeleton_data self) { + return (spine_array_skin)&((SkeletonData*)self)->getSkins(); } -spine_slot_data *spine_skeleton_data_get_slots(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_slot_data *) _obj->getSlots().buffer(); +spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data self) { + return (spine_skin)((SkeletonData*)self)->getDefaultSkin(); } -int32_t spine_skeleton_data_get_num_skins(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getSkins().size(); +void spine_skeleton_data_set_default_skin(spine_skeleton_data self, spine_skin inValue) { + ((SkeletonData*)self)->setDefaultSkin((Skin *)inValue); } -spine_skin *spine_skeleton_data_get_skins(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_skin *) _obj->getSkins().buffer(); +spine_array_event_data spine_skeleton_data_get_events(spine_skeleton_data self) { + return (spine_array_event_data)&((SkeletonData*)self)->getEvents(); } -spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data obj) { - if (!obj) return (spine_skin) 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_skin) _obj->getDefaultSkin(); +spine_array_animation spine_skeleton_data_get_animations(spine_skeleton_data self) { + return (spine_array_animation)&((SkeletonData*)self)->getAnimations(); } -void spine_skeleton_data_set_default_skin(spine_skeleton_data obj, spine_skin value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setDefaultSkin((Skin *) value); +spine_array_ik_constraint_data spine_skeleton_data_get_ik_constraints(spine_skeleton_data self) { + return (spine_array_ik_constraint_data)&((SkeletonData*)self)->getIkConstraints(); } -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_array_transform_constraint_data spine_skeleton_data_get_transform_constraints(spine_skeleton_data self) { + return (spine_array_transform_constraint_data)&((SkeletonData*)self)->getTransformConstraints(); } -spine_event_data *spine_skeleton_data_get_events(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_event_data *) _obj->getEvents().buffer(); +spine_array_path_constraint_data spine_skeleton_data_get_path_constraints(spine_skeleton_data self) { + return (spine_array_path_constraint_data)&((SkeletonData*)self)->getPathConstraints(); } -int32_t spine_skeleton_data_get_num_animations(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getAnimations().size(); +spine_array_physics_constraint_data spine_skeleton_data_get_physics_constraints(spine_skeleton_data self) { + return (spine_array_physics_constraint_data)&((SkeletonData*)self)->getPhysicsConstraints(); } -spine_animation *spine_skeleton_data_get_animations(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_animation *) _obj->getAnimations().buffer(); +spine_array_constraint_data spine_skeleton_data_get_constraints(spine_skeleton_data self) { + return (spine_array_constraint_data)&((SkeletonData*)self)->getConstraints(); } -int32_t spine_skeleton_data_get_num_ik_constraints(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getIkConstraints().size(); +float spine_skeleton_data_get_x(spine_skeleton_data self) { + return ((SkeletonData*)self)->getX(); } -spine_ik_constraint_data *spine_skeleton_data_get_ik_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_ik_constraint_data *) _obj->getIkConstraints().buffer(); +void spine_skeleton_data_set_x(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setX(inValue); } -int32_t spine_skeleton_data_get_num_transform_constraints(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getTransformConstraints().size(); +float spine_skeleton_data_get_y(spine_skeleton_data self) { + return ((SkeletonData*)self)->getY(); } -spine_transform_constraint_data *spine_skeleton_data_get_transform_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_transform_constraint_data *) _obj->getTransformConstraints().buffer(); +void spine_skeleton_data_set_y(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setY(inValue); } -int32_t spine_skeleton_data_get_num_path_constraints(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getPathConstraints().size(); +float spine_skeleton_data_get_width(spine_skeleton_data self) { + return ((SkeletonData*)self)->getWidth(); } -spine_path_constraint_data *spine_skeleton_data_get_path_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_path_constraint_data *) _obj->getPathConstraints().buffer(); +void spine_skeleton_data_set_width(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setWidth(inValue); } -int32_t spine_skeleton_data_get_num_physics_constraints(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getPhysicsConstraints().size(); +float spine_skeleton_data_get_height(spine_skeleton_data self) { + return ((SkeletonData*)self)->getHeight(); } -spine_physics_constraint_data *spine_skeleton_data_get_physics_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_physics_constraint_data *) _obj->getPhysicsConstraints().buffer(); +void spine_skeleton_data_set_height(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setHeight(inValue); } -int32_t spine_skeleton_data_get_num_constraints(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return (int32_t) _obj->getConstraints().size(); +float spine_skeleton_data_get_reference_scale(spine_skeleton_data self) { + return ((SkeletonData*)self)->getReferenceScale(); } -spine_constraint_data *spine_skeleton_data_get_constraints(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (spine_constraint_data *) _obj->getConstraints().buffer(); +void spine_skeleton_data_set_reference_scale(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setReferenceScale(inValue); } -float spine_skeleton_data_get_x(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return _obj->getX(); +const char* spine_skeleton_data_get_version(spine_skeleton_data self) { + return (const char*)&((SkeletonData*)self)->getVersion(); } -void spine_skeleton_data_set_x(spine_skeleton_data obj, float value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setX(value); +void spine_skeleton_data_set_version(spine_skeleton_data self, const char* inValue) { + ((SkeletonData*)self)->setVersion(*((const String*)inValue)); } -float spine_skeleton_data_get_y(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return _obj->getY(); +const char* spine_skeleton_data_get_hash(spine_skeleton_data self) { + return (const char*)&((SkeletonData*)self)->getHash(); } -void spine_skeleton_data_set_y(spine_skeleton_data obj, float value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setY(value); +void spine_skeleton_data_set_hash(spine_skeleton_data self, const char* inValue) { + ((SkeletonData*)self)->setHash(*((const String*)inValue)); } -float spine_skeleton_data_get_width(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return _obj->getWidth(); +const char* spine_skeleton_data_get_images_path(spine_skeleton_data self) { + return (const char*)&((SkeletonData*)self)->getImagesPath(); } -void spine_skeleton_data_set_width(spine_skeleton_data obj, float value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setWidth(value); +void spine_skeleton_data_set_images_path(spine_skeleton_data self, const char* inValue) { + ((SkeletonData*)self)->setImagesPath(*((const String*)inValue)); } -float spine_skeleton_data_get_height(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return _obj->getHeight(); +const char* spine_skeleton_data_get_audio_path(spine_skeleton_data self) { + return (const char*)&((SkeletonData*)self)->getAudioPath(); } -void spine_skeleton_data_set_height(spine_skeleton_data obj, float value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setHeight(value); +void spine_skeleton_data_set_audio_path(spine_skeleton_data self, const char* inValue) { + ((SkeletonData*)self)->setAudioPath(*((const String*)inValue)); } -float spine_skeleton_data_get_reference_scale(spine_skeleton_data obj) { - if (!obj) return 0; - SkeletonData *_obj = (SkeletonData *) obj; - return _obj->getReferenceScale(); +float spine_skeleton_data_get_fps(spine_skeleton_data self) { + return ((SkeletonData*)self)->getFps(); } -void spine_skeleton_data_set_reference_scale(spine_skeleton_data obj, float value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setReferenceScale(value); -} - -const char* spine_skeleton_data_get_version(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (const char *) _obj->getVersion().buffer(); -} - -void spine_skeleton_data_set_version(spine_skeleton_data obj, const char* value) { - if (!obj) return; - SkeletonData *_obj = (SkeletonData *) obj; - _obj->setVersion(String(value)); -} - -const char* spine_skeleton_data_get_hash(spine_skeleton_data obj) { - if (!obj) return nullptr; - SkeletonData *_obj = (SkeletonData *) obj; - return (const char *) _obj->getHash().buffer(); -} - -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 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) { - if (!obj) return 0; - 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); +void spine_skeleton_data_set_fps(spine_skeleton_data self, float inValue) { + ((SkeletonData*)self)->setFps(inValue); } diff --git a/spine-c-new/src/generated/skeleton_data.h b/spine-c-new/src/generated/skeleton_data.h index 62270f0e4..84835a929 100644 --- a/spine-c-new/src/generated/skeleton_data.h +++ b/spine-c-new/src/generated/skeleton_data.h @@ -1,99 +1,63 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_DATA_H +#define SPINE_SPINE_SKELETON_DATA_H -#ifndef SPINE_C_SKELETONDATA_H -#define SPINE_C_SKELETONDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton_data spine_skeleton_data_create(void); -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 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 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 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 int32_t spine_skeleton_data_get_num_events(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 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 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 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 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 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); -SPINE_C_EXPORT void spine_skeleton_data_set_x(spine_skeleton_data obj, float value); -SPINE_C_EXPORT float spine_skeleton_data_get_y(spine_skeleton_data obj); -SPINE_C_EXPORT void spine_skeleton_data_set_y(spine_skeleton_data obj, float value); -SPINE_C_EXPORT float spine_skeleton_data_get_width(spine_skeleton_data obj); -SPINE_C_EXPORT void spine_skeleton_data_set_width(spine_skeleton_data obj, float value); -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 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); +SPINE_C_API void spine_skeleton_data_dispose(spine_skeleton_data self); + +SPINE_C_API spine_bone_data spine_skeleton_data_find_bone(spine_skeleton_data self, const char* boneName); +SPINE_C_API spine_slot_data spine_skeleton_data_find_slot(spine_skeleton_data self, const char* slotName); +SPINE_C_API spine_skin spine_skeleton_data_find_skin(spine_skeleton_data self, const char* skinName); +SPINE_C_API spine_event_data spine_skeleton_data_find_event(spine_skeleton_data self, const char* eventDataName); +SPINE_C_API spine_animation spine_skeleton_data_find_animation(spine_skeleton_data self, const char* animationName); +SPINE_C_API spine_ik_constraint_data spine_skeleton_data_find_ik_constraint(spine_skeleton_data self, const char* constraintName); +SPINE_C_API spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data self, const char* constraintName); +SPINE_C_API spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data self, const char* constraintName); +SPINE_C_API spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data self, const char* constraintName); +SPINE_C_API const char* spine_skeleton_data_get_name(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_name(spine_skeleton_data self, const char* inValue); +SPINE_C_API spine_array_bone_data spine_skeleton_data_get_bones(spine_skeleton_data self); +SPINE_C_API spine_array_slot_data spine_skeleton_data_get_slots(spine_skeleton_data self); +SPINE_C_API spine_array_skin spine_skeleton_data_get_skins(spine_skeleton_data self); +SPINE_C_API spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_default_skin(spine_skeleton_data self, spine_skin inValue); +SPINE_C_API spine_array_event_data spine_skeleton_data_get_events(spine_skeleton_data self); +SPINE_C_API spine_array_animation spine_skeleton_data_get_animations(spine_skeleton_data self); +SPINE_C_API spine_array_ik_constraint_data spine_skeleton_data_get_ik_constraints(spine_skeleton_data self); +SPINE_C_API spine_array_transform_constraint_data spine_skeleton_data_get_transform_constraints(spine_skeleton_data self); +SPINE_C_API spine_array_path_constraint_data spine_skeleton_data_get_path_constraints(spine_skeleton_data self); +SPINE_C_API spine_array_physics_constraint_data spine_skeleton_data_get_physics_constraints(spine_skeleton_data self); +SPINE_C_API spine_array_constraint_data spine_skeleton_data_get_constraints(spine_skeleton_data self); +SPINE_C_API float spine_skeleton_data_get_x(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_x(spine_skeleton_data self, float inValue); +SPINE_C_API float spine_skeleton_data_get_y(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_y(spine_skeleton_data self, float inValue); +SPINE_C_API float spine_skeleton_data_get_width(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_width(spine_skeleton_data self, float inValue); +SPINE_C_API float spine_skeleton_data_get_height(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_height(spine_skeleton_data self, float inValue); +SPINE_C_API float spine_skeleton_data_get_reference_scale(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_reference_scale(spine_skeleton_data self, float inValue); +SPINE_C_API const char* spine_skeleton_data_get_version(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_version(spine_skeleton_data self, const char* inValue); +SPINE_C_API const char* spine_skeleton_data_get_hash(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_hash(spine_skeleton_data self, const char* inValue); +SPINE_C_API const char* spine_skeleton_data_get_images_path(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_images_path(spine_skeleton_data self, const char* inValue); +SPINE_C_API const char* spine_skeleton_data_get_audio_path(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_audio_path(spine_skeleton_data self, const char* inValue); +SPINE_C_API float spine_skeleton_data_get_fps(spine_skeleton_data self); +SPINE_C_API void spine_skeleton_data_set_fps(spine_skeleton_data self, float inValue); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETONDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_json.cpp b/spine-c-new/src/generated/skeleton_json.cpp index a1838be9d..2d2a5c34e 100644 --- a/spine-c-new/src/generated/skeleton_json.cpp +++ b/spine-c-new/src/generated/skeleton_json.cpp @@ -1,72 +1,32 @@ -/****************************************************************************** - * 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 "skeleton_json.h" #include using namespace spine; spine_skeleton_json spine_skeleton_json_create(spine_atlas atlas) { - SkeletonJson *obj = new (__FILE__, __LINE__) SkeletonJson((Atlas *) atlas); - return (spine_skeleton_json) obj; + return (spine_skeleton_json) new (__FILE__, __LINE__) SkeletonJson((Atlas *)atlas); } -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; +spine_skeleton_json spine_skeleton_json_create2(spine_attachment_loader attachmentLoader, bool ownsLoader) { + return (spine_skeleton_json) new (__FILE__, __LINE__) SkeletonJson((AttachmentLoader *)attachmentLoader, ownsLoader); } -void spine_skeleton_json_dispose(spine_skeleton_json obj) { - if (!obj) return; - delete (SkeletonJson *) obj; +void spine_skeleton_json_dispose(spine_skeleton_json self) { + delete (SkeletonJson*)self; } -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_file(spine_skeleton_json self, const char* path) { + return (spine_skeleton_data)((SkeletonJson*)self)->readSkeletonDataFile(*((const String*)path)); } -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); +spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json self, const char * json) { + return (spine_skeleton_data)((SkeletonJson*)self)->readSkeletonData(json); } -void spine_skeleton_json_set_scale(spine_skeleton_json obj, float value) { - if (!obj) return; - SkeletonJson *_obj = (SkeletonJson *) obj; - _obj->setScale(value); +void spine_skeleton_json_set_scale(spine_skeleton_json self, float scale) { + ((SkeletonJson*)self)->setScale(scale); } -const char* spine_skeleton_json_get_error(spine_skeleton_json obj) { - if (!obj) return nullptr; - SkeletonJson *_obj = (SkeletonJson *) obj; - return (const char *) _obj->getError().buffer(); +const char* spine_skeleton_json_get_error(spine_skeleton_json self) { + return (const char*)&((SkeletonJson*)self)->getError(); } diff --git a/spine-c-new/src/generated/skeleton_json.h b/spine-c-new/src/generated/skeleton_json.h index 38f23aa3b..f8dbac933 100644 --- a/spine-c-new/src/generated/skeleton_json.h +++ b/spine-c-new/src/generated/skeleton_json.h @@ -1,51 +1,25 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_JSON_H +#define SPINE_SPINE_SKELETON_JSON_H -#ifndef SPINE_C_SKELETONJSON_H -#define SPINE_C_SKELETONJSON_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton_json spine_skeleton_json_create(spine_atlas atlas); +SPINE_C_API spine_skeleton_json spine_skeleton_json_create2(spine_attachment_loader attachmentLoader, bool ownsLoader); -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, 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 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 char* spine_skeleton_json_get_error(spine_skeleton_json obj); +SPINE_C_API void spine_skeleton_json_dispose(spine_skeleton_json self); + +SPINE_C_API spine_skeleton_data spine_skeleton_json_read_skeleton_data_file(spine_skeleton_json self, const char* path); +SPINE_C_API spine_skeleton_data spine_skeleton_json_read_skeleton_data(spine_skeleton_json self, const char * json); +SPINE_C_API void spine_skeleton_json_set_scale(spine_skeleton_json self, float scale); +SPINE_C_API const char* spine_skeleton_json_get_error(spine_skeleton_json self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETONJSON_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_JSON_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skeleton_renderer.cpp b/spine-c-new/src/generated/skeleton_renderer.cpp index ed9b5e72e..1b2670655 100644 --- a/spine-c-new/src/generated/skeleton_renderer.cpp +++ b/spine-c-new/src/generated/skeleton_renderer.cpp @@ -1,49 +1,16 @@ -/****************************************************************************** - * 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 "skeleton_renderer.h" #include using namespace spine; spine_skeleton_renderer spine_skeleton_renderer_create(void) { - SkeletonRenderer *obj = new (__FILE__, __LINE__) SkeletonRenderer(); - return (spine_skeleton_renderer) obj; + return (spine_skeleton_renderer) new (__FILE__, __LINE__) SkeletonRenderer(); } -void spine_skeleton_renderer_dispose(spine_skeleton_renderer obj) { - if (!obj) return; - delete (SkeletonRenderer *) obj; +void spine_skeleton_renderer_dispose(spine_skeleton_renderer self) { + delete (SkeletonRenderer*)self; } -spine_render_command spine_skeleton_renderer_render(spine_skeleton_renderer obj, spine_skeleton skeleton) { - if (!obj) return (spine_render_command) 0; - SkeletonRenderer *_obj = (SkeletonRenderer *) obj; - return (spine_render_command) _obj->render(*(Skeleton*) skeleton); +spine_render_command spine_skeleton_renderer_render(spine_skeleton_renderer self, spine_skeleton skeleton) { + return (spine_render_command)((SkeletonRenderer*)self)->render(*((Skeleton*)skeleton)); } diff --git a/spine-c-new/src/generated/skeleton_renderer.h b/spine-c-new/src/generated/skeleton_renderer.h index 0683792e2..0ebc5e4be 100644 --- a/spine-c-new/src/generated/skeleton_renderer.h +++ b/spine-c-new/src/generated/skeleton_renderer.h @@ -1,47 +1,21 @@ -/****************************************************************************** - * 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_SPINE_SKELETON_RENDERER_H +#define SPINE_SPINE_SKELETON_RENDERER_H -#ifndef SPINE_C_SKELETONRENDERER_H -#define SPINE_C_SKELETONRENDERER_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skeleton_renderer spine_skeleton_renderer_create(void); -SPINE_C_EXPORT spine_skeleton_renderer spine_skeleton_renderer_create(void); -SPINE_C_EXPORT void spine_skeleton_renderer_dispose(spine_skeleton_renderer obj); -SPINE_C_EXPORT spine_render_command spine_skeleton_renderer_render(spine_skeleton_renderer obj, spine_skeleton skeleton); +SPINE_C_API void spine_skeleton_renderer_dispose(spine_skeleton_renderer self); + +SPINE_C_API spine_render_command spine_skeleton_renderer_render(spine_skeleton_renderer self, spine_skeleton skeleton); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKELETONRENDERER_H \ No newline at end of file +#endif /* SPINE_SPINE_SKELETON_RENDERER_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/skin.cpp b/spine-c-new/src/generated/skin.cpp index e80b0a1f1..a995ec3a1 100644 --- a/spine-c-new/src/generated/skin.cpp +++ b/spine-c-new/src/generated/skin.cpp @@ -1,121 +1,52 @@ -/****************************************************************************** - * 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 "skin.h" #include using namespace spine; spine_skin spine_skin_create(const char* name) { - Skin *obj = new (__FILE__, __LINE__) Skin(String(name)); - return (spine_skin) obj; + return (spine_skin) new (__FILE__, __LINE__) Skin(*((const String*)name)); } -void spine_skin_dispose(spine_skin obj) { - if (!obj) return; - delete (Skin *) obj; +void spine_skin_dispose(spine_skin self) { + delete (Skin*)self; } -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); +void spine_skin_set_attachment(spine_skin self, size_t slotIndex, const char* name, spine_attachment attachment) { + ((Skin*)self)->setAttachment(slotIndex, *((const String*)name), (Attachment *)attachment); } -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)); +spine_attachment spine_skin_get_attachment(spine_skin self, size_t slotIndex, const char* name) { + return (spine_attachment)((Skin*)self)->getAttachment(slotIndex, *((const String*)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_remove_attachment(spine_skin self, size_t slotIndex, const char* name) { + ((Skin*)self)->removeAttachment(slotIndex, *((const String*)name)); } -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, (Array &) names); +void spine_skin_find_attachments_for_slot(spine_skin self, size_t slotIndex, spine_array_attachment attachments) { + ((Skin*)self)->findAttachmentsForSlot(slotIndex, *((Array*)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, (Array &) attachments); +const char* spine_skin_get_name(spine_skin self) { + return (const char*)&((Skin*)self)->getName(); } -const char* spine_skin_get_name(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return (const char *) _obj->getName().buffer(); +void spine_skin_add_skin(spine_skin self, spine_skin other) { + ((Skin*)self)->addSkin((Skin *)other); } -void spine_skin_add_skin(spine_skin obj, spine_skin other) { - if (!obj) return ; - Skin *_obj = (Skin *) obj; - _obj->addSkin((Skin *) other); +void spine_skin_copy_skin(spine_skin self, spine_skin other) { + ((Skin*)self)->copySkin((Skin *)other); } -void spine_skin_copy_skin(spine_skin obj, spine_skin other) { - if (!obj) return ; - Skin *_obj = (Skin *) obj; - _obj->copySkin((Skin *) other); +spine_array_bone_data spine_skin_get_bones(spine_skin self) { + return (spine_array_bone_data)&((Skin*)self)->getBones(); } -int32_t spine_skin_get_num_bones(spine_skin obj) { - if (!obj) return 0; - Skin *_obj = (Skin *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_constraint_data spine_skin_get_constraints(spine_skin self) { + return (spine_array_constraint_data)&((Skin*)self)->getConstraints(); } -spine_bone_data *spine_skin_get_bones(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return (spine_bone_data *) _obj->getBones().buffer(); -} - -int32_t spine_skin_get_num_constraints(spine_skin obj) { - if (!obj) return 0; - Skin *_obj = (Skin *) obj; - return (int32_t) _obj->getConstraints().size(); -} - -spine_constraint_data *spine_skin_get_constraints(spine_skin obj) { - if (!obj) return nullptr; - Skin *_obj = (Skin *) obj; - return (spine_constraint_data *) _obj->getConstraints().buffer(); -} - -spine_color spine_skin_get_color(spine_skin obj) { - if (!obj) return (spine_color) 0; - Skin *_obj = (Skin *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_skin_get_color(spine_skin self) { + return (spine_color)&((Skin*)self)->getColor(); } diff --git a/spine-c-new/src/generated/skin.h b/spine-c-new/src/generated/skin.h index e6888ba2f..7311b599c 100644 --- a/spine-c-new/src/generated/skin.h +++ b/spine-c-new/src/generated/skin.h @@ -1,59 +1,30 @@ -/****************************************************************************** - * 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_SPINE_SKIN_H +#define SPINE_SPINE_SKIN_H -#ifndef SPINE_C_SKIN_H -#define SPINE_C_SKIN_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_skin spine_skin_create(const char* 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, 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 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 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); +SPINE_C_API void spine_skin_dispose(spine_skin self); + +SPINE_C_API void spine_skin_set_attachment(spine_skin self, size_t slotIndex, const char* name, spine_attachment attachment); +SPINE_C_API spine_attachment spine_skin_get_attachment(spine_skin self, size_t slotIndex, const char* name); +SPINE_C_API void spine_skin_remove_attachment(spine_skin self, size_t slotIndex, const char* name); +SPINE_C_API void spine_skin_find_attachments_for_slot(spine_skin self, size_t slotIndex, spine_array_attachment attachments); +SPINE_C_API const char* spine_skin_get_name(spine_skin self); +SPINE_C_API void spine_skin_add_skin(spine_skin self, spine_skin other); +SPINE_C_API void spine_skin_copy_skin(spine_skin self, spine_skin other); +SPINE_C_API spine_array_bone_data spine_skin_get_bones(spine_skin self); +SPINE_C_API spine_array_constraint_data spine_skin_get_constraints(spine_skin self); +SPINE_C_API spine_color spine_skin_get_color(spine_skin self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SKIN_H \ No newline at end of file +#endif /* SPINE_SPINE_SKIN_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slider.cpp b/spine-c-new/src/generated/slider.cpp index 5012c4cc2..7c96040f7 100644 --- a/spine-c-new/src/generated/slider.cpp +++ b/spine-c-new/src/generated/slider.cpp @@ -1,143 +1,76 @@ -/****************************************************************************** - * 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 "slider.h" #include using namespace spine; spine_slider spine_slider_create(spine_slider_data data, spine_skeleton skeleton) { - Slider *obj = new (__FILE__, __LINE__) Slider(*(SliderData*) data, *(Skeleton*) skeleton); - return (spine_slider) obj; + return (spine_slider) new (__FILE__, __LINE__) Slider(*((SliderData*)data), *((Skeleton*)skeleton)); } -void spine_slider_dispose(spine_slider obj) { - if (!obj) return; - delete (Slider *) obj; +void spine_slider_dispose(spine_slider self) { + delete (Slider*)self; } -spine_rtti spine_slider_get_rtti() { - return (spine_rtti) &Slider::rtti; +spine_rtti spine_slider_get_rtti(spine_slider self) { + return (spine_rtti)&((Slider*)self)->getRTTI(); } -spine_slider spine_slider_copy(spine_slider obj, spine_skeleton skeleton) { - if (!obj) return (spine_slider) 0; - Slider *_obj = (Slider *) obj; - return (spine_slider) _obj->copy(*(Skeleton*) skeleton); +spine_slider spine_slider_copy(spine_slider self, spine_skeleton skeleton) { + return (spine_slider)((Slider*)self)->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*) skeleton, (Physics) physics); +void spine_slider_update(spine_slider self, spine_skeleton skeleton, spine_physics physics) { + ((Slider*)self)->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*) skeleton); +void spine_slider_sort(spine_slider self, spine_skeleton skeleton) { + ((Slider*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_slider_is_source_active(spine_slider obj) { - if (!obj) return false; - Slider *_obj = (Slider *) obj; - return _obj->isSourceActive(); +bool spine_slider_is_source_active(spine_slider self) { + return ((Slider*)self)->isSourceActive(); } -spine_bone spine_slider_get_bone(spine_slider obj) { - if (!obj) return (spine_bone) 0; - Slider *_obj = (Slider *) obj; - return (spine_bone) _obj->getBone(); +spine_bone spine_slider_get_bone(spine_slider self) { + return (spine_bone)((Slider*)self)->getBone(); } -void spine_slider_set_bone(spine_slider obj, spine_bone value) { - if (!obj) return; - Slider *_obj = (Slider *) obj; - _obj->setBone((Bone *) value); +void spine_slider_set_bone(spine_slider self, spine_bone bone) { + ((Slider*)self)->setBone((Bone *)bone); } -spine_constraint_data spine_slider_get_data(spine_slider obj) { - if (!obj) return 0; - Slider *_obj = (Slider *) obj; - return (spine_constraint_data) &_obj->getData(); +spine_constraint_data spine_slider_get_data(spine_slider self) { + return (spine_constraint_data)&((ConstraintGeneric*)(Slider*)self)->getData(); } -void spine_slider_pose(spine_slider obj) { - if (!obj) return ; - Slider *_obj = (Slider *) obj; - _obj->pose(); +spine_slider_pose spine_slider_get_pose(spine_slider self) { + return (spine_slider_pose)&((ConstraintGeneric*)(Slider*)self)->getPose(); } -void spine_slider_setup_pose(spine_slider obj) { - if (!obj) return ; - Slider *_obj = (Slider *) obj; - _obj->setupPose(); +spine_slider_pose spine_slider_get_applied_pose(spine_slider self) { + return (spine_slider_pose)&((ConstraintGeneric*)(Slider*)self)->getAppliedPose(); } -spine_slider_pose spine_slider_get_pose(spine_slider obj) { - if (!obj) return (spine_slider_pose) 0; - Slider *_obj = (Slider *) obj; - return (spine_slider_pose) &_obj->getPose(); +void spine_slider_reset_constrained(spine_slider self) { + ((ConstraintGeneric*)(Slider*)self)->resetConstrained(); } -spine_slider_pose spine_slider_get_applied_pose(spine_slider obj) { - if (!obj) return (spine_slider_pose) 0; - Slider *_obj = (Slider *) obj; - return (spine_slider_pose) &_obj->getAppliedPose(); +void spine_slider_constrained(spine_slider self) { + ((ConstraintGeneric*)(Slider*)self)->constrained(); } -void spine_slider_reset_constrained(spine_slider obj) { - if (!obj) return ; - Slider *_obj = (Slider *) obj; - _obj->resetConstrained(); +bool spine_slider_is_pose_equal_to_applied(spine_slider self) { + return ((ConstraintGeneric*)(Slider*)self)->isPoseEqualToApplied(); } -void spine_slider_constrained(spine_slider obj) { - if (!obj) return ; - Slider *_obj = (Slider *) obj; - _obj->constrained(); +bool spine_slider_is_active(spine_slider self) { + return ((ConstraintGeneric*)(Slider*)self)->isActive(); } -bool spine_slider_is_pose_equal_to_applied(spine_slider obj) { - if (!obj) return false; - Slider *_obj = (Slider *) obj; - return _obj->isPoseEqualToApplied(); +void spine_slider_set_active(spine_slider self, bool active) { + ((ConstraintGeneric*)(Slider*)self)->setActive(active); } -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, bool value) { - if (!obj) return; - Slider *_obj = (Slider *) obj; - _obj->setActive(value); +spine_rtti spine_slider_rtti(void) { + return (spine_rtti)&Slider::rtti; } diff --git a/spine-c-new/src/generated/slider.h b/spine-c-new/src/generated/slider.h index 220ae4c91..88bfc3999 100644 --- a/spine-c-new/src/generated/slider.h +++ b/spine-c-new/src/generated/slider.h @@ -1,63 +1,36 @@ -/****************************************************************************** - * 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_SPINE_SLIDER_H +#define SPINE_SPINE_SLIDER_H -#ifndef SPINE_C_SLIDER_H -#define SPINE_C_SLIDER_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slider spine_slider_create(spine_slider_data data, spine_skeleton skeleton); -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_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 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); -SPINE_C_EXPORT void spine_slider_pose(spine_slider obj); -SPINE_C_EXPORT void spine_slider_setup_pose(spine_slider obj); -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 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); +SPINE_C_API void spine_slider_dispose(spine_slider self); + +SPINE_C_API spine_rtti spine_slider_get_rtti(spine_slider self); +SPINE_C_API spine_slider spine_slider_copy(spine_slider self, spine_skeleton skeleton); +SPINE_C_API void spine_slider_update(spine_slider self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_slider_sort(spine_slider self, spine_skeleton skeleton); +SPINE_C_API bool spine_slider_is_source_active(spine_slider self); +SPINE_C_API spine_bone spine_slider_get_bone(spine_slider self); +SPINE_C_API void spine_slider_set_bone(spine_slider self, spine_bone bone); +SPINE_C_API spine_constraint_data spine_slider_get_data(spine_slider self); +SPINE_C_API spine_slider_pose spine_slider_get_pose(spine_slider self); +SPINE_C_API spine_slider_pose spine_slider_get_applied_pose(spine_slider self); +SPINE_C_API void spine_slider_reset_constrained(spine_slider self); +SPINE_C_API void spine_slider_constrained(spine_slider self); +SPINE_C_API bool spine_slider_is_pose_equal_to_applied(spine_slider self); +SPINE_C_API bool spine_slider_is_active(spine_slider self); +SPINE_C_API void spine_slider_set_active(spine_slider self, bool active); +SPINE_C_API spine_rtti spine_slider_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLIDER_H \ No newline at end of file +#endif /* SPINE_SPINE_SLIDER_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slider_data.cpp b/spine-c-new/src/generated/slider_data.cpp index 7ce1e2ca3..70aa53f4b 100644 --- a/spine-c-new/src/generated/slider_data.cpp +++ b/spine-c-new/src/generated/slider_data.cpp @@ -1,167 +1,104 @@ -/****************************************************************************** - * 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 "slider_data.h" #include using namespace spine; spine_slider_data spine_slider_data_create(const char* name) { - SliderData *obj = new (__FILE__, __LINE__) SliderData(String(name)); - return (spine_slider_data) obj; + return (spine_slider_data) new (__FILE__, __LINE__) SliderData(*((const String*)name)); } -void spine_slider_data_dispose(spine_slider_data obj) { - if (!obj) return; - delete (SliderData *) obj; +void spine_slider_data_dispose(spine_slider_data self) { + delete (SliderData*)self; } -spine_rtti spine_slider_data_get_rtti() { - return (spine_rtti) &SliderData::rtti; +spine_rtti spine_slider_data_get_rtti(spine_slider_data self) { + return (spine_rtti)&((SliderData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_slider_data_create_method(spine_slider_data self, spine_skeleton skeleton) { + return (spine_constraint)((SliderData*)self)->create(*((Skeleton*)skeleton)); } -spine_animation spine_slider_data_get_animation(spine_slider_data obj) { - if (!obj) return (spine_animation) 0; - SliderData *_obj = (SliderData *) obj; - return (spine_animation) _obj->getAnimation(); +spine_animation spine_slider_data_get_animation(spine_slider_data self) { + return (spine_animation)((SliderData*)self)->getAnimation(); } -void spine_slider_data_set_animation(spine_slider_data obj, spine_animation value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setAnimation((Animation *) value); +void spine_slider_data_set_animation(spine_slider_data self, spine_animation animation) { + ((SliderData*)self)->setAnimation((Animation *)animation); } -bool spine_slider_data_get_additive(spine_slider_data obj) { - if (!obj) return false; - SliderData *_obj = (SliderData *) obj; - return _obj->getAdditive(); +bool spine_slider_data_get_additive(spine_slider_data self) { + return ((SliderData*)self)->getAdditive(); } -void spine_slider_data_set_additive(spine_slider_data obj, bool value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setAdditive(value); +void spine_slider_data_set_additive(spine_slider_data self, bool additive) { + ((SliderData*)self)->setAdditive(additive); } -bool spine_slider_data_get_loop(spine_slider_data obj) { - if (!obj) return false; - SliderData *_obj = (SliderData *) obj; - return _obj->getLoop(); +bool spine_slider_data_get_loop(spine_slider_data self) { + return ((SliderData*)self)->getLoop(); } -void spine_slider_data_set_loop(spine_slider_data obj, bool value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setLoop(value); +void spine_slider_data_set_loop(spine_slider_data self, bool loop) { + ((SliderData*)self)->setLoop(loop); } -spine_bone_data spine_slider_data_get_bone(spine_slider_data obj) { - if (!obj) return (spine_bone_data) 0; - SliderData *_obj = (SliderData *) obj; - return (spine_bone_data) _obj->getBone(); +spine_bone_data spine_slider_data_get_bone(spine_slider_data self) { + return (spine_bone_data)((SliderData*)self)->getBone(); } -void spine_slider_data_set_bone(spine_slider_data obj, spine_bone_data value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setBone((BoneData *) value); +void spine_slider_data_set_bone(spine_slider_data self, spine_bone_data bone) { + ((SliderData*)self)->setBone((BoneData *)bone); } -spine_from_property spine_slider_data_get_property(spine_slider_data obj) { - if (!obj) return (spine_from_property) 0; - SliderData *_obj = (SliderData *) obj; - return (spine_from_property) _obj->getProperty(); +spine_from_property spine_slider_data_get_property(spine_slider_data self) { + return (spine_from_property)((SliderData*)self)->getProperty(); } -void spine_slider_data_set_property(spine_slider_data obj, spine_from_property value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setProperty((FromProperty *) value); +void spine_slider_data_set_property(spine_slider_data self, spine_from_property property) { + ((SliderData*)self)->setProperty((FromProperty *)property); } -float spine_slider_data_get_scale(spine_slider_data obj) { - if (!obj) return 0; - SliderData *_obj = (SliderData *) obj; - return _obj->getScale(); +float spine_slider_data_get_scale(spine_slider_data self) { + return ((SliderData*)self)->getScale(); } -void spine_slider_data_set_scale(spine_slider_data obj, float value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setScale(value); +void spine_slider_data_set_scale(spine_slider_data self, float scale) { + ((SliderData*)self)->setScale(scale); } -float spine_slider_data_get_offset(spine_slider_data obj) { - if (!obj) return 0; - SliderData *_obj = (SliderData *) obj; - return _obj->getOffset(); +float spine_slider_data_get_offset(spine_slider_data self) { + return ((SliderData*)self)->getOffset(); } -void spine_slider_data_set_offset(spine_slider_data obj, float value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setOffset(value); +void spine_slider_data_set_offset(spine_slider_data self, float offset) { + ((SliderData*)self)->setOffset(offset); } -bool spine_slider_data_get_local(spine_slider_data obj) { - if (!obj) return false; - SliderData *_obj = (SliderData *) obj; - return _obj->getLocal(); +bool spine_slider_data_get_local(spine_slider_data self) { + return ((SliderData*)self)->getLocal(); } -void spine_slider_data_set_local(spine_slider_data obj, bool value) { - if (!obj) return; - SliderData *_obj = (SliderData *) obj; - _obj->setLocal(value); +void spine_slider_data_set_local(spine_slider_data self, bool local) { + ((SliderData*)self)->setLocal(local); } -const char* spine_slider_data_get_name(spine_slider_data obj) { - if (!obj) return nullptr; - SliderData *_obj = (SliderData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_slider_data_get_name(spine_slider_data self) { + return (const char*)&((ConstraintDataGeneric*)(SliderData*)self)->getName(); } -bool spine_slider_data_is_skin_required(spine_slider_data obj) { - if (!obj) return false; - SliderData *_obj = (SliderData *) obj; - return _obj->isSkinRequired(); +bool spine_slider_data_is_skin_required(spine_slider_data self) { + return ((ConstraintDataGeneric*)(SliderData*)self)->isSkinRequired(); } -spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data obj) { - if (!obj) return (spine_slider_pose) 0; - SliderData *_obj = (SliderData *) obj; - return (spine_slider_pose) &_obj->getSetupPose(); +spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data self) { + return (spine_slider_pose)&((ConstraintDataGeneric*)(SliderData*)self)->getSetupPose(); +} + +void spine_slider_data_set_skin_required(spine_slider_data self, bool skinRequired) { + ((ConstraintDataGeneric*)(SliderData*)self)->setSkinRequired(skinRequired); +} + +spine_rtti spine_slider_data_rtti(void) { + return (spine_rtti)&SliderData::rtti; } diff --git a/spine-c-new/src/generated/slider_data.h b/spine-c-new/src/generated/slider_data.h index fd3f9233b..f72af0c97 100644 --- a/spine-c-new/src/generated/slider_data.h +++ b/spine-c-new/src/generated/slider_data.h @@ -1,67 +1,43 @@ -/****************************************************************************** - * 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_SPINE_SLIDER_DATA_H +#define SPINE_SPINE_SLIDER_DATA_H -#ifndef SPINE_C_SLIDERDATA_H -#define SPINE_C_SLIDERDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slider_data spine_slider_data_create(const char* 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_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 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); -SPINE_C_EXPORT void spine_slider_data_set_property(spine_slider_data obj, spine_from_property value); -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 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); +SPINE_C_API void spine_slider_data_dispose(spine_slider_data self); + +SPINE_C_API spine_rtti spine_slider_data_get_rtti(spine_slider_data self); +SPINE_C_API spine_constraint spine_slider_data_create_method(spine_slider_data self, spine_skeleton skeleton); +SPINE_C_API spine_animation spine_slider_data_get_animation(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_animation(spine_slider_data self, spine_animation animation); +SPINE_C_API bool spine_slider_data_get_additive(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_additive(spine_slider_data self, bool additive); +SPINE_C_API bool spine_slider_data_get_loop(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_loop(spine_slider_data self, bool loop); +SPINE_C_API spine_bone_data spine_slider_data_get_bone(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_bone(spine_slider_data self, spine_bone_data bone); +SPINE_C_API spine_from_property spine_slider_data_get_property(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_property(spine_slider_data self, spine_from_property property); +SPINE_C_API float spine_slider_data_get_scale(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_scale(spine_slider_data self, float scale); +SPINE_C_API float spine_slider_data_get_offset(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_offset(spine_slider_data self, float offset); +SPINE_C_API bool spine_slider_data_get_local(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_local(spine_slider_data self, bool local); +SPINE_C_API const char* spine_slider_data_get_name(spine_slider_data self); +SPINE_C_API bool spine_slider_data_is_skin_required(spine_slider_data self); +SPINE_C_API spine_slider_pose spine_slider_data_get_setup_pose(spine_slider_data self); +SPINE_C_API void spine_slider_data_set_skin_required(spine_slider_data self, bool skinRequired); +SPINE_C_API spine_rtti spine_slider_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLIDERDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_SLIDER_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slider_mix_timeline.cpp b/spine-c-new/src/generated/slider_mix_timeline.cpp index 4a260e0a3..a348e167b 100644 --- a/spine-c-new/src/generated/slider_mix_timeline.cpp +++ b/spine-c-new/src/generated/slider_mix_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "slider_mix_timeline.h" #include using namespace spine; 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; + return (spine_slider_mix_timeline) new (__FILE__, __LINE__) SliderMixTimeline(frameCount, bezierCount, sliderIndex); } -void spine_slider_mix_timeline_dispose(spine_slider_mix_timeline obj) { - if (!obj) return; - delete (SliderMixTimeline *) obj; +void spine_slider_mix_timeline_dispose(spine_slider_mix_timeline self) { + delete (SliderMixTimeline*)self; } -spine_rtti spine_slider_mix_timeline_get_rtti() { - return (spine_rtti) &SliderMixTimeline::rtti; +spine_rtti spine_slider_mix_timeline_get_rtti(spine_slider_mix_timeline self) { + return (spine_rtti)&((SliderMixTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_slider_mix_timeline_apply(spine_slider_mix_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SliderMixTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline self, size_t frame, float time, float value) { + ((ConstraintTimeline1*)(SliderMixTimeline*)self)->setFrame(frame, time, value); } -float spine_slider_mix_timeline_get_curve_value(spine_slider_mix_timeline obj, float time) { - if (!obj) return 0; - SliderMixTimeline *_obj = (SliderMixTimeline *) obj; - return _obj->getCurveValue(time); +float spine_slider_mix_timeline_get_curve_value(spine_slider_mix_timeline self, float time) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_slider_mix_timeline_get_relative_value(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_slider_mix_timeline_get_absolute_value_1(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_slider_mix_timeline_get_absolute_value_2(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_slider_mix_timeline_get_scale_value(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_slider_mix_timeline self, size_t frame) { + ((ConstraintTimeline1*)(SliderMixTimeline*)self)->setLinear(frame); } -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); +void spine_slider_mix_timeline_set_stepped(spine_slider_mix_timeline self, size_t frame) { + ((ConstraintTimeline1*)(SliderMixTimeline*)self)->setStepped(frame); +} + +void spine_slider_mix_timeline_set_bezier(spine_slider_mix_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((ConstraintTimeline1*)(SliderMixTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_slider_mix_timeline_get_bezier_value(spine_slider_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_slider_mix_timeline_get_curves(spine_slider_mix_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(SliderMixTimeline*)self)->getCurves(); +} + +size_t spine_slider_mix_timeline_get_frame_entries(spine_slider_mix_timeline self) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getFrameEntries(); +} + +size_t spine_slider_mix_timeline_get_frame_count(spine_slider_mix_timeline self) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_slider_mix_timeline_get_frames(spine_slider_mix_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(SliderMixTimeline*)self)->getFrames(); +} + +float spine_slider_mix_timeline_get_duration(spine_slider_mix_timeline self) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_slider_mix_timeline_get_property_ids(spine_slider_mix_timeline self) { + return (spine_array_property_id)&((ConstraintTimeline1*)(SliderMixTimeline*)self)->getPropertyIds(); +} + +int spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline self) { + return ((ConstraintTimeline1*)(SliderMixTimeline*)self)->getConstraintIndex(); +} + +void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline self, int inValue) { + ((ConstraintTimeline1*)(SliderMixTimeline*)self)->setConstraintIndex(inValue); +} + +spine_rtti spine_slider_mix_timeline_rtti(void) { + return (spine_rtti)&SliderMixTimeline::rtti; } diff --git a/spine-c-new/src/generated/slider_mix_timeline.h b/spine-c-new/src/generated/slider_mix_timeline.h index c7baa0ef7..dabe3bd81 100644 --- a/spine-c-new/src/generated/slider_mix_timeline.h +++ b/spine-c-new/src/generated/slider_mix_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SLIDER_MIX_TIMELINE_H +#define SPINE_SPINE_SLIDER_MIX_TIMELINE_H -#ifndef SPINE_C_SLIDERMIXTIMELINE_H -#define SPINE_C_SLIDERMIXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slider_mix_timeline spine_slider_mix_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_slider_mix_timeline_dispose(spine_slider_mix_timeline self); + +SPINE_C_API spine_rtti spine_slider_mix_timeline_get_rtti(spine_slider_mix_timeline self); +SPINE_C_API void spine_slider_mix_timeline_apply(spine_slider_mix_timeline self, 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_API void spine_slider_mix_timeline_set_frame(spine_slider_mix_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_slider_mix_timeline_get_curve_value(spine_slider_mix_timeline self, float time); +SPINE_C_API float spine_slider_mix_timeline_get_relative_value(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_slider_mix_timeline_get_absolute_value_1(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_slider_mix_timeline_get_absolute_value_2(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_slider_mix_timeline_get_scale_value(spine_slider_mix_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_slider_mix_timeline_set_linear(spine_slider_mix_timeline self, size_t frame); +SPINE_C_API void spine_slider_mix_timeline_set_stepped(spine_slider_mix_timeline self, size_t frame); +SPINE_C_API void spine_slider_mix_timeline_set_bezier(spine_slider_mix_timeline self, 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_API float spine_slider_mix_timeline_get_bezier_value(spine_slider_mix_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_slider_mix_timeline_get_curves(spine_slider_mix_timeline self); +SPINE_C_API size_t spine_slider_mix_timeline_get_frame_entries(spine_slider_mix_timeline self); +SPINE_C_API size_t spine_slider_mix_timeline_get_frame_count(spine_slider_mix_timeline self); +SPINE_C_API spine_array_float spine_slider_mix_timeline_get_frames(spine_slider_mix_timeline self); +SPINE_C_API float spine_slider_mix_timeline_get_duration(spine_slider_mix_timeline self); +SPINE_C_API spine_array_property_id spine_slider_mix_timeline_get_property_ids(spine_slider_mix_timeline self); +SPINE_C_API int spine_slider_mix_timeline_get_constraint_index(spine_slider_mix_timeline self); +SPINE_C_API void spine_slider_mix_timeline_set_constraint_index(spine_slider_mix_timeline self, int inValue); +SPINE_C_API spine_rtti spine_slider_mix_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLIDERMIXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLIDER_MIX_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slider_pose.cpp b/spine-c-new/src/generated/slider_pose.cpp index 89b0290c9..3e8c83704 100644 --- a/spine-c-new/src/generated/slider_pose.cpp +++ b/spine-c-new/src/generated/slider_pose.cpp @@ -1,73 +1,32 @@ -/****************************************************************************** - * 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 "slider_pose.h" #include using namespace spine; spine_slider_pose spine_slider_pose_create(void) { - SliderPose *obj = new (__FILE__, __LINE__) SliderPose(); - return (spine_slider_pose) obj; + return (spine_slider_pose) new (__FILE__, __LINE__) SliderPose(); } -void spine_slider_pose_dispose(spine_slider_pose obj) { - if (!obj) return; - delete (SliderPose *) obj; +void spine_slider_pose_dispose(spine_slider_pose self) { + delete (SliderPose*)self; } -void spine_slider_pose_set(spine_slider_pose obj, spine_slider_pose value) { - if (!obj) return; - SliderPose *_obj = (SliderPose *) obj; - _obj->set(*((SliderPose*) value)); +void spine_slider_pose_set(spine_slider_pose self, spine_slider_pose pose) { + ((SliderPose*)self)->set(*((SliderPose*)pose)); } -float spine_slider_pose_get_time(spine_slider_pose obj) { - if (!obj) return 0; - SliderPose *_obj = (SliderPose *) obj; - return _obj->getTime(); +float spine_slider_pose_get_time(spine_slider_pose self) { + return ((SliderPose*)self)->getTime(); } -void spine_slider_pose_set_time(spine_slider_pose obj, float value) { - if (!obj) return; - SliderPose *_obj = (SliderPose *) obj; - _obj->setTime(value); +void spine_slider_pose_set_time(spine_slider_pose self, float time) { + ((SliderPose*)self)->setTime(time); } -float spine_slider_pose_get_mix(spine_slider_pose obj) { - if (!obj) return 0; - SliderPose *_obj = (SliderPose *) obj; - return _obj->getMix(); +float spine_slider_pose_get_mix(spine_slider_pose self) { + return ((SliderPose*)self)->getMix(); } -void spine_slider_pose_set_mix(spine_slider_pose obj, float value) { - if (!obj) return; - SliderPose *_obj = (SliderPose *) obj; - _obj->setMix(value); +void spine_slider_pose_set_mix(spine_slider_pose self, float mix) { + ((SliderPose*)self)->setMix(mix); } diff --git a/spine-c-new/src/generated/slider_pose.h b/spine-c-new/src/generated/slider_pose.h index dd037d02a..3502c7422 100644 --- a/spine-c-new/src/generated/slider_pose.h +++ b/spine-c-new/src/generated/slider_pose.h @@ -1,51 +1,25 @@ -/****************************************************************************** - * 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_SPINE_SLIDER_POSE_H +#define SPINE_SPINE_SLIDER_POSE_H -#ifndef SPINE_C_SLIDERPOSE_H -#define SPINE_C_SLIDERPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slider_pose spine_slider_pose_create(void); -SPINE_C_EXPORT spine_slider_pose spine_slider_pose_create(void); -SPINE_C_EXPORT void spine_slider_pose_dispose(spine_slider_pose obj); -SPINE_C_EXPORT void spine_slider_pose_set(spine_slider_pose obj, spine_slider_pose value); -SPINE_C_EXPORT float spine_slider_pose_get_time(spine_slider_pose obj); -SPINE_C_EXPORT void spine_slider_pose_set_time(spine_slider_pose obj, float value); -SPINE_C_EXPORT float spine_slider_pose_get_mix(spine_slider_pose obj); -SPINE_C_EXPORT void spine_slider_pose_set_mix(spine_slider_pose obj, float value); +SPINE_C_API void spine_slider_pose_dispose(spine_slider_pose self); + +SPINE_C_API void spine_slider_pose_set(spine_slider_pose self, spine_slider_pose pose); +SPINE_C_API float spine_slider_pose_get_time(spine_slider_pose self); +SPINE_C_API void spine_slider_pose_set_time(spine_slider_pose self, float time); +SPINE_C_API float spine_slider_pose_get_mix(spine_slider_pose self); +SPINE_C_API void spine_slider_pose_set_mix(spine_slider_pose self, float mix); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLIDERPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLIDER_POSE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slider_timeline.cpp b/spine-c-new/src/generated/slider_timeline.cpp index 2ffa133c3..26f800737 100644 --- a/spine-c-new/src/generated/slider_timeline.cpp +++ b/spine-c-new/src/generated/slider_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "slider_timeline.h" #include using namespace spine; 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; + return (spine_slider_timeline) new (__FILE__, __LINE__) SliderTimeline(frameCount, bezierCount, sliderIndex); } -void spine_slider_timeline_dispose(spine_slider_timeline obj) { - if (!obj) return; - delete (SliderTimeline *) obj; +void spine_slider_timeline_dispose(spine_slider_timeline self) { + delete (SliderTimeline*)self; } -spine_rtti spine_slider_timeline_get_rtti() { - return (spine_rtti) &SliderTimeline::rtti; +spine_rtti spine_slider_timeline_get_rtti(spine_slider_timeline self) { + return (spine_rtti)&((SliderTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_slider_timeline_apply(spine_slider_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SliderTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_slider_timeline_set_frame(spine_slider_timeline self, size_t frame, float time, float value) { + ((ConstraintTimeline1*)(SliderTimeline*)self)->setFrame(frame, time, value); } -float spine_slider_timeline_get_curve_value(spine_slider_timeline obj, float time) { - if (!obj) return 0; - SliderTimeline *_obj = (SliderTimeline *) obj; - return _obj->getCurveValue(time); +float spine_slider_timeline_get_curve_value(spine_slider_timeline self, float time) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_slider_timeline_get_relative_value(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_slider_timeline_get_absolute_value_1(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_slider_timeline_get_absolute_value_2(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_slider_timeline_get_scale_value(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_slider_timeline self, size_t frame) { + ((ConstraintTimeline1*)(SliderTimeline*)self)->setLinear(frame); } -void spine_slider_timeline_set_constraint_index(spine_slider_timeline obj, int value) { - if (!obj) return; - SliderTimeline *_obj = (SliderTimeline *) obj; - _obj->setConstraintIndex(value); +void spine_slider_timeline_set_stepped(spine_slider_timeline self, size_t frame) { + ((ConstraintTimeline1*)(SliderTimeline*)self)->setStepped(frame); +} + +void spine_slider_timeline_set_bezier(spine_slider_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((ConstraintTimeline1*)(SliderTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_slider_timeline_get_bezier_value(spine_slider_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_slider_timeline_get_curves(spine_slider_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(SliderTimeline*)self)->getCurves(); +} + +size_t spine_slider_timeline_get_frame_entries(spine_slider_timeline self) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getFrameEntries(); +} + +size_t spine_slider_timeline_get_frame_count(spine_slider_timeline self) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_slider_timeline_get_frames(spine_slider_timeline self) { + return (spine_array_float)&((ConstraintTimeline1*)(SliderTimeline*)self)->getFrames(); +} + +float spine_slider_timeline_get_duration(spine_slider_timeline self) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_slider_timeline_get_property_ids(spine_slider_timeline self) { + return (spine_array_property_id)&((ConstraintTimeline1*)(SliderTimeline*)self)->getPropertyIds(); +} + +int spine_slider_timeline_get_constraint_index(spine_slider_timeline self) { + return ((ConstraintTimeline1*)(SliderTimeline*)self)->getConstraintIndex(); +} + +void spine_slider_timeline_set_constraint_index(spine_slider_timeline self, int inValue) { + ((ConstraintTimeline1*)(SliderTimeline*)self)->setConstraintIndex(inValue); +} + +spine_rtti spine_slider_timeline_rtti(void) { + return (spine_rtti)&SliderTimeline::rtti; } diff --git a/spine-c-new/src/generated/slider_timeline.h b/spine-c-new/src/generated/slider_timeline.h index 9a78c75a6..5aa2e9ac2 100644 --- a/spine-c-new/src/generated/slider_timeline.h +++ b/spine-c-new/src/generated/slider_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_SLIDER_TIMELINE_H +#define SPINE_SPINE_SLIDER_TIMELINE_H -#ifndef SPINE_C_SLIDERTIMELINE_H -#define SPINE_C_SLIDERTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slider_timeline spine_slider_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_slider_timeline_dispose(spine_slider_timeline self); + +SPINE_C_API spine_rtti spine_slider_timeline_get_rtti(spine_slider_timeline self); +SPINE_C_API void spine_slider_timeline_apply(spine_slider_timeline self, 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_API void spine_slider_timeline_set_frame(spine_slider_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_slider_timeline_get_curve_value(spine_slider_timeline self, float time); +SPINE_C_API float spine_slider_timeline_get_relative_value(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_slider_timeline_get_absolute_value_1(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_slider_timeline_get_absolute_value_2(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_slider_timeline_get_scale_value(spine_slider_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_slider_timeline_set_linear(spine_slider_timeline self, size_t frame); +SPINE_C_API void spine_slider_timeline_set_stepped(spine_slider_timeline self, size_t frame); +SPINE_C_API void spine_slider_timeline_set_bezier(spine_slider_timeline self, 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_API float spine_slider_timeline_get_bezier_value(spine_slider_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_slider_timeline_get_curves(spine_slider_timeline self); +SPINE_C_API size_t spine_slider_timeline_get_frame_entries(spine_slider_timeline self); +SPINE_C_API size_t spine_slider_timeline_get_frame_count(spine_slider_timeline self); +SPINE_C_API spine_array_float spine_slider_timeline_get_frames(spine_slider_timeline self); +SPINE_C_API float spine_slider_timeline_get_duration(spine_slider_timeline self); +SPINE_C_API spine_array_property_id spine_slider_timeline_get_property_ids(spine_slider_timeline self); +SPINE_C_API int spine_slider_timeline_get_constraint_index(spine_slider_timeline self); +SPINE_C_API void spine_slider_timeline_set_constraint_index(spine_slider_timeline self, int inValue); +SPINE_C_API spine_rtti spine_slider_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLIDERTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLIDER_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slot.cpp b/spine-c-new/src/generated/slot.cpp index ff0ccabfe..3a6722859 100644 --- a/spine-c-new/src/generated/slot.cpp +++ b/spine-c-new/src/generated/slot.cpp @@ -1,97 +1,44 @@ -/****************************************************************************** - * 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 "slot.h" #include using namespace spine; spine_slot spine_slot_create(spine_slot_data data, spine_skeleton skeleton) { - Slot *obj = new (__FILE__, __LINE__) Slot(*(SlotData*) data, *(Skeleton*) skeleton); - return (spine_slot) obj; + return (spine_slot) new (__FILE__, __LINE__) Slot(*((SlotData*)data), *((Skeleton*)skeleton)); } -void spine_slot_dispose(spine_slot obj) { - if (!obj) return; - delete (Slot *) obj; +void spine_slot_dispose(spine_slot self) { + delete (Slot*)self; } -spine_bone spine_slot_get_bone(spine_slot obj) { - if (!obj) return (spine_bone) 0; - Slot *_obj = (Slot *) obj; - return (spine_bone) &_obj->getBone(); +spine_bone spine_slot_get_bone(spine_slot self) { + return (spine_bone)&((Slot*)self)->getBone(); } -void spine_slot_setup_pose(spine_slot obj) { - if (!obj) return ; - Slot *_obj = (Slot *) obj; - _obj->setupPose(); +void spine_slot_setup_pose(spine_slot self) { + ((Slot*)self)->setupPose(); } -spine_slot_data spine_slot_get_data(spine_slot obj) { - if (!obj) return (spine_slot_data) 0; - Slot *_obj = (Slot *) obj; - return (spine_slot_data) &_obj->getData(); +spine_slot_data spine_slot_get_data(spine_slot self) { + return (spine_slot_data)&((PosedGeneric*)(Slot*)self)->getData(); } -spine_slot_pose spine_slot_get_pose(spine_slot obj) { - if (!obj) return (spine_slot_pose) 0; - Slot *_obj = (Slot *) obj; - return (spine_slot_pose) &_obj->getPose(); +spine_slot_pose spine_slot_get_pose(spine_slot self) { + return (spine_slot_pose)&((PosedGeneric*)(Slot*)self)->getPose(); } -spine_slot_pose spine_slot_get_applied_pose(spine_slot obj) { - if (!obj) return (spine_slot_pose) 0; - Slot *_obj = (Slot *) obj; - return (spine_slot_pose) &_obj->getAppliedPose(); +spine_slot_pose spine_slot_get_applied_pose(spine_slot self) { + return (spine_slot_pose)&((PosedGeneric*)(Slot*)self)->getAppliedPose(); } -void spine_slot_reset_constrained(spine_slot obj) { - if (!obj) return ; - Slot *_obj = (Slot *) obj; - _obj->resetConstrained(); +void spine_slot_reset_constrained(spine_slot self) { + ((PosedGeneric*)(Slot*)self)->resetConstrained(); } -void spine_slot_pose(spine_slot obj) { - if (!obj) return ; - Slot *_obj = (Slot *) obj; - _obj->pose(); +void spine_slot_constrained(spine_slot self) { + ((PosedGeneric*)(Slot*)self)->constrained(); } -void spine_slot_constrained(spine_slot obj) { - if (!obj) return ; - Slot *_obj = (Slot *) obj; - _obj->constrained(); -} - -bool spine_slot_is_pose_equal_to_applied(spine_slot obj) { - if (!obj) return false; - Slot *_obj = (Slot *) obj; - return _obj->isPoseEqualToApplied(); +bool spine_slot_is_pose_equal_to_applied(spine_slot self) { + return ((PosedGeneric*)(Slot*)self)->isPoseEqualToApplied(); } diff --git a/spine-c-new/src/generated/slot.h b/spine-c-new/src/generated/slot.h index dc75398e2..c8172c015 100644 --- a/spine-c-new/src/generated/slot.h +++ b/spine-c-new/src/generated/slot.h @@ -1,55 +1,28 @@ -/****************************************************************************** - * 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_SPINE_SLOT_H +#define SPINE_SPINE_SLOT_H -#ifndef SPINE_C_SLOT_H -#define SPINE_C_SLOT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slot spine_slot_create(spine_slot_data data, spine_skeleton skeleton); -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); -SPINE_C_EXPORT spine_bone spine_slot_get_bone(spine_slot obj); -SPINE_C_EXPORT void spine_slot_setup_pose(spine_slot obj); -SPINE_C_EXPORT spine_slot_data spine_slot_get_data(spine_slot obj); -SPINE_C_EXPORT spine_slot_pose spine_slot_get_pose(spine_slot obj); -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 bool spine_slot_is_pose_equal_to_applied(spine_slot obj); +SPINE_C_API void spine_slot_dispose(spine_slot self); + +SPINE_C_API spine_bone spine_slot_get_bone(spine_slot self); +SPINE_C_API void spine_slot_setup_pose(spine_slot self); +SPINE_C_API spine_slot_data spine_slot_get_data(spine_slot self); +SPINE_C_API spine_slot_pose spine_slot_get_pose(spine_slot self); +SPINE_C_API spine_slot_pose spine_slot_get_applied_pose(spine_slot self); +SPINE_C_API void spine_slot_reset_constrained(spine_slot self); +SPINE_C_API void spine_slot_constrained(spine_slot self); +SPINE_C_API bool spine_slot_is_pose_equal_to_applied(spine_slot self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLOT_H \ No newline at end of file +#endif /* SPINE_SPINE_SLOT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slot_curve_timeline.cpp b/spine-c-new/src/generated/slot_curve_timeline.cpp index de7932582..abb2d2da6 100644 --- a/spine-c-new/src/generated/slot_curve_timeline.cpp +++ b/spine-c-new/src/generated/slot_curve_timeline.cpp @@ -1,143 +1,68 @@ -/****************************************************************************** - * 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 "slot_curve_timeline.h" #include using namespace spine; -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; +void spine_slot_curve_timeline_dispose(spine_slot_curve_timeline self) { + delete (SlotCurveTimeline*)self; } -void spine_slot_curve_timeline_dispose(spine_slot_curve_timeline obj) { - if (!obj) return; - delete (SlotCurveTimeline *) obj; +spine_rtti spine_slot_curve_timeline_get_rtti(spine_slot_curve_timeline self) { + return (spine_rtti)&((SlotCurveTimeline*)self)->getRTTI(); } -spine_rtti spine_slot_curve_timeline_get_rtti() { - return (spine_rtti) &SlotCurveTimeline::rtti; +void spine_slot_curve_timeline_apply(spine_slot_curve_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((SlotCurveTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, 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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline self, size_t frame) { + ((CurveTimeline*)(SlotCurveTimeline*)self)->setLinear(frame); } -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 self, size_t frame) { + ((CurveTimeline*)(SlotCurveTimeline*)self)->setStepped(frame); } -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 self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(SlotCurveTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, 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 self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(SlotCurveTimeline*)self)->getBezierValue(time, frame, valueOffset, 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); +spine_array_float spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline self) { + return (spine_array_float)&((CurveTimeline*)(SlotCurveTimeline*)self)->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(); +size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline self) { + return ((CurveTimeline*)(SlotCurveTimeline*)self)->getFrameEntries(); } -float *spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline self) { + return ((CurveTimeline*)(SlotCurveTimeline*)self)->getFrameCount(); } -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_array_float spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline self) { + return (spine_array_float)&((CurveTimeline*)(SlotCurveTimeline*)self)->getFrames(); } -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(); +float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline self) { + return ((CurveTimeline*)(SlotCurveTimeline*)self)->getDuration(); } -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_array_property_id spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline self) { + return (spine_array_property_id)&((CurveTimeline*)(SlotCurveTimeline*)self)->getPropertyIds(); } -float *spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +int spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline self) { + return ((SlotTimeline*)(SlotCurveTimeline*)self)->getSlotIndex(); } -float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline obj) { - if (!obj) return 0; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return _obj->getDuration(); +void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline self, int inValue) { + ((SlotTimeline*)(SlotCurveTimeline*)self)->setSlotIndex(inValue); } -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(); -} - -int64_t *spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline obj) { - if (!obj) return nullptr; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - SlotCurveTimeline *_obj = (SlotCurveTimeline *) obj; - _obj->setSlotIndex(value); +spine_rtti spine_slot_curve_timeline_rtti(void) { + return (spine_rtti)&SlotCurveTimeline::rtti; } diff --git a/spine-c-new/src/generated/slot_curve_timeline.h b/spine-c-new/src/generated/slot_curve_timeline.h index 3a7a366bc..b2090952c 100644 --- a/spine-c-new/src/generated/slot_curve_timeline.h +++ b/spine-c-new/src/generated/slot_curve_timeline.h @@ -1,63 +1,33 @@ -/****************************************************************************** - * 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_SPINE_SLOT_CURVE_TIMELINE_H +#define SPINE_SPINE_SLOT_CURVE_TIMELINE_H -#ifndef SPINE_C_SLOTCURVETIMELINE_H -#define SPINE_C_SLOTCURVETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_slot_curve_timeline_dispose(spine_slot_curve_timeline self); -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_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 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 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 int32_t spine_slot_curve_timeline_get_num_property_ids(spine_slot_curve_timeline obj); -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); +SPINE_C_API spine_rtti spine_slot_curve_timeline_get_rtti(spine_slot_curve_timeline self); +SPINE_C_API void spine_slot_curve_timeline_apply(spine_slot_curve_timeline self, 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_API void spine_slot_curve_timeline_set_linear(spine_slot_curve_timeline self, size_t frame); +SPINE_C_API void spine_slot_curve_timeline_set_stepped(spine_slot_curve_timeline self, size_t frame); +SPINE_C_API void spine_slot_curve_timeline_set_bezier(spine_slot_curve_timeline self, 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_API float spine_slot_curve_timeline_get_bezier_value(spine_slot_curve_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_slot_curve_timeline_get_curves(spine_slot_curve_timeline self); +SPINE_C_API size_t spine_slot_curve_timeline_get_frame_entries(spine_slot_curve_timeline self); +SPINE_C_API size_t spine_slot_curve_timeline_get_frame_count(spine_slot_curve_timeline self); +SPINE_C_API spine_array_float spine_slot_curve_timeline_get_frames(spine_slot_curve_timeline self); +SPINE_C_API float spine_slot_curve_timeline_get_duration(spine_slot_curve_timeline self); +SPINE_C_API spine_array_property_id spine_slot_curve_timeline_get_property_ids(spine_slot_curve_timeline self); +SPINE_C_API int spine_slot_curve_timeline_get_slot_index(spine_slot_curve_timeline self); +SPINE_C_API void spine_slot_curve_timeline_set_slot_index(spine_slot_curve_timeline self, int inValue); +SPINE_C_API spine_rtti spine_slot_curve_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLOTCURVETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLOT_CURVE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slot_data.cpp b/spine-c-new/src/generated/slot_data.cpp index 1f24b61e8..14bd9e29a 100644 --- a/spine-c-new/src/generated/slot_data.cpp +++ b/spine-c-new/src/generated/slot_data.cpp @@ -1,115 +1,60 @@ -/****************************************************************************** - * 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 "slot_data.h" #include using namespace spine; 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; + return (spine_slot_data) new (__FILE__, __LINE__) SlotData(index, *((const String*)name), *((BoneData*)boneData)); } -void spine_slot_data_dispose(spine_slot_data obj) { - if (!obj) return; - delete (SlotData *) obj; +void spine_slot_data_dispose(spine_slot_data self) { + delete (SlotData*)self; } -int spine_slot_data_get_index(spine_slot_data obj) { - if (!obj) return 0; - SlotData *_obj = (SlotData *) obj; - return _obj->getIndex(); +int spine_slot_data_get_index(spine_slot_data self) { + return ((SlotData*)self)->getIndex(); } -spine_bone_data spine_slot_data_get_bone_data(spine_slot_data obj) { - if (!obj) return (spine_bone_data) 0; - SlotData *_obj = (SlotData *) obj; - return (spine_bone_data) &_obj->getBoneData(); +spine_bone_data spine_slot_data_get_bone_data(spine_slot_data self) { + return (spine_bone_data)&((SlotData*)self)->getBoneData(); } -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)); +void spine_slot_data_set_attachment_name(spine_slot_data self, const char* attachmentName) { + ((SlotData*)self)->setAttachmentName(*((const String*)attachmentName)); } -const char* spine_slot_data_get_attachment_name(spine_slot_data obj) { - if (!obj) return nullptr; - SlotData *_obj = (SlotData *) obj; - return (const char *) _obj->getAttachmentName().buffer(); +const char* spine_slot_data_get_attachment_name(spine_slot_data self) { + return (const char*)&((SlotData*)self)->getAttachmentName(); } -spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data obj) { - if (!obj) return (spine_blend_mode) 0; - SlotData *_obj = (SlotData *) obj; - return (spine_blend_mode) _obj->getBlendMode(); +spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data self) { + return (spine_blend_mode)((SlotData*)self)->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((BlendMode) value); +void spine_slot_data_set_blend_mode(spine_slot_data self, spine_blend_mode blendMode) { + ((SlotData*)self)->setBlendMode((BlendMode)blendMode); } -bool spine_slot_data_get_visible(spine_slot_data obj) { - if (!obj) return false; - SlotData *_obj = (SlotData *) obj; - return _obj->getVisible(); +bool spine_slot_data_get_visible(spine_slot_data self) { + return ((SlotData*)self)->getVisible(); } -void spine_slot_data_set_visible(spine_slot_data obj, bool value) { - if (!obj) return; - SlotData *_obj = (SlotData *) obj; - _obj->setVisible(value); +void spine_slot_data_set_visible(spine_slot_data self, bool visible) { + ((SlotData*)self)->setVisible(visible); } -spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data obj) { - if (!obj) return (spine_slot_pose) 0; - SlotData *_obj = (SlotData *) obj; - return (spine_slot_pose) &_obj->getSetupPose(); +spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data self) { + return (spine_slot_pose)&((PosedDataGeneric*)(SlotData*)self)->getSetupPose(); } -const char* spine_slot_data_get_name(spine_slot_data obj) { - if (!obj) return nullptr; - SlotData *_obj = (SlotData *) obj; - return (const char *) _obj->getName().buffer(); +const char* spine_slot_data_get_name(spine_slot_data self) { + return (const char*)&((PosedDataGeneric*)(SlotData*)self)->getName(); } -bool spine_slot_data_is_skin_required(spine_slot_data obj) { - if (!obj) return false; - SlotData *_obj = (SlotData *) obj; - return _obj->isSkinRequired(); +bool spine_slot_data_is_skin_required(spine_slot_data self) { + return ((PosedDataGeneric*)(SlotData*)self)->isSkinRequired(); } -void spine_slot_data_set_skin_required(spine_slot_data obj, bool value) { - if (!obj) return; - SlotData *_obj = (SlotData *) obj; - _obj->setSkinRequired(value); +void spine_slot_data_set_skin_required(spine_slot_data self, bool skinRequired) { + ((PosedDataGeneric*)(SlotData*)self)->setSkinRequired(skinRequired); } diff --git a/spine-c-new/src/generated/slot_data.h b/spine-c-new/src/generated/slot_data.h index 35f05dbbb..d5db85ac6 100644 --- a/spine-c-new/src/generated/slot_data.h +++ b/spine-c-new/src/generated/slot_data.h @@ -1,58 +1,32 @@ -/****************************************************************************** - * 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_SPINE_SLOT_DATA_H +#define SPINE_SPINE_SLOT_DATA_H -#ifndef SPINE_C_SLOTDATA_H -#define SPINE_C_SLOTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slot_data spine_slot_data_create(int index, const char* 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 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 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 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 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); +SPINE_C_API void spine_slot_data_dispose(spine_slot_data self); + +SPINE_C_API int spine_slot_data_get_index(spine_slot_data self); +SPINE_C_API spine_bone_data spine_slot_data_get_bone_data(spine_slot_data self); +SPINE_C_API void spine_slot_data_set_attachment_name(spine_slot_data self, const char* attachmentName); +SPINE_C_API const char* spine_slot_data_get_attachment_name(spine_slot_data self); +SPINE_C_API spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data self); +SPINE_C_API void spine_slot_data_set_blend_mode(spine_slot_data self, spine_blend_mode blendMode); +SPINE_C_API bool spine_slot_data_get_visible(spine_slot_data self); +SPINE_C_API void spine_slot_data_set_visible(spine_slot_data self, bool visible); +SPINE_C_API spine_slot_pose spine_slot_data_get_setup_pose(spine_slot_data self); +SPINE_C_API const char* spine_slot_data_get_name(spine_slot_data self); +SPINE_C_API bool spine_slot_data_is_skin_required(spine_slot_data self); +SPINE_C_API void spine_slot_data_set_skin_required(spine_slot_data self, bool skinRequired); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLOTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_SLOT_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slot_pose.cpp b/spine-c-new/src/generated/slot_pose.cpp index 5a727f05a..e9fee8104 100644 --- a/spine-c-new/src/generated/slot_pose.cpp +++ b/spine-c-new/src/generated/slot_pose.cpp @@ -1,109 +1,52 @@ -/****************************************************************************** - * 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 "slot_pose.h" #include using namespace spine; spine_slot_pose spine_slot_pose_create(void) { - SlotPose *obj = new (__FILE__, __LINE__) SlotPose(); - return (spine_slot_pose) obj; + return (spine_slot_pose) new (__FILE__, __LINE__) SlotPose(); } -void spine_slot_pose_dispose(spine_slot_pose obj) { - if (!obj) return; - delete (SlotPose *) obj; +void spine_slot_pose_dispose(spine_slot_pose self) { + delete (SlotPose*)self; } -void spine_slot_pose_set(spine_slot_pose obj, spine_slot_pose value) { - if (!obj) return; - SlotPose *_obj = (SlotPose *) obj; - _obj->set(*((SlotPose*) value)); +void spine_slot_pose_set(spine_slot_pose self, spine_slot_pose pose) { + ((SlotPose*)self)->set(*((SlotPose*)pose)); } -spine_color spine_slot_pose_get_color(spine_slot_pose obj) { - if (!obj) return (spine_color) 0; - SlotPose *_obj = (SlotPose *) obj; - return (spine_color) &_obj->getColor(); +spine_color spine_slot_pose_get_color(spine_slot_pose self) { + return (spine_color)&((SlotPose*)self)->getColor(); } -spine_color spine_slot_pose_get_dark_color(spine_slot_pose obj) { - if (!obj) return (spine_color) 0; - SlotPose *_obj = (SlotPose *) obj; - return (spine_color) &_obj->getDarkColor(); +spine_color spine_slot_pose_get_dark_color(spine_slot_pose self) { + return (spine_color)&((SlotPose*)self)->getDarkColor(); } -bool spine_slot_pose_has_dark_color(spine_slot_pose obj) { - if (!obj) return false; - SlotPose *_obj = (SlotPose *) obj; - return _obj->hasDarkColor(); +bool spine_slot_pose_has_dark_color(spine_slot_pose self) { + return ((SlotPose*)self)->hasDarkColor(); } -void spine_slot_pose_set_has_dark_color(spine_slot_pose obj, bool value) { - if (!obj) return; - SlotPose *_obj = (SlotPose *) obj; - _obj->setHasDarkColor(value); +void spine_slot_pose_set_has_dark_color(spine_slot_pose self, bool hasDarkColor) { + ((SlotPose*)self)->setHasDarkColor(hasDarkColor); } -spine_attachment spine_slot_pose_get_attachment(spine_slot_pose obj) { - if (!obj) return (spine_attachment) 0; - SlotPose *_obj = (SlotPose *) obj; - return (spine_attachment) _obj->getAttachment(); +spine_attachment spine_slot_pose_get_attachment(spine_slot_pose self) { + return (spine_attachment)((SlotPose*)self)->getAttachment(); } -void spine_slot_pose_set_attachment(spine_slot_pose obj, spine_attachment value) { - if (!obj) return; - SlotPose *_obj = (SlotPose *) obj; - _obj->setAttachment((Attachment *) value); +void spine_slot_pose_set_attachment(spine_slot_pose self, spine_attachment attachment) { + ((SlotPose*)self)->setAttachment((Attachment *)attachment); } -int spine_slot_pose_get_sequence_index(spine_slot_pose obj) { - if (!obj) return 0; - SlotPose *_obj = (SlotPose *) obj; - return _obj->getSequenceIndex(); +int spine_slot_pose_get_sequence_index(spine_slot_pose self) { + return ((SlotPose*)self)->getSequenceIndex(); } -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_set_sequence_index(spine_slot_pose self, int sequenceIndex) { + ((SlotPose*)self)->setSequenceIndex(sequenceIndex); } -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(); -} - -float *spine_slot_pose_get_deform(spine_slot_pose obj) { - if (!obj) return nullptr; - SlotPose *_obj = (SlotPose *) obj; - return (float *) _obj->getDeform().buffer(); +spine_array_float spine_slot_pose_get_deform(spine_slot_pose self) { + return (spine_array_float)&((SlotPose*)self)->getDeform(); } diff --git a/spine-c-new/src/generated/slot_pose.h b/spine-c-new/src/generated/slot_pose.h index 24da0d201..d8b4807fe 100644 --- a/spine-c-new/src/generated/slot_pose.h +++ b/spine-c-new/src/generated/slot_pose.h @@ -1,57 +1,30 @@ -/****************************************************************************** - * 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_SPINE_SLOT_POSE_H +#define SPINE_SPINE_SLOT_POSE_H -#ifndef SPINE_C_SLOTPOSE_H -#define SPINE_C_SLOTPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_slot_pose spine_slot_pose_create(void); -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 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 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 float *spine_slot_pose_get_deform(spine_slot_pose obj); +SPINE_C_API void spine_slot_pose_dispose(spine_slot_pose self); + +SPINE_C_API void spine_slot_pose_set(spine_slot_pose self, spine_slot_pose pose); +SPINE_C_API spine_color spine_slot_pose_get_color(spine_slot_pose self); +SPINE_C_API spine_color spine_slot_pose_get_dark_color(spine_slot_pose self); +SPINE_C_API bool spine_slot_pose_has_dark_color(spine_slot_pose self); +SPINE_C_API void spine_slot_pose_set_has_dark_color(spine_slot_pose self, bool hasDarkColor); +SPINE_C_API spine_attachment spine_slot_pose_get_attachment(spine_slot_pose self); +SPINE_C_API void spine_slot_pose_set_attachment(spine_slot_pose self, spine_attachment attachment); +SPINE_C_API int spine_slot_pose_get_sequence_index(spine_slot_pose self); +SPINE_C_API void spine_slot_pose_set_sequence_index(spine_slot_pose self, int sequenceIndex); +SPINE_C_API spine_array_float spine_slot_pose_get_deform(spine_slot_pose self); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLOTPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLOT_POSE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/slot_timeline.cpp b/spine-c-new/src/generated/slot_timeline.cpp index 025809f4c..8a739c353 100644 --- a/spine-c-new/src/generated/slot_timeline.cpp +++ b/spine-c-new/src/generated/slot_timeline.cpp @@ -1,59 +1,24 @@ -/****************************************************************************** - * 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 "slot_timeline.h" #include using namespace spine; -spine_slot_timeline spine_slot_timeline_create(int slotIndex) { - SlotTimeline *obj = new (__FILE__, __LINE__) SlotTimeline(slotIndex); - return (spine_slot_timeline) obj; +void spine_slot_timeline_dispose(spine_slot_timeline self) { + delete (SlotTimeline*)self; } -void spine_slot_timeline_dispose(spine_slot_timeline obj) { - if (!obj) return; - delete (SlotTimeline *) obj; +spine_rtti spine_slot_timeline_get_rtti(spine_slot_timeline self) { + return (spine_rtti)&((SlotTimeline*)self)->getRTTI(); } -spine_rtti spine_slot_timeline_get_rtti() { - return (spine_rtti) &SlotTimeline::rtti; +int spine_slot_timeline_get_slot_index(spine_slot_timeline self) { + return ((SlotTimeline*)self)->getSlotIndex(); } -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 self, int inValue) { + ((SlotTimeline*)self)->setSlotIndex(inValue); } -void spine_slot_timeline_set_slot_index(spine_slot_timeline obj, int value) { - if (!obj) return; - SlotTimeline *_obj = (SlotTimeline *) obj; - _obj->setSlotIndex(value); +spine_rtti spine_slot_timeline_rtti(void) { + return (spine_rtti)&SlotTimeline::rtti; } diff --git a/spine-c-new/src/generated/slot_timeline.h b/spine-c-new/src/generated/slot_timeline.h index 43968dd03..b105bf06e 100644 --- a/spine-c-new/src/generated/slot_timeline.h +++ b/spine-c-new/src/generated/slot_timeline.h @@ -1,49 +1,22 @@ -/****************************************************************************** - * 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_SPINE_SLOT_TIMELINE_H +#define SPINE_SPINE_SLOT_TIMELINE_H -#ifndef SPINE_C_SLOTTIMELINE_H -#define SPINE_C_SLOTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_slot_timeline_dispose(spine_slot_timeline self); -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_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); +SPINE_C_API spine_rtti spine_slot_timeline_get_rtti(spine_slot_timeline self); +SPINE_C_API int spine_slot_timeline_get_slot_index(spine_slot_timeline self); +SPINE_C_API void spine_slot_timeline_set_slot_index(spine_slot_timeline self, int inValue); +SPINE_C_API spine_rtti spine_slot_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_SLOTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_SLOT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/spacing_mode.h b/spine-c-new/src/generated/spacing_mode.h index 2998af8e0..028793e08 100644 --- a/spine-c-new/src/generated/spacing_mode.h +++ b/spine-c-new/src/generated/spacing_mode.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_SPACINGMODE_H -#define SPINE_C_SPACINGMODE_H - -#include "../base.h" +#ifndef SPINE_SPINE_SPACING_MODE_H +#define SPINE_SPINE_SPACING_MODE_H #ifdef __cplusplus extern "C" { @@ -47,4 +16,4 @@ typedef enum spine_spacing_mode { } #endif -#endif // SPINE_C_SPACINGMODE_H \ No newline at end of file +#endif /* SPINE_SPINE_SPACING_MODE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/texture_filter.h b/spine-c-new/src/generated/texture_filter.h index 32a817710..ca9792c3c 100644 --- a/spine-c-new/src/generated/texture_filter.h +++ b/spine-c-new/src/generated/texture_filter.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_TEXTUREFILTER_H -#define SPINE_C_TEXTUREFILTER_H - -#include "../base.h" +#ifndef SPINE_SPINE_TEXTURE_FILTER_H +#define SPINE_SPINE_TEXTURE_FILTER_H #ifdef __cplusplus extern "C" { @@ -51,4 +20,4 @@ typedef enum spine_texture_filter { } #endif -#endif // SPINE_C_TEXTUREFILTER_H \ No newline at end of file +#endif /* SPINE_SPINE_TEXTURE_FILTER_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/texture_region.cpp b/spine-c-new/src/generated/texture_region.cpp index 6d4ece4c6..f5eeb2c49 100644 --- a/spine-c-new/src/generated/texture_region.cpp +++ b/spine-c-new/src/generated/texture_region.cpp @@ -1,43 +1,108 @@ -/****************************************************************************** - * 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 "texture_region.h" #include using namespace spine; spine_texture_region spine_texture_region_create(void) { - TextureRegion *obj = new (__FILE__, __LINE__) TextureRegion(); - return (spine_texture_region) obj; + return (spine_texture_region) new (__FILE__, __LINE__) TextureRegion(); } -void spine_texture_region_dispose(spine_texture_region obj) { - if (!obj) return; - delete (TextureRegion *) obj; +void spine_texture_region_dispose(spine_texture_region self) { + delete (TextureRegion*)self; +} + +void * spine_texture_region_get_renderer_object(spine_texture_region self) { + return ((TextureRegion*)self)->rendererObject; +} + +void spine_texture_region_set_renderer_object(spine_texture_region self, void * value) { + ((TextureRegion*)self)->rendererObject = (void*)value; +} + +float spine_texture_region_get_u(spine_texture_region self) { + return ((TextureRegion*)self)->u; +} + +void spine_texture_region_set_u(spine_texture_region self, float value) { + ((TextureRegion*)self)->u = value; +} + +float spine_texture_region_get_v(spine_texture_region self) { + return ((TextureRegion*)self)->v; +} + +void spine_texture_region_set_v(spine_texture_region self, float value) { + ((TextureRegion*)self)->v = value; +} + +float spine_texture_region_get_u2(spine_texture_region self) { + return ((TextureRegion*)self)->u2; +} + +void spine_texture_region_set_u2(spine_texture_region self, float value) { + ((TextureRegion*)self)->u2 = value; +} + +float spine_texture_region_get_v2(spine_texture_region self) { + return ((TextureRegion*)self)->v2; +} + +void spine_texture_region_set_v2(spine_texture_region self, float value) { + ((TextureRegion*)self)->v2 = value; +} + +int spine_texture_region_get_degrees(spine_texture_region self) { + return ((TextureRegion*)self)->degrees; +} + +void spine_texture_region_set_degrees(spine_texture_region self, int value) { + ((TextureRegion*)self)->degrees = value; +} + +float spine_texture_region_get_offset_x(spine_texture_region self) { + return ((TextureRegion*)self)->offsetX; +} + +void spine_texture_region_set_offset_x(spine_texture_region self, float value) { + ((TextureRegion*)self)->offsetX = value; +} + +float spine_texture_region_get_offset_y(spine_texture_region self) { + return ((TextureRegion*)self)->offsetY; +} + +void spine_texture_region_set_offset_y(spine_texture_region self, float value) { + ((TextureRegion*)self)->offsetY = value; +} + +int spine_texture_region_get_width(spine_texture_region self) { + return ((TextureRegion*)self)->width; +} + +void spine_texture_region_set_width(spine_texture_region self, int value) { + ((TextureRegion*)self)->width = value; +} + +int spine_texture_region_get_height(spine_texture_region self) { + return ((TextureRegion*)self)->height; +} + +void spine_texture_region_set_height(spine_texture_region self, int value) { + ((TextureRegion*)self)->height = value; +} + +int spine_texture_region_get_original_width(spine_texture_region self) { + return ((TextureRegion*)self)->originalWidth; +} + +void spine_texture_region_set_original_width(spine_texture_region self, int value) { + ((TextureRegion*)self)->originalWidth = value; +} + +int spine_texture_region_get_original_height(spine_texture_region self) { + return ((TextureRegion*)self)->originalHeight; +} + +void spine_texture_region_set_original_height(spine_texture_region self, int value) { + ((TextureRegion*)self)->originalHeight = value; } diff --git a/spine-c-new/src/generated/texture_region.h b/spine-c-new/src/generated/texture_region.h index 96131c57c..4af6ffb1e 100644 --- a/spine-c-new/src/generated/texture_region.h +++ b/spine-c-new/src/generated/texture_region.h @@ -1,46 +1,44 @@ -/****************************************************************************** - * 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_SPINE_TEXTURE_REGION_H +#define SPINE_SPINE_TEXTURE_REGION_H -#ifndef SPINE_C_TEXTUREREGION_H -#define SPINE_C_TEXTUREREGION_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_texture_region spine_texture_region_create(void); -SPINE_C_EXPORT spine_texture_region spine_texture_region_create(void); -SPINE_C_EXPORT void spine_texture_region_dispose(spine_texture_region obj); +SPINE_C_API void spine_texture_region_dispose(spine_texture_region self); + +SPINE_C_API void * spine_texture_region_get_renderer_object(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_renderer_object(spine_texture_region self, void * value); +SPINE_C_API float spine_texture_region_get_u(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_u(spine_texture_region self, float value); +SPINE_C_API float spine_texture_region_get_v(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_v(spine_texture_region self, float value); +SPINE_C_API float spine_texture_region_get_u2(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_u2(spine_texture_region self, float value); +SPINE_C_API float spine_texture_region_get_v2(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_v2(spine_texture_region self, float value); +SPINE_C_API int spine_texture_region_get_degrees(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_degrees(spine_texture_region self, int value); +SPINE_C_API float spine_texture_region_get_offset_x(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_offset_x(spine_texture_region self, float value); +SPINE_C_API float spine_texture_region_get_offset_y(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_offset_y(spine_texture_region self, float value); +SPINE_C_API int spine_texture_region_get_width(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_width(spine_texture_region self, int value); +SPINE_C_API int spine_texture_region_get_height(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_height(spine_texture_region self, int value); +SPINE_C_API int spine_texture_region_get_original_width(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_original_width(spine_texture_region self, int value); +SPINE_C_API int spine_texture_region_get_original_height(spine_texture_region self); +SPINE_C_API void spine_texture_region_set_original_height(spine_texture_region self, int value); #ifdef __cplusplus } #endif -#endif // SPINE_C_TEXTUREREGION_H \ No newline at end of file +#endif /* SPINE_SPINE_TEXTURE_REGION_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/texture_wrap.h b/spine-c-new/src/generated/texture_wrap.h index 796faa8f9..44fbf7cf3 100644 --- a/spine-c-new/src/generated/texture_wrap.h +++ b/spine-c-new/src/generated/texture_wrap.h @@ -1,36 +1,5 @@ -/****************************************************************************** - * 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_TEXTUREWRAP_H -#define SPINE_C_TEXTUREWRAP_H - -#include "../base.h" +#ifndef SPINE_SPINE_TEXTURE_WRAP_H +#define SPINE_SPINE_TEXTURE_WRAP_H #ifdef __cplusplus extern "C" { @@ -46,4 +15,4 @@ typedef enum spine_texture_wrap { } #endif -#endif // SPINE_C_TEXTUREWRAP_H \ No newline at end of file +#endif /* SPINE_SPINE_TEXTURE_WRAP_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/timeline.cpp b/spine-c-new/src/generated/timeline.cpp index 53553b23f..558cb8320 100644 --- a/spine-c-new/src/generated/timeline.cpp +++ b/spine-c-new/src/generated/timeline.cpp @@ -1,90 +1,40 @@ -/****************************************************************************** - * 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 "timeline.h" #include using namespace spine; -void spine_timeline_dispose(spine_timeline obj) { - if (!obj) return; - delete (Timeline *) obj; +void spine_timeline_dispose(spine_timeline self) { + delete (Timeline*)self; } -spine_rtti spine_timeline_get_rtti() { - return (spine_rtti) &Timeline::rtti; +spine_rtti spine_timeline_get_rtti(spine_timeline self) { + return (spine_rtti)&((Timeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_timeline_apply(spine_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((Timeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -size_t spine_timeline_get_frame_entries(spine_timeline obj) { - if (!obj) return 0; - Timeline *_obj = (Timeline *) obj; - return _obj->getFrameEntries(); +size_t spine_timeline_get_frame_entries(spine_timeline self) { + return ((Timeline*)self)->getFrameEntries(); } -size_t spine_timeline_get_frame_count(spine_timeline obj) { - if (!obj) return 0; - Timeline *_obj = (Timeline *) obj; - return _obj->getFrameCount(); +size_t spine_timeline_get_frame_count(spine_timeline self) { + return ((Timeline*)self)->getFrameCount(); } -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_array_float spine_timeline_get_frames(spine_timeline self) { + return (spine_array_float)&((Timeline*)self)->getFrames(); } -float *spine_timeline_get_frames(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - return (float *) _obj->getFrames().buffer(); +float spine_timeline_get_duration(spine_timeline self) { + return ((Timeline*)self)->getDuration(); } -float spine_timeline_get_duration(spine_timeline obj) { - if (!obj) return 0; - Timeline *_obj = (Timeline *) obj; - return _obj->getDuration(); +spine_array_property_id spine_timeline_get_property_ids(spine_timeline self) { + return (spine_array_property_id)&((Timeline*)self)->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(); -} - -int64_t *spine_timeline_get_property_ids(spine_timeline obj) { - if (!obj) return nullptr; - Timeline *_obj = (Timeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); +spine_rtti spine_timeline_rtti(void) { + return (spine_rtti)&Timeline::rtti; } diff --git a/spine-c-new/src/generated/timeline.h b/spine-c-new/src/generated/timeline.h index a2f24d175..ffb4060c9 100644 --- a/spine-c-new/src/generated/timeline.h +++ b/spine-c-new/src/generated/timeline.h @@ -1,54 +1,26 @@ -/****************************************************************************** - * 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_SPINE_TIMELINE_H +#define SPINE_SPINE_TIMELINE_H -#ifndef SPINE_C_TIMELINE_H -#define SPINE_C_TIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_timeline_dispose(spine_timeline self); -SPINE_C_EXPORT void spine_timeline_dispose(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 float *spine_timeline_get_frames(spine_timeline obj); -SPINE_C_EXPORT float spine_timeline_get_duration(spine_timeline obj); -SPINE_C_EXPORT int32_t spine_timeline_get_num_property_ids(spine_timeline obj); -SPINE_C_EXPORT int64_t *spine_timeline_get_property_ids(spine_timeline obj); +SPINE_C_API spine_rtti spine_timeline_get_rtti(spine_timeline self); +SPINE_C_API void spine_timeline_apply(spine_timeline self, 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_API size_t spine_timeline_get_frame_entries(spine_timeline self); +SPINE_C_API size_t spine_timeline_get_frame_count(spine_timeline self); +SPINE_C_API spine_array_float spine_timeline_get_frames(spine_timeline self); +SPINE_C_API float spine_timeline_get_duration(spine_timeline self); +SPINE_C_API spine_array_property_id spine_timeline_get_property_ids(spine_timeline self); +SPINE_C_API spine_rtti spine_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_property.cpp b/spine-c-new/src/generated/to_property.cpp index c7a76664d..944bb48d6 100644 --- a/spine-c-new/src/generated/to_property.cpp +++ b/spine-c-new/src/generated/to_property.cpp @@ -1,50 +1,40 @@ -/****************************************************************************** - * 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 "to_property.h" #include using namespace spine; -void spine_to_property_dispose(spine_to_property obj) { - if (!obj) return; - delete (ToProperty *) obj; +void spine_to_property_dispose(spine_to_property self) { + delete (ToProperty*)self; } -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(*(TransformConstraintPose*) pose); +float spine_to_property_mix(spine_to_property self, spine_transform_constraint_pose pose) { + return ((ToProperty*)self)->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, bool local, bool additive) { - if (!obj) return ; - ToProperty *_obj = (ToProperty *) obj; - _obj->apply(*(Skeleton*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +void spine_to_property_apply(spine_to_property self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToProperty*)self)->apply(*((Skeleton*)skeleton), *((TransformConstraintPose*)pose), *((BonePose*)bone), value, local, additive); +} + +float spine_to_property_get__offset(spine_to_property self) { + return ((ToProperty*)self)->_offset; +} + +void spine_to_property_set__offset(spine_to_property self, float value) { + ((ToProperty*)self)->_offset = value; +} + +float spine_to_property_get__max(spine_to_property self) { + return ((ToProperty*)self)->_max; +} + +void spine_to_property_set__max(spine_to_property self, float value) { + ((ToProperty*)self)->_max = value; +} + +float spine_to_property_get__scale(spine_to_property self) { + return ((ToProperty*)self)->_scale; +} + +void spine_to_property_set__scale(spine_to_property self, float value) { + ((ToProperty*)self)->_scale = value; } diff --git a/spine-c-new/src/generated/to_property.h b/spine-c-new/src/generated/to_property.h index c74e481d6..45fb077c0 100644 --- a/spine-c-new/src/generated/to_property.h +++ b/spine-c-new/src/generated/to_property.h @@ -1,47 +1,26 @@ -/****************************************************************************** - * 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_SPINE_TO_PROPERTY_H +#define SPINE_SPINE_TO_PROPERTY_H -#ifndef SPINE_C_TOPROPERTY_H -#define SPINE_C_TOPROPERTY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_to_property_dispose(spine_to_property self); -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, bool local, bool additive); +SPINE_C_API float spine_to_property_mix(spine_to_property self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_property_apply(spine_to_property self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); +SPINE_C_API float spine_to_property_get__offset(spine_to_property self); +SPINE_C_API void spine_to_property_set__offset(spine_to_property self, float value); +SPINE_C_API float spine_to_property_get__max(spine_to_property self); +SPINE_C_API void spine_to_property_set__max(spine_to_property self, float value); +SPINE_C_API float spine_to_property_get__scale(spine_to_property self); +SPINE_C_API void spine_to_property_set__scale(spine_to_property self, float value); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOPROPERTY_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_PROPERTY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_rotate.cpp b/spine-c-new/src/generated/to_rotate.cpp index 25274c8b9..54e73f981 100644 --- a/spine-c-new/src/generated/to_rotate.cpp +++ b/spine-c-new/src/generated/to_rotate.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_rotate.h" #include using namespace spine; -void spine_to_rotate_dispose(spine_to_rotate obj) { - if (!obj) return; - delete (ToRotate *) obj; +spine_to_rotate spine_to_rotate_create(void) { + return (spine_to_rotate) new (__FILE__, __LINE__) ToRotate(); } -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(*(TransformConstraintPose*) pose); +void spine_to_rotate_dispose(spine_to_rotate self) { + delete (ToRotate*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_rotate_mix(spine_to_rotate self, spine_transform_constraint_pose pose) { + return ((ToRotate*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_rotate_apply(spine_to_rotate self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToRotate*)self)->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 07d6341f2..ec0141882 100644 --- a/spine-c-new/src/generated/to_rotate.h +++ b/spine-c-new/src/generated/to_rotate.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_ROTATE_H +#define SPINE_SPINE_TO_ROTATE_H -#ifndef SPINE_C_TOROTATE_H -#define SPINE_C_TOROTATE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_rotate spine_to_rotate_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_rotate_dispose(spine_to_rotate self); + +SPINE_C_API float spine_to_rotate_mix(spine_to_rotate self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_rotate_apply(spine_to_rotate self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOROTATE_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_ROTATE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_scale_x.cpp b/spine-c-new/src/generated/to_scale_x.cpp index 063b2acd3..c091a08fd 100644 --- a/spine-c-new/src/generated/to_scale_x.cpp +++ b/spine-c-new/src/generated/to_scale_x.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_scale_x.h" #include using namespace spine; -void spine_to_scale_x_dispose(spine_to_scale_x obj) { - if (!obj) return; - delete (ToScaleX *) obj; +spine_to_scale_x spine_to_scale_x_create(void) { + return (spine_to_scale_x) new (__FILE__, __LINE__) ToScaleX(); } -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(*(TransformConstraintPose*) pose); +void spine_to_scale_x_dispose(spine_to_scale_x self) { + delete (ToScaleX*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_scale_x_mix(spine_to_scale_x self, spine_transform_constraint_pose pose) { + return ((ToScaleX*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_scale_x_apply(spine_to_scale_x self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToScaleX*)self)->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 76d6453e9..27b0dd43e 100644 --- a/spine-c-new/src/generated/to_scale_x.h +++ b/spine-c-new/src/generated/to_scale_x.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_SCALE_X_H +#define SPINE_SPINE_TO_SCALE_X_H -#ifndef SPINE_C_TOSCALEX_H -#define SPINE_C_TOSCALEX_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_scale_x spine_to_scale_x_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_scale_x_dispose(spine_to_scale_x self); + +SPINE_C_API float spine_to_scale_x_mix(spine_to_scale_x self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_scale_x_apply(spine_to_scale_x self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOSCALEX_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_SCALE_X_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_scale_y.cpp b/spine-c-new/src/generated/to_scale_y.cpp index 20af41fc2..6d52769d1 100644 --- a/spine-c-new/src/generated/to_scale_y.cpp +++ b/spine-c-new/src/generated/to_scale_y.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_scale_y.h" #include using namespace spine; -void spine_to_scale_y_dispose(spine_to_scale_y obj) { - if (!obj) return; - delete (ToScaleY *) obj; +spine_to_scale_y spine_to_scale_y_create(void) { + return (spine_to_scale_y) new (__FILE__, __LINE__) ToScaleY(); } -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(*(TransformConstraintPose*) pose); +void spine_to_scale_y_dispose(spine_to_scale_y self) { + delete (ToScaleY*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_scale_y_mix(spine_to_scale_y self, spine_transform_constraint_pose pose) { + return ((ToScaleY*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_scale_y_apply(spine_to_scale_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToScaleY*)self)->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 fb7f6c7f4..1944658da 100644 --- a/spine-c-new/src/generated/to_scale_y.h +++ b/spine-c-new/src/generated/to_scale_y.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_SCALE_Y_H +#define SPINE_SPINE_TO_SCALE_Y_H -#ifndef SPINE_C_TOSCALEY_H -#define SPINE_C_TOSCALEY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_scale_y spine_to_scale_y_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_scale_y_dispose(spine_to_scale_y self); + +SPINE_C_API float spine_to_scale_y_mix(spine_to_scale_y self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_scale_y_apply(spine_to_scale_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOSCALEY_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_SCALE_Y_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_shear_y.cpp b/spine-c-new/src/generated/to_shear_y.cpp index 2f15c0223..b3d38718b 100644 --- a/spine-c-new/src/generated/to_shear_y.cpp +++ b/spine-c-new/src/generated/to_shear_y.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_shear_y.h" #include using namespace spine; -void spine_to_shear_y_dispose(spine_to_shear_y obj) { - if (!obj) return; - delete (ToShearY *) obj; +spine_to_shear_y spine_to_shear_y_create(void) { + return (spine_to_shear_y) new (__FILE__, __LINE__) ToShearY(); } -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(*(TransformConstraintPose*) pose); +void spine_to_shear_y_dispose(spine_to_shear_y self) { + delete (ToShearY*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_shear_y_mix(spine_to_shear_y self, spine_transform_constraint_pose pose) { + return ((ToShearY*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_shear_y_apply(spine_to_shear_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToShearY*)self)->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 1431c94c6..8df8a4236 100644 --- a/spine-c-new/src/generated/to_shear_y.h +++ b/spine-c-new/src/generated/to_shear_y.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_SHEAR_Y_H +#define SPINE_SPINE_TO_SHEAR_Y_H -#ifndef SPINE_C_TOSHEARY_H -#define SPINE_C_TOSHEARY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_shear_y spine_to_shear_y_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_shear_y_dispose(spine_to_shear_y self); + +SPINE_C_API float spine_to_shear_y_mix(spine_to_shear_y self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_shear_y_apply(spine_to_shear_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOSHEARY_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_SHEAR_Y_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_x.cpp b/spine-c-new/src/generated/to_x.cpp index b42ce66ec..20ebca23b 100644 --- a/spine-c-new/src/generated/to_x.cpp +++ b/spine-c-new/src/generated/to_x.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_x.h" #include using namespace spine; -void spine_to_x_dispose(spine_to_x obj) { - if (!obj) return; - delete (ToX *) obj; +spine_to_x spine_to_x_create(void) { + return (spine_to_x) new (__FILE__, __LINE__) ToX(); } -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(*(TransformConstraintPose*) pose); +void spine_to_x_dispose(spine_to_x self) { + delete (ToX*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_x_mix(spine_to_x self, spine_transform_constraint_pose pose) { + return ((ToX*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_x_apply(spine_to_x self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToX*)self)->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 fd0078891..6b543787e 100644 --- a/spine-c-new/src/generated/to_x.h +++ b/spine-c-new/src/generated/to_x.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_X_H +#define SPINE_SPINE_TO_X_H -#ifndef SPINE_C_TOX_H -#define SPINE_C_TOX_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_x spine_to_x_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_x_dispose(spine_to_x self); + +SPINE_C_API float spine_to_x_mix(spine_to_x self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_x_apply(spine_to_x self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOX_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_X_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/to_y.cpp b/spine-c-new/src/generated/to_y.cpp index e74b8cb9f..02e2e0ec3 100644 --- a/spine-c-new/src/generated/to_y.cpp +++ b/spine-c-new/src/generated/to_y.cpp @@ -1,50 +1,20 @@ -/****************************************************************************** - * 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 "to_y.h" #include using namespace spine; -void spine_to_y_dispose(spine_to_y obj) { - if (!obj) return; - delete (ToY *) obj; +spine_to_y spine_to_y_create(void) { + return (spine_to_y) new (__FILE__, __LINE__) ToY(); } -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(*(TransformConstraintPose*) pose); +void spine_to_y_dispose(spine_to_y self) { + delete (ToY*)self; } -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*) skeleton, *(TransformConstraintPose*) pose, *(BonePose*) bone, value, local, additive); +float spine_to_y_mix(spine_to_y self, spine_transform_constraint_pose pose) { + return ((ToY*)self)->mix(*((TransformConstraintPose*)pose)); +} + +void spine_to_y_apply(spine_to_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive) { + ((ToY*)self)->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 dc35984f9..f392afa63 100644 --- a/spine-c-new/src/generated/to_y.h +++ b/spine-c-new/src/generated/to_y.h @@ -1,47 +1,22 @@ -/****************************************************************************** - * 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_SPINE_TO_Y_H +#define SPINE_SPINE_TO_Y_H -#ifndef SPINE_C_TOY_H -#define SPINE_C_TOY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_to_y spine_to_y_create(void); -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, bool local, bool additive); +SPINE_C_API void spine_to_y_dispose(spine_to_y self); + +SPINE_C_API float spine_to_y_mix(spine_to_y self, spine_transform_constraint_pose pose); +SPINE_C_API void spine_to_y_apply(spine_to_y self, spine_skeleton skeleton, spine_transform_constraint_pose pose, spine_bone_pose bone, float value, bool local, bool additive); #ifdef __cplusplus } #endif -#endif // SPINE_C_TOY_H \ No newline at end of file +#endif /* SPINE_SPINE_TO_Y_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/track_entry.cpp b/spine-c-new/src/generated/track_entry.cpp index 8ca65258a..780aed3ef 100644 --- a/spine-c-new/src/generated/track_entry.cpp +++ b/spine-c-new/src/generated/track_entry.cpp @@ -1,367 +1,228 @@ -/****************************************************************************** - * 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 "track_entry.h" #include using namespace spine; spine_track_entry spine_track_entry_create(void) { - TrackEntry *obj = new (__FILE__, __LINE__) TrackEntry(); - return (spine_track_entry) obj; + return (spine_track_entry) new (__FILE__, __LINE__) TrackEntry(); } -void spine_track_entry_dispose(spine_track_entry obj) { - if (!obj) return; - delete (TrackEntry *) obj; +void spine_track_entry_dispose(spine_track_entry self) { + delete (TrackEntry*)self; } -int spine_track_entry_get_track_index(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getTrackIndex(); +int spine_track_entry_get_track_index(spine_track_entry self) { + return ((TrackEntry*)self)->getTrackIndex(); } -spine_animation spine_track_entry_get_animation(spine_track_entry obj) { - if (!obj) return (spine_animation) 0; - TrackEntry *_obj = (TrackEntry *) obj; - return (spine_animation) _obj->getAnimation(); +spine_animation spine_track_entry_get_animation(spine_track_entry self) { + return (spine_animation)((TrackEntry*)self)->getAnimation(); } -void spine_track_entry_set_animation(spine_track_entry obj, spine_animation value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAnimation((Animation *) value); +void spine_track_entry_set_animation(spine_track_entry self, spine_animation animation) { + ((TrackEntry*)self)->setAnimation((Animation *)animation); } -spine_track_entry spine_track_entry_get_previous(spine_track_entry obj) { - if (!obj) return (spine_track_entry) 0; - TrackEntry *_obj = (TrackEntry *) obj; - return (spine_track_entry) _obj->getPrevious(); +spine_track_entry spine_track_entry_get_previous(spine_track_entry self) { + return (spine_track_entry)((TrackEntry*)self)->getPrevious(); } -bool spine_track_entry_get_loop(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getLoop(); +bool spine_track_entry_get_loop(spine_track_entry self) { + return ((TrackEntry*)self)->getLoop(); } -void spine_track_entry_set_loop(spine_track_entry obj, bool value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setLoop(value); +void spine_track_entry_set_loop(spine_track_entry self, bool inValue) { + ((TrackEntry*)self)->setLoop(inValue); } -bool spine_track_entry_get_hold_previous(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getHoldPrevious(); +bool spine_track_entry_get_hold_previous(spine_track_entry self) { + return ((TrackEntry*)self)->getHoldPrevious(); } -void spine_track_entry_set_hold_previous(spine_track_entry obj, bool value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setHoldPrevious(value); +void spine_track_entry_set_hold_previous(spine_track_entry self, bool inValue) { + ((TrackEntry*)self)->setHoldPrevious(inValue); } -bool spine_track_entry_get_reverse(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getReverse(); +bool spine_track_entry_get_reverse(spine_track_entry self) { + return ((TrackEntry*)self)->getReverse(); } -void spine_track_entry_set_reverse(spine_track_entry obj, bool value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setReverse(value); +void spine_track_entry_set_reverse(spine_track_entry self, bool inValue) { + ((TrackEntry*)self)->setReverse(inValue); } -bool spine_track_entry_get_shortest_rotation(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getShortestRotation(); +bool spine_track_entry_get_shortest_rotation(spine_track_entry self) { + return ((TrackEntry*)self)->getShortestRotation(); } -void spine_track_entry_set_shortest_rotation(spine_track_entry obj, bool value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setShortestRotation(value); +void spine_track_entry_set_shortest_rotation(spine_track_entry self, bool inValue) { + ((TrackEntry*)self)->setShortestRotation(inValue); } -float spine_track_entry_get_delay(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getDelay(); +float spine_track_entry_get_delay(spine_track_entry self) { + return ((TrackEntry*)self)->getDelay(); } -void spine_track_entry_set_delay(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setDelay(value); +void spine_track_entry_set_delay(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setDelay(inValue); } -float spine_track_entry_get_track_time(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getTrackTime(); +float spine_track_entry_get_track_time(spine_track_entry self) { + return ((TrackEntry*)self)->getTrackTime(); } -void spine_track_entry_set_track_time(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setTrackTime(value); +void spine_track_entry_set_track_time(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setTrackTime(inValue); } -float spine_track_entry_get_track_end(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getTrackEnd(); +float spine_track_entry_get_track_end(spine_track_entry self) { + return ((TrackEntry*)self)->getTrackEnd(); } -void spine_track_entry_set_track_end(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setTrackEnd(value); +void spine_track_entry_set_track_end(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setTrackEnd(inValue); } -float spine_track_entry_get_animation_start(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAnimationStart(); +float spine_track_entry_get_animation_start(spine_track_entry self) { + return ((TrackEntry*)self)->getAnimationStart(); } -void spine_track_entry_set_animation_start(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAnimationStart(value); +void spine_track_entry_set_animation_start(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setAnimationStart(inValue); } -float spine_track_entry_get_animation_end(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAnimationEnd(); +float spine_track_entry_get_animation_end(spine_track_entry self) { + return ((TrackEntry*)self)->getAnimationEnd(); } -void spine_track_entry_set_animation_end(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAnimationEnd(value); +void spine_track_entry_set_animation_end(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setAnimationEnd(inValue); } -float spine_track_entry_get_animation_last(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAnimationLast(); +float spine_track_entry_get_animation_last(spine_track_entry self) { + return ((TrackEntry*)self)->getAnimationLast(); } -void spine_track_entry_set_animation_last(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAnimationLast(value); +void spine_track_entry_set_animation_last(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setAnimationLast(inValue); } -float spine_track_entry_get_animation_time(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAnimationTime(); +float spine_track_entry_get_animation_time(spine_track_entry self) { + return ((TrackEntry*)self)->getAnimationTime(); } -float spine_track_entry_get_time_scale(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getTimeScale(); +float spine_track_entry_get_time_scale(spine_track_entry self) { + return ((TrackEntry*)self)->getTimeScale(); } -void spine_track_entry_set_time_scale(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setTimeScale(value); +void spine_track_entry_set_time_scale(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setTimeScale(inValue); } -float spine_track_entry_get_alpha(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAlpha(); +float spine_track_entry_get_alpha(spine_track_entry self) { + return ((TrackEntry*)self)->getAlpha(); } -void spine_track_entry_set_alpha(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAlpha(value); +void spine_track_entry_set_alpha(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setAlpha(inValue); } -float spine_track_entry_get_event_threshold(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getEventThreshold(); +float spine_track_entry_get_event_threshold(spine_track_entry self) { + return ((TrackEntry*)self)->getEventThreshold(); } -void spine_track_entry_set_event_threshold(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setEventThreshold(value); +void spine_track_entry_set_event_threshold(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setEventThreshold(inValue); } -float spine_track_entry_get_mix_attachment_threshold(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getMixAttachmentThreshold(); +float spine_track_entry_get_mix_attachment_threshold(spine_track_entry self) { + return ((TrackEntry*)self)->getMixAttachmentThreshold(); } -void spine_track_entry_set_mix_attachment_threshold(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixAttachmentThreshold(value); +void spine_track_entry_set_mix_attachment_threshold(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setMixAttachmentThreshold(inValue); } -float spine_track_entry_get_alpha_attachment_threshold(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getAlphaAttachmentThreshold(); +float spine_track_entry_get_alpha_attachment_threshold(spine_track_entry self) { + return ((TrackEntry*)self)->getAlphaAttachmentThreshold(); } -void spine_track_entry_set_alpha_attachment_threshold(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setAlphaAttachmentThreshold(value); +void spine_track_entry_set_alpha_attachment_threshold(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setAlphaAttachmentThreshold(inValue); } -float spine_track_entry_get_mix_draw_order_threshold(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getMixDrawOrderThreshold(); +float spine_track_entry_get_mix_draw_order_threshold(spine_track_entry self) { + return ((TrackEntry*)self)->getMixDrawOrderThreshold(); } -void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixDrawOrderThreshold(value); +void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setMixDrawOrderThreshold(inValue); } -spine_track_entry spine_track_entry_get_next(spine_track_entry obj) { - if (!obj) return (spine_track_entry) 0; - TrackEntry *_obj = (TrackEntry *) obj; - return (spine_track_entry) _obj->getNext(); +spine_track_entry spine_track_entry_get_next(spine_track_entry self) { + return (spine_track_entry)((TrackEntry*)self)->getNext(); } -bool spine_track_entry_is_complete(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->isComplete(); +bool spine_track_entry_is_complete(spine_track_entry self) { + return ((TrackEntry*)self)->isComplete(); } -float spine_track_entry_get_mix_time(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getMixTime(); +float spine_track_entry_get_mix_time(spine_track_entry self) { + return ((TrackEntry*)self)->getMixTime(); } -void spine_track_entry_set_mix_time(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixTime(value); +void spine_track_entry_set_mix_time(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setMixTime(inValue); } -float spine_track_entry_get_mix_duration(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getMixDuration(); +float spine_track_entry_get_mix_duration(spine_track_entry self) { + return ((TrackEntry*)self)->getMixDuration(); } -void spine_track_entry_set_mix_duration(spine_track_entry obj, float value) { - if (!obj) return; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixDuration(value); +void spine_track_entry_set_mix_duration_1(spine_track_entry self, float inValue) { + ((TrackEntry*)self)->setMixDuration(inValue); } -void spine_track_entry_set_mix_duration(spine_track_entry obj, float mixDuration, float delay) { - if (!obj) return ; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->setMixDuration(mixDuration, delay); +void spine_track_entry_set_mix_duration_2(spine_track_entry self, float mixDuration, float delay) { + ((TrackEntry*)self)->setMixDuration(mixDuration, delay); } -spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry obj) { - if (!obj) return (spine_mix_blend) 0; - TrackEntry *_obj = (TrackEntry *) obj; - return (spine_mix_blend) _obj->getMixBlend(); +spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry self) { + return (spine_mix_blend)((TrackEntry*)self)->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((MixBlend) value); +void spine_track_entry_set_mix_blend(spine_track_entry self, spine_mix_blend blend) { + ((TrackEntry*)self)->setMixBlend((MixBlend)blend); } -spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry obj) { - 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_from(spine_track_entry self) { + return (spine_track_entry)((TrackEntry*)self)->getMixingFrom(); } -spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry obj) { - if (!obj) return (spine_track_entry) 0; - TrackEntry *_obj = (TrackEntry *) obj; - return (spine_track_entry) _obj->getMixingTo(); +spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry self) { + return (spine_track_entry)((TrackEntry*)self)->getMixingTo(); } -void spine_track_entry_reset_rotation_directions(spine_track_entry obj) { - if (!obj) return ; - TrackEntry *_obj = (TrackEntry *) obj; - _obj->resetRotationDirections(); +void spine_track_entry_reset_rotation_directions(spine_track_entry self) { + ((TrackEntry*)self)->resetRotationDirections(); } -float spine_track_entry_get_track_complete(spine_track_entry obj) { - if (!obj) return 0; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->getTrackComplete(); +float spine_track_entry_get_track_complete(spine_track_entry self) { + return ((TrackEntry*)self)->getTrackComplete(); } -bool spine_track_entry_is_empty_animation(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->isEmptyAnimation(); +bool spine_track_entry_is_empty_animation(spine_track_entry self) { + return ((TrackEntry*)self)->isEmptyAnimation(); } -bool spine_track_entry_was_applied(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->wasApplied(); +bool spine_track_entry_was_applied(spine_track_entry self) { + return ((TrackEntry*)self)->wasApplied(); } -bool spine_track_entry_is_next_ready(spine_track_entry obj) { - if (!obj) return false; - TrackEntry *_obj = (TrackEntry *) obj; - return _obj->isNextReady(); +bool spine_track_entry_is_next_ready(spine_track_entry self) { + return ((TrackEntry*)self)->isNextReady(); } -void * spine_track_entry_get_renderer_object(spine_track_entry obj) { - if (!obj) return nullptr; - TrackEntry *_obj = (TrackEntry *) obj; - return (void *) _obj->getRendererObject(); +void * spine_track_entry_get_renderer_object(spine_track_entry self) { + return ((HasRendererObject*)(TrackEntry*)self)->getRendererObject(); } diff --git a/spine-c-new/src/generated/track_entry.h b/spine-c-new/src/generated/track_entry.h index 5c9a3d1bf..ee1b15702 100644 --- a/spine-c-new/src/generated/track_entry.h +++ b/spine-c-new/src/generated/track_entry.h @@ -1,100 +1,74 @@ -/****************************************************************************** - * 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_SPINE_TRACK_ENTRY_H +#define SPINE_SPINE_TRACK_ENTRY_H -#ifndef SPINE_C_TRACKENTRY_H -#define SPINE_C_TRACKENTRY_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_track_entry spine_track_entry_create(void); -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 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 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); -SPINE_C_EXPORT void spine_track_entry_set_track_time(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_track_end(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_track_end(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_animation_start(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_animation_start(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_animation_end(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_animation_end(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_animation_last(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_animation_last(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_animation_time(spine_track_entry obj); -SPINE_C_EXPORT float spine_track_entry_get_time_scale(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_time_scale(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_alpha(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_alpha(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_event_threshold(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_event_threshold(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_mix_attachment_threshold(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_mix_attachment_threshold(spine_track_entry obj, float value); -SPINE_C_EXPORT float spine_track_entry_get_alpha_attachment_threshold(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_alpha_attachment_threshold(spine_track_entry obj, float value); -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 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); -SPINE_C_EXPORT void spine_track_entry_set_mix_duration(spine_track_entry obj, float value); -SPINE_C_EXPORT void spine_track_entry_set_mix_duration(spine_track_entry obj, float mixDuration, float delay); -SPINE_C_EXPORT spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry obj); -SPINE_C_EXPORT void spine_track_entry_set_mix_blend(spine_track_entry obj, spine_mix_blend value); -SPINE_C_EXPORT spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry obj); -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 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); +SPINE_C_API void spine_track_entry_dispose(spine_track_entry self); + +SPINE_C_API int spine_track_entry_get_track_index(spine_track_entry self); +SPINE_C_API spine_animation spine_track_entry_get_animation(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_animation(spine_track_entry self, spine_animation animation); +SPINE_C_API spine_track_entry spine_track_entry_get_previous(spine_track_entry self); +SPINE_C_API bool spine_track_entry_get_loop(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_loop(spine_track_entry self, bool inValue); +SPINE_C_API bool spine_track_entry_get_hold_previous(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_hold_previous(spine_track_entry self, bool inValue); +SPINE_C_API bool spine_track_entry_get_reverse(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_reverse(spine_track_entry self, bool inValue); +SPINE_C_API bool spine_track_entry_get_shortest_rotation(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_shortest_rotation(spine_track_entry self, bool inValue); +SPINE_C_API float spine_track_entry_get_delay(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_delay(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_track_time(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_track_time(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_track_end(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_track_end(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_animation_start(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_animation_start(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_animation_end(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_animation_end(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_animation_last(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_animation_last(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_animation_time(spine_track_entry self); +SPINE_C_API float spine_track_entry_get_time_scale(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_time_scale(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_alpha(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_alpha(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_event_threshold(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_event_threshold(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_mix_attachment_threshold(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_mix_attachment_threshold(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_alpha_attachment_threshold(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_alpha_attachment_threshold(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_mix_draw_order_threshold(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry self, float inValue); +SPINE_C_API spine_track_entry spine_track_entry_get_next(spine_track_entry self); +SPINE_C_API bool spine_track_entry_is_complete(spine_track_entry self); +SPINE_C_API float spine_track_entry_get_mix_time(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_mix_time(spine_track_entry self, float inValue); +SPINE_C_API float spine_track_entry_get_mix_duration(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_mix_duration_1(spine_track_entry self, float inValue); +SPINE_C_API void spine_track_entry_set_mix_duration_2(spine_track_entry self, float mixDuration, float delay); +SPINE_C_API spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry self); +SPINE_C_API void spine_track_entry_set_mix_blend(spine_track_entry self, spine_mix_blend blend); +SPINE_C_API spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry self); +SPINE_C_API spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry self); +SPINE_C_API void spine_track_entry_reset_rotation_directions(spine_track_entry self); +SPINE_C_API float spine_track_entry_get_track_complete(spine_track_entry self); +SPINE_C_API bool spine_track_entry_is_empty_animation(spine_track_entry self); +SPINE_C_API bool spine_track_entry_was_applied(spine_track_entry self); +SPINE_C_API bool spine_track_entry_is_next_ready(spine_track_entry self); +SPINE_C_API void * spine_track_entry_get_renderer_object(spine_track_entry self); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRACKENTRY_H \ No newline at end of file +#endif /* SPINE_SPINE_TRACK_ENTRY_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/transform_constraint.cpp b/spine-c-new/src/generated/transform_constraint.cpp index f3a40ad70..0bb97597d 100644 --- a/spine-c-new/src/generated/transform_constraint.cpp +++ b/spine-c-new/src/generated/transform_constraint.cpp @@ -1,155 +1,80 @@ -/****************************************************************************** - * 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 "transform_constraint.h" #include using namespace spine; spine_transform_constraint spine_transform_constraint_create(spine_transform_constraint_data data, spine_skeleton skeleton) { - TransformConstraint *obj = new (__FILE__, __LINE__) TransformConstraint(*(TransformConstraintData*) data, *(Skeleton*) skeleton); - return (spine_transform_constraint) obj; + return (spine_transform_constraint) new (__FILE__, __LINE__) TransformConstraint(*((TransformConstraintData*)data), *((Skeleton*)skeleton)); } -void spine_transform_constraint_dispose(spine_transform_constraint obj) { - if (!obj) return; - delete (TransformConstraint *) obj; +void spine_transform_constraint_dispose(spine_transform_constraint self) { + delete (TransformConstraint*)self; } -spine_rtti spine_transform_constraint_get_rtti() { - return (spine_rtti) &TransformConstraint::rtti; +spine_rtti spine_transform_constraint_get_rtti(spine_transform_constraint self) { + return (spine_rtti)&((TransformConstraint*)self)->getRTTI(); } -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*) skeleton); +spine_transform_constraint spine_transform_constraint_copy(spine_transform_constraint self, spine_skeleton skeleton) { + return (spine_transform_constraint)((TransformConstraint*)self)->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*) skeleton, (Physics) physics); +void spine_transform_constraint_update(spine_transform_constraint self, spine_skeleton skeleton, spine_physics physics) { + ((TransformConstraint*)self)->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*) skeleton); +void spine_transform_constraint_sort(spine_transform_constraint self, spine_skeleton skeleton) { + ((TransformConstraint*)self)->sort(*((Skeleton*)skeleton)); } -bool spine_transform_constraint_is_source_active(spine_transform_constraint obj) { - if (!obj) return false; - TransformConstraint *_obj = (TransformConstraint *) obj; - return _obj->isSourceActive(); +bool spine_transform_constraint_is_source_active(spine_transform_constraint self) { + return ((TransformConstraint*)self)->isSourceActive(); } -int32_t spine_transform_constraint_get_num_bones(spine_transform_constraint obj) { - if (!obj) return 0; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_pose spine_transform_constraint_get_bones(spine_transform_constraint self) { + return (spine_array_bone_pose)&((TransformConstraint*)self)->getBones(); } -spine_bone_pose *spine_transform_constraint_get_bones(spine_transform_constraint obj) { - if (!obj) return nullptr; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_bone_pose *) _obj->getBones().buffer(); +spine_bone spine_transform_constraint_get_source(spine_transform_constraint self) { + return (spine_bone)((TransformConstraint*)self)->getSource(); } -spine_bone spine_transform_constraint_get_source(spine_transform_constraint obj) { - if (!obj) return (spine_bone) 0; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_bone) _obj->getSource(); +void spine_transform_constraint_set_source(spine_transform_constraint self, spine_bone source) { + ((TransformConstraint*)self)->setSource((Bone *)source); } -void spine_transform_constraint_set_source(spine_transform_constraint obj, spine_bone value) { - if (!obj) return; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->setSource((Bone *) value); +spine_constraint_data spine_transform_constraint_get_data(spine_transform_constraint self) { + return (spine_constraint_data)&((ConstraintGeneric*)(TransformConstraint*)self)->getData(); } -spine_constraint_data spine_transform_constraint_get_data(spine_transform_constraint obj) { - if (!obj) return 0; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_constraint_data) &_obj->getData(); +spine_transform_constraint_pose spine_transform_constraint_get_pose(spine_transform_constraint self) { + return (spine_transform_constraint_pose)&((ConstraintGeneric*)(TransformConstraint*)self)->getPose(); } -void spine_transform_constraint_pose(spine_transform_constraint obj) { - if (!obj) return ; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->pose(); +spine_transform_constraint_pose spine_transform_constraint_get_applied_pose(spine_transform_constraint self) { + return (spine_transform_constraint_pose)&((ConstraintGeneric*)(TransformConstraint*)self)->getAppliedPose(); } -void spine_transform_constraint_setup_pose(spine_transform_constraint obj) { - if (!obj) return ; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->setupPose(); +void spine_transform_constraint_reset_constrained(spine_transform_constraint self) { + ((ConstraintGeneric*)(TransformConstraint*)self)->resetConstrained(); } -spine_transform_constraint_pose spine_transform_constraint_get_pose(spine_transform_constraint obj) { - if (!obj) return 0; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_transform_constraint_pose) &_obj->getPose(); +void spine_transform_constraint_constrained(spine_transform_constraint self) { + ((ConstraintGeneric*)(TransformConstraint*)self)->constrained(); } -spine_transform_constraint_pose spine_transform_constraint_get_applied_pose(spine_transform_constraint obj) { - if (!obj) return 0; - TransformConstraint *_obj = (TransformConstraint *) obj; - return (spine_transform_constraint_pose) &_obj->getAppliedPose(); +bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint self) { + return ((ConstraintGeneric*)(TransformConstraint*)self)->isPoseEqualToApplied(); } -void spine_transform_constraint_reset_constrained(spine_transform_constraint obj) { - if (!obj) return ; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->resetConstrained(); +bool spine_transform_constraint_is_active(spine_transform_constraint self) { + return ((ConstraintGeneric*)(TransformConstraint*)self)->isActive(); } -void spine_transform_constraint_constrained(spine_transform_constraint obj) { - if (!obj) return ; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->constrained(); +void spine_transform_constraint_set_active(spine_transform_constraint self, bool active) { + ((ConstraintGeneric*)(TransformConstraint*)self)->setActive(active); } -bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint obj) { - if (!obj) return false; - TransformConstraint *_obj = (TransformConstraint *) obj; - return _obj->isPoseEqualToApplied(); -} - -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, bool value) { - if (!obj) return; - TransformConstraint *_obj = (TransformConstraint *) obj; - _obj->setActive(value); +spine_rtti spine_transform_constraint_rtti(void) { + return (spine_rtti)&TransformConstraint::rtti; } diff --git a/spine-c-new/src/generated/transform_constraint.h b/spine-c-new/src/generated/transform_constraint.h index b1bbb0c00..19ab44d84 100644 --- a/spine-c-new/src/generated/transform_constraint.h +++ b/spine-c-new/src/generated/transform_constraint.h @@ -1,65 +1,37 @@ -/****************************************************************************** - * 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_SPINE_TRANSFORM_CONSTRAINT_H +#define SPINE_SPINE_TRANSFORM_CONSTRAINT_H -#ifndef SPINE_C_TRANSFORMCONSTRAINT_H -#define SPINE_C_TRANSFORMCONSTRAINT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_transform_constraint spine_transform_constraint_create(spine_transform_constraint_data data, spine_skeleton skeleton); -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_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 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); -SPINE_C_EXPORT void spine_transform_constraint_set_source(spine_transform_constraint obj, spine_bone value); -SPINE_C_EXPORT spine_constraint_data spine_transform_constraint_get_data(spine_transform_constraint obj); -SPINE_C_EXPORT void spine_transform_constraint_pose(spine_transform_constraint obj); -SPINE_C_EXPORT void spine_transform_constraint_setup_pose(spine_transform_constraint obj); -SPINE_C_EXPORT spine_transform_constraint_pose spine_transform_constraint_get_pose(spine_transform_constraint obj); -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 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); +SPINE_C_API void spine_transform_constraint_dispose(spine_transform_constraint self); + +SPINE_C_API spine_rtti spine_transform_constraint_get_rtti(spine_transform_constraint self); +SPINE_C_API spine_transform_constraint spine_transform_constraint_copy(spine_transform_constraint self, spine_skeleton skeleton); +SPINE_C_API void spine_transform_constraint_update(spine_transform_constraint self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API void spine_transform_constraint_sort(spine_transform_constraint self, spine_skeleton skeleton); +SPINE_C_API bool spine_transform_constraint_is_source_active(spine_transform_constraint self); +SPINE_C_API spine_array_bone_pose spine_transform_constraint_get_bones(spine_transform_constraint self); +SPINE_C_API spine_bone spine_transform_constraint_get_source(spine_transform_constraint self); +SPINE_C_API void spine_transform_constraint_set_source(spine_transform_constraint self, spine_bone source); +SPINE_C_API spine_constraint_data spine_transform_constraint_get_data(spine_transform_constraint self); +SPINE_C_API spine_transform_constraint_pose spine_transform_constraint_get_pose(spine_transform_constraint self); +SPINE_C_API spine_transform_constraint_pose spine_transform_constraint_get_applied_pose(spine_transform_constraint self); +SPINE_C_API void spine_transform_constraint_reset_constrained(spine_transform_constraint self); +SPINE_C_API void spine_transform_constraint_constrained(spine_transform_constraint self); +SPINE_C_API bool spine_transform_constraint_is_pose_equal_to_applied(spine_transform_constraint self); +SPINE_C_API bool spine_transform_constraint_is_active(spine_transform_constraint self); +SPINE_C_API void spine_transform_constraint_set_active(spine_transform_constraint self, bool active); +SPINE_C_API spine_rtti spine_transform_constraint_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSFORMCONSTRAINT_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSFORM_CONSTRAINT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/transform_constraint_data.cpp b/spine-c-new/src/generated/transform_constraint_data.cpp index 4c90d3970..40a2434e3 100644 --- a/spine-c-new/src/generated/transform_constraint_data.cpp +++ b/spine-c-new/src/generated/transform_constraint_data.cpp @@ -1,227 +1,136 @@ -/****************************************************************************** - * 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 "transform_constraint_data.h" #include using namespace spine; 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; + return (spine_transform_constraint_data) new (__FILE__, __LINE__) TransformConstraintData(*((const String*)name)); } -void spine_transform_constraint_data_dispose(spine_transform_constraint_data obj) { - if (!obj) return; - delete (TransformConstraintData *) obj; +void spine_transform_constraint_data_dispose(spine_transform_constraint_data self) { + delete (TransformConstraintData*)self; } -spine_rtti spine_transform_constraint_data_get_rtti() { - return (spine_rtti) &TransformConstraintData::rtti; +spine_rtti spine_transform_constraint_data_get_rtti(spine_transform_constraint_data self) { + return (spine_rtti)&((TransformConstraintData*)self)->getRTTI(); } -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*) skeleton); +spine_constraint spine_transform_constraint_data_create_method(spine_transform_constraint_data self, spine_skeleton skeleton) { + return (spine_constraint)((TransformConstraintData*)self)->create(*((Skeleton*)skeleton)); } -int32_t spine_transform_constraint_data_get_num_bones(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (int32_t) _obj->getBones().size(); +spine_array_bone_data spine_transform_constraint_data_get_bones(spine_transform_constraint_data self) { + return (spine_array_bone_data)&((TransformConstraintData*)self)->getBones(); } -spine_bone_data *spine_transform_constraint_data_get_bones(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (spine_bone_data *) _obj->getBones().buffer(); +spine_bone_data spine_transform_constraint_data_get_source(spine_transform_constraint_data self) { + return (spine_bone_data)((TransformConstraintData*)self)->getSource(); } -spine_bone_data spine_transform_constraint_data_get_source(spine_transform_constraint_data obj) { - if (!obj) return (spine_bone_data) 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (spine_bone_data) _obj->getSource(); +void spine_transform_constraint_data_set_source(spine_transform_constraint_data self, spine_bone_data source) { + ((TransformConstraintData*)self)->setSource((BoneData *)source); } -void spine_transform_constraint_data_set_source(spine_transform_constraint_data obj, spine_bone_data value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setSource((BoneData *) value); +float spine_transform_constraint_data_get_offset_rotation(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetRotation(); } -float spine_transform_constraint_data_get_offset_rotation(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetRotation(); +void spine_transform_constraint_data_set_offset_rotation(spine_transform_constraint_data self, float offsetRotation) { + ((TransformConstraintData*)self)->setOffsetRotation(offsetRotation); } -void spine_transform_constraint_data_set_offset_rotation(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetRotation(value); +float spine_transform_constraint_data_get_offset_x(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetX(); } -float spine_transform_constraint_data_get_offset_x(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetX(); +void spine_transform_constraint_data_set_offset_x(spine_transform_constraint_data self, float offsetX) { + ((TransformConstraintData*)self)->setOffsetX(offsetX); } -void spine_transform_constraint_data_set_offset_x(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetX(value); +float spine_transform_constraint_data_get_offset_y(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetY(); } -float spine_transform_constraint_data_get_offset_y(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetY(); +void spine_transform_constraint_data_set_offset_y(spine_transform_constraint_data self, float offsetY) { + ((TransformConstraintData*)self)->setOffsetY(offsetY); } -void spine_transform_constraint_data_set_offset_y(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetY(value); +float spine_transform_constraint_data_get_offset_scale_x(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetScaleX(); } -float spine_transform_constraint_data_get_offset_scale_x(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetScaleX(); +void spine_transform_constraint_data_set_offset_scale_x(spine_transform_constraint_data self, float offsetScaleX) { + ((TransformConstraintData*)self)->setOffsetScaleX(offsetScaleX); } -void spine_transform_constraint_data_set_offset_scale_x(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetScaleX(value); +float spine_transform_constraint_data_get_offset_scale_y(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetScaleY(); } -float spine_transform_constraint_data_get_offset_scale_y(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetScaleY(); +void spine_transform_constraint_data_set_offset_scale_y(spine_transform_constraint_data self, float offsetScaleY) { + ((TransformConstraintData*)self)->setOffsetScaleY(offsetScaleY); } -void spine_transform_constraint_data_set_offset_scale_y(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetScaleY(value); +float spine_transform_constraint_data_get_offset_shear_y(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getOffsetShearY(); } -float spine_transform_constraint_data_get_offset_shear_y(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->getOffsetShearY(); +void spine_transform_constraint_data_set_offset_shear_y(spine_transform_constraint_data self, float offsetShearY) { + ((TransformConstraintData*)self)->setOffsetShearY(offsetShearY); } -void spine_transform_constraint_data_set_offset_shear_y(spine_transform_constraint_data obj, float value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setOffsetShearY(value); +bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getLocalSource(); } -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 self, bool localSource) { + ((TransformConstraintData*)self)->setLocalSource(localSource); } -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); +bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getLocalTarget(); } -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 self, bool localTarget) { + ((TransformConstraintData*)self)->setLocalTarget(localTarget); } -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); +bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getAdditive(); } -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 self, bool additive) { + ((TransformConstraintData*)self)->setAdditive(additive); } -void spine_transform_constraint_data_set_additive(spine_transform_constraint_data obj, bool value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setAdditive(value); +bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data self) { + return ((TransformConstraintData*)self)->getClamp(); } -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 self, bool clamp) { + ((TransformConstraintData*)self)->setClamp(clamp); } -void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data obj, bool value) { - if (!obj) return; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - _obj->setClamp(value); +spine_array_from_property spine_transform_constraint_data_get_properties(spine_transform_constraint_data self) { + return (spine_array_from_property)&((TransformConstraintData*)self)->getProperties(); } -int32_t spine_transform_constraint_data_get_num_properties(spine_transform_constraint_data obj) { - if (!obj) return 0; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (int32_t) _obj->getProperties().size(); +const char* spine_transform_constraint_data_get_name(spine_transform_constraint_data self) { + return (const char*)&((ConstraintDataGeneric*)(TransformConstraintData*)self)->getName(); } -spine_class from_property *spine_transform_constraint_data_get_properties(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (spine_class from_property *) _obj->getProperties().buffer(); +bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data self) { + return ((ConstraintDataGeneric*)(TransformConstraintData*)self)->isSkinRequired(); } -const char* spine_transform_constraint_data_get_name(spine_transform_constraint_data obj) { - if (!obj) return nullptr; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return (const char *) _obj->getName().buffer(); +spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data self) { + return (spine_transform_constraint_pose)&((ConstraintDataGeneric*)(TransformConstraintData*)self)->getSetupPose(); } -bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data obj) { - if (!obj) return false; - TransformConstraintData *_obj = (TransformConstraintData *) obj; - return _obj->isSkinRequired(); +void spine_transform_constraint_data_set_skin_required(spine_transform_constraint_data self, bool skinRequired) { + ((ConstraintDataGeneric*)(TransformConstraintData*)self)->setSkinRequired(skinRequired); } -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 (spine_transform_constraint_pose) &_obj->getSetupPose(); +spine_rtti spine_transform_constraint_data_rtti(void) { + return (spine_rtti)&TransformConstraintData::rtti; } diff --git a/spine-c-new/src/generated/transform_constraint_data.h b/spine-c-new/src/generated/transform_constraint_data.h index b9b805298..40a9ecb37 100644 --- a/spine-c-new/src/generated/transform_constraint_data.h +++ b/spine-c-new/src/generated/transform_constraint_data.h @@ -1,77 +1,51 @@ -/****************************************************************************** - * 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_SPINE_TRANSFORM_CONSTRAINT_DATA_H +#define SPINE_SPINE_TRANSFORM_CONSTRAINT_DATA_H -#ifndef SPINE_C_TRANSFORMCONSTRAINTDATA_H -#define SPINE_C_TRANSFORMCONSTRAINTDATA_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_transform_constraint_data spine_transform_constraint_data_create(const char* 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_C_EXPORT spine_constraint spine_transform_constraint_data_create(spine_transform_constraint_data obj, spine_skeleton skeleton); -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); -SPINE_C_EXPORT void spine_transform_constraint_data_set_source(spine_transform_constraint_data obj, spine_bone_data value); -SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_rotation(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_rotation(spine_transform_constraint_data obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_x(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_x(spine_transform_constraint_data obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_y(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_y(spine_transform_constraint_data obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_scale_x(spine_transform_constraint_data obj); -SPINE_C_EXPORT void spine_transform_constraint_data_set_offset_scale_x(spine_transform_constraint_data obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_data_get_offset_scale_y(spine_transform_constraint_data obj); -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 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 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); +SPINE_C_API void spine_transform_constraint_data_dispose(spine_transform_constraint_data self); + +SPINE_C_API spine_rtti spine_transform_constraint_data_get_rtti(spine_transform_constraint_data self); +SPINE_C_API spine_constraint spine_transform_constraint_data_create_method(spine_transform_constraint_data self, spine_skeleton skeleton); +SPINE_C_API spine_array_bone_data spine_transform_constraint_data_get_bones(spine_transform_constraint_data self); +SPINE_C_API spine_bone_data spine_transform_constraint_data_get_source(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_source(spine_transform_constraint_data self, spine_bone_data source); +SPINE_C_API float spine_transform_constraint_data_get_offset_rotation(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_rotation(spine_transform_constraint_data self, float offsetRotation); +SPINE_C_API float spine_transform_constraint_data_get_offset_x(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_x(spine_transform_constraint_data self, float offsetX); +SPINE_C_API float spine_transform_constraint_data_get_offset_y(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_y(spine_transform_constraint_data self, float offsetY); +SPINE_C_API float spine_transform_constraint_data_get_offset_scale_x(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_scale_x(spine_transform_constraint_data self, float offsetScaleX); +SPINE_C_API float spine_transform_constraint_data_get_offset_scale_y(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_scale_y(spine_transform_constraint_data self, float offsetScaleY); +SPINE_C_API float spine_transform_constraint_data_get_offset_shear_y(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_offset_shear_y(spine_transform_constraint_data self, float offsetShearY); +SPINE_C_API bool spine_transform_constraint_data_get_local_source(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_local_source(spine_transform_constraint_data self, bool localSource); +SPINE_C_API bool spine_transform_constraint_data_get_local_target(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_local_target(spine_transform_constraint_data self, bool localTarget); +SPINE_C_API bool spine_transform_constraint_data_get_additive(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_additive(spine_transform_constraint_data self, bool additive); +SPINE_C_API bool spine_transform_constraint_data_get_clamp(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_clamp(spine_transform_constraint_data self, bool clamp); +SPINE_C_API spine_array_from_property spine_transform_constraint_data_get_properties(spine_transform_constraint_data self); +SPINE_C_API const char* spine_transform_constraint_data_get_name(spine_transform_constraint_data self); +SPINE_C_API bool spine_transform_constraint_data_is_skin_required(spine_transform_constraint_data self); +SPINE_C_API spine_transform_constraint_pose spine_transform_constraint_data_get_setup_pose(spine_transform_constraint_data self); +SPINE_C_API void spine_transform_constraint_data_set_skin_required(spine_transform_constraint_data self, bool skinRequired); +SPINE_C_API spine_rtti spine_transform_constraint_data_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSFORMCONSTRAINTDATA_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSFORM_CONSTRAINT_DATA_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/transform_constraint_pose.cpp b/spine-c-new/src/generated/transform_constraint_pose.cpp index 970a9f793..1ba64bd0a 100644 --- a/spine-c-new/src/generated/transform_constraint_pose.cpp +++ b/spine-c-new/src/generated/transform_constraint_pose.cpp @@ -1,121 +1,64 @@ -/****************************************************************************** - * 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 "transform_constraint_pose.h" #include using namespace spine; spine_transform_constraint_pose spine_transform_constraint_pose_create(void) { - TransformConstraintPose *obj = new (__FILE__, __LINE__) TransformConstraintPose(); - return (spine_transform_constraint_pose) obj; + return (spine_transform_constraint_pose) new (__FILE__, __LINE__) TransformConstraintPose(); } -void spine_transform_constraint_pose_dispose(spine_transform_constraint_pose obj) { - if (!obj) return; - delete (TransformConstraintPose *) obj; +void spine_transform_constraint_pose_dispose(spine_transform_constraint_pose self) { + delete (TransformConstraintPose*)self; } -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(*((TransformConstraintPose*) value)); +void spine_transform_constraint_pose_set(spine_transform_constraint_pose self, spine_transform_constraint_pose pose) { + ((TransformConstraintPose*)self)->set(*((TransformConstraintPose*)pose)); } -float spine_transform_constraint_pose_get_mix_rotate(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixRotate(); +float spine_transform_constraint_pose_get_mix_rotate(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixRotate(); } -void spine_transform_constraint_pose_set_mix_rotate(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixRotate(value); +void spine_transform_constraint_pose_set_mix_rotate(spine_transform_constraint_pose self, float mixRotate) { + ((TransformConstraintPose*)self)->setMixRotate(mixRotate); } -float spine_transform_constraint_pose_get_mix_x(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixX(); +float spine_transform_constraint_pose_get_mix_x(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixX(); } -void spine_transform_constraint_pose_set_mix_x(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixX(value); +void spine_transform_constraint_pose_set_mix_x(spine_transform_constraint_pose self, float mixX) { + ((TransformConstraintPose*)self)->setMixX(mixX); } -float spine_transform_constraint_pose_get_mix_y(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixY(); +float spine_transform_constraint_pose_get_mix_y(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixY(); } -void spine_transform_constraint_pose_set_mix_y(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixY(value); +void spine_transform_constraint_pose_set_mix_y(spine_transform_constraint_pose self, float mixY) { + ((TransformConstraintPose*)self)->setMixY(mixY); } -float spine_transform_constraint_pose_get_mix_scale_x(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixScaleX(); +float spine_transform_constraint_pose_get_mix_scale_x(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixScaleX(); } -void spine_transform_constraint_pose_set_mix_scale_x(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixScaleX(value); +void spine_transform_constraint_pose_set_mix_scale_x(spine_transform_constraint_pose self, float mixScaleX) { + ((TransformConstraintPose*)self)->setMixScaleX(mixScaleX); } -float spine_transform_constraint_pose_get_mix_scale_y(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixScaleY(); +float spine_transform_constraint_pose_get_mix_scale_y(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixScaleY(); } -void spine_transform_constraint_pose_set_mix_scale_y(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixScaleY(value); +void spine_transform_constraint_pose_set_mix_scale_y(spine_transform_constraint_pose self, float mixScaleY) { + ((TransformConstraintPose*)self)->setMixScaleY(mixScaleY); } -float spine_transform_constraint_pose_get_mix_shear_y(spine_transform_constraint_pose obj) { - if (!obj) return 0; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - return _obj->getMixShearY(); +float spine_transform_constraint_pose_get_mix_shear_y(spine_transform_constraint_pose self) { + return ((TransformConstraintPose*)self)->getMixShearY(); } -void spine_transform_constraint_pose_set_mix_shear_y(spine_transform_constraint_pose obj, float value) { - if (!obj) return; - TransformConstraintPose *_obj = (TransformConstraintPose *) obj; - _obj->setMixShearY(value); +void spine_transform_constraint_pose_set_mix_shear_y(spine_transform_constraint_pose self, float mixShearY) { + ((TransformConstraintPose*)self)->setMixShearY(mixShearY); } diff --git a/spine-c-new/src/generated/transform_constraint_pose.h b/spine-c-new/src/generated/transform_constraint_pose.h index 886f92b17..583b13b90 100644 --- a/spine-c-new/src/generated/transform_constraint_pose.h +++ b/spine-c-new/src/generated/transform_constraint_pose.h @@ -1,59 +1,33 @@ -/****************************************************************************** - * 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_SPINE_TRANSFORM_CONSTRAINT_POSE_H +#define SPINE_SPINE_TRANSFORM_CONSTRAINT_POSE_H -#ifndef SPINE_C_TRANSFORMCONSTRAINTPOSE_H -#define SPINE_C_TRANSFORMCONSTRAINTPOSE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_transform_constraint_pose spine_transform_constraint_pose_create(void); -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); -SPINE_C_EXPORT void spine_transform_constraint_pose_set(spine_transform_constraint_pose obj, spine_transform_constraint_pose value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_rotate(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_rotate(spine_transform_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_x(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_x(spine_transform_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_y(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_y(spine_transform_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_scale_x(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_scale_x(spine_transform_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_scale_y(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_scale_y(spine_transform_constraint_pose obj, float value); -SPINE_C_EXPORT float spine_transform_constraint_pose_get_mix_shear_y(spine_transform_constraint_pose obj); -SPINE_C_EXPORT void spine_transform_constraint_pose_set_mix_shear_y(spine_transform_constraint_pose obj, float value); +SPINE_C_API void spine_transform_constraint_pose_dispose(spine_transform_constraint_pose self); + +SPINE_C_API void spine_transform_constraint_pose_set(spine_transform_constraint_pose self, spine_transform_constraint_pose pose); +SPINE_C_API float spine_transform_constraint_pose_get_mix_rotate(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_rotate(spine_transform_constraint_pose self, float mixRotate); +SPINE_C_API float spine_transform_constraint_pose_get_mix_x(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_x(spine_transform_constraint_pose self, float mixX); +SPINE_C_API float spine_transform_constraint_pose_get_mix_y(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_y(spine_transform_constraint_pose self, float mixY); +SPINE_C_API float spine_transform_constraint_pose_get_mix_scale_x(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_scale_x(spine_transform_constraint_pose self, float mixScaleX); +SPINE_C_API float spine_transform_constraint_pose_get_mix_scale_y(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_scale_y(spine_transform_constraint_pose self, float mixScaleY); +SPINE_C_API float spine_transform_constraint_pose_get_mix_shear_y(spine_transform_constraint_pose self); +SPINE_C_API void spine_transform_constraint_pose_set_mix_shear_y(spine_transform_constraint_pose self, float mixShearY); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSFORMCONSTRAINTPOSE_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSFORM_CONSTRAINT_POSE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/transform_constraint_timeline.cpp b/spine-c-new/src/generated/transform_constraint_timeline.cpp index c3e31c8e9..bcb404ece 100644 --- a/spine-c-new/src/generated/transform_constraint_timeline.cpp +++ b/spine-c-new/src/generated/transform_constraint_timeline.cpp @@ -1,149 +1,76 @@ -/****************************************************************************** - * 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 "transform_constraint_timeline.h" #include using namespace spine; 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; + return (spine_transform_constraint_timeline) new (__FILE__, __LINE__) TransformConstraintTimeline(frameCount, bezierCount, transformConstraintIndex); } -void spine_transform_constraint_timeline_dispose(spine_transform_constraint_timeline obj) { - if (!obj) return; - delete (TransformConstraintTimeline *) obj; +void spine_transform_constraint_timeline_dispose(spine_transform_constraint_timeline self) { + delete (TransformConstraintTimeline*)self; } -spine_rtti spine_transform_constraint_timeline_get_rtti() { - return (spine_rtti) &TransformConstraintTimeline::rtti; +spine_rtti spine_transform_constraint_timeline_get_rtti(spine_transform_constraint_timeline self) { + return (spine_rtti)&((TransformConstraintTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((TransformConstraintTimeline*)self)->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, 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_frame(spine_transform_constraint_timeline self, int frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY) { + ((TransformConstraintTimeline*)self)->setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY); } -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_linear(spine_transform_constraint_timeline self, size_t frame) { + ((CurveTimeline*)(TransformConstraintTimeline*)self)->setLinear(frame); } -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_stepped(spine_transform_constraint_timeline self, size_t frame) { + ((CurveTimeline*)(TransformConstraintTimeline*)self)->setStepped(frame); } -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); +void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((CurveTimeline*)(TransformConstraintTimeline*)self)->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, size_t frame, size_t valueOffset, size_t i) { - if (!obj) return 0; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return _obj->getBezierValue(time, frame, valueOffset, i); +float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((CurveTimeline*)(TransformConstraintTimeline*)self)->getBezierValue(time, frame, valueOffset, i); } -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_array_float spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline*)(TransformConstraintTimeline*)self)->getCurves(); } -float *spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (float *) _obj->getCurves().buffer(); +size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline self) { + return ((CurveTimeline*)(TransformConstraintTimeline*)self)->getFrameEntries(); } -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(); +size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline self) { + return ((CurveTimeline*)(TransformConstraintTimeline*)self)->getFrameCount(); } -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(); +spine_array_float spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline self) { + return (spine_array_float)&((CurveTimeline*)(TransformConstraintTimeline*)self)->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(); +float spine_transform_constraint_timeline_get_duration(spine_transform_constraint_timeline self) { + return ((CurveTimeline*)(TransformConstraintTimeline*)self)->getDuration(); } -float *spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (float *) _obj->getFrames().buffer(); +spine_array_property_id spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline self) { + return (spine_array_property_id)&((CurveTimeline*)(TransformConstraintTimeline*)self)->getPropertyIds(); } -float spine_transform_constraint_timeline_get_duration(spine_transform_constraint_timeline obj) { - if (!obj) return 0; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return _obj->getDuration(); +int spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline self) { + return ((ConstraintTimeline*)(TransformConstraintTimeline*)self)->getConstraintIndex(); } -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(); +void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline self, int inValue) { + ((ConstraintTimeline*)(TransformConstraintTimeline*)self)->setConstraintIndex(inValue); } -int64_t *spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline obj) { - if (!obj) return nullptr; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - return (int64_t *) _obj->getPropertyIds().buffer(); -} - -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, int value) { - if (!obj) return; - TransformConstraintTimeline *_obj = (TransformConstraintTimeline *) obj; - _obj->setConstraintIndex(value); +spine_rtti spine_transform_constraint_timeline_rtti(void) { + return (spine_rtti)&TransformConstraintTimeline::rtti; } diff --git a/spine-c-new/src/generated/transform_constraint_timeline.h b/spine-c-new/src/generated/transform_constraint_timeline.h index 1f5358f99..96a336ddb 100644 --- a/spine-c-new/src/generated/transform_constraint_timeline.h +++ b/spine-c-new/src/generated/transform_constraint_timeline.h @@ -1,64 +1,36 @@ -/****************************************************************************** - * 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_SPINE_TRANSFORM_CONSTRAINT_TIMELINE_H +#define SPINE_SPINE_TRANSFORM_CONSTRAINT_TIMELINE_H -#ifndef SPINE_C_TRANSFORMCONSTRAINTTIMELINE_H -#define SPINE_C_TRANSFORMCONSTRAINTTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_transform_constraint_timeline spine_transform_constraint_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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 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 int32_t spine_transform_constraint_timeline_get_num_property_ids(spine_transform_constraint_timeline obj); -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); +SPINE_C_API void spine_transform_constraint_timeline_dispose(spine_transform_constraint_timeline self); + +SPINE_C_API spine_rtti spine_transform_constraint_timeline_get_rtti(spine_transform_constraint_timeline self); +SPINE_C_API void spine_transform_constraint_timeline_apply(spine_transform_constraint_timeline self, 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_API void spine_transform_constraint_timeline_set_frame(spine_transform_constraint_timeline self, int frame, float time, float mixRotate, float mixX, float mixY, float mixScaleX, float mixScaleY, float mixShearY); +SPINE_C_API void spine_transform_constraint_timeline_set_linear(spine_transform_constraint_timeline self, size_t frame); +SPINE_C_API void spine_transform_constraint_timeline_set_stepped(spine_transform_constraint_timeline self, size_t frame); +SPINE_C_API void spine_transform_constraint_timeline_set_bezier(spine_transform_constraint_timeline self, 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_API float spine_transform_constraint_timeline_get_bezier_value(spine_transform_constraint_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_transform_constraint_timeline_get_curves(spine_transform_constraint_timeline self); +SPINE_C_API size_t spine_transform_constraint_timeline_get_frame_entries(spine_transform_constraint_timeline self); +SPINE_C_API size_t spine_transform_constraint_timeline_get_frame_count(spine_transform_constraint_timeline self); +SPINE_C_API spine_array_float spine_transform_constraint_timeline_get_frames(spine_transform_constraint_timeline self); +SPINE_C_API float spine_transform_constraint_timeline_get_duration(spine_transform_constraint_timeline self); +SPINE_C_API spine_array_property_id spine_transform_constraint_timeline_get_property_ids(spine_transform_constraint_timeline self); +SPINE_C_API int spine_transform_constraint_timeline_get_constraint_index(spine_transform_constraint_timeline self); +SPINE_C_API void spine_transform_constraint_timeline_set_constraint_index(spine_transform_constraint_timeline self, int inValue); +SPINE_C_API spine_rtti spine_transform_constraint_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSFORMCONSTRAINTTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSFORM_CONSTRAINT_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/translate_timeline.cpp b/spine-c-new/src/generated/translate_timeline.cpp index 02afad1a4..6792b1d5f 100644 --- a/spine-c-new/src/generated/translate_timeline.cpp +++ b/spine-c-new/src/generated/translate_timeline.cpp @@ -1,77 +1,80 @@ -/****************************************************************************** - * 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 "translate_timeline.h" #include using namespace spine; 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; + return (spine_translate_timeline) new (__FILE__, __LINE__) TranslateTimeline(frameCount, bezierCount, boneIndex); } -void spine_translate_timeline_dispose(spine_translate_timeline obj) { - if (!obj) return; - delete (TranslateTimeline *) obj; +void spine_translate_timeline_dispose(spine_translate_timeline self) { + delete (TranslateTimeline*)self; } -spine_rtti spine_translate_timeline_get_rtti() { - return (spine_rtti) &TranslateTimeline::rtti; +spine_rtti spine_translate_timeline_get_rtti(spine_translate_timeline self) { + return (spine_rtti)&((TranslateTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_translate_timeline_apply(spine_translate_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline2*)(TranslateTimeline*)self)->apply(*((Skeleton*)skeleton), lastTime, time, (Array *)pEvents, alpha, (MixBlend)blend, (MixDirection)direction, appliedPose); } -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); +void spine_translate_timeline_set_frame(spine_translate_timeline self, size_t frame, float time, float value1, float value2) { + ((BoneTimeline2*)(TranslateTimeline*)self)->setFrame(frame, time, value1, value2); } -float spine_translate_timeline_get_curve_value(spine_translate_timeline obj, float time) { - if (!obj) return 0; - TranslateTimeline *_obj = (TranslateTimeline *) obj; - return _obj->getCurveValue(time); +float spine_translate_timeline_get_curve_value(spine_translate_timeline self, float time) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getCurveValue(time); } -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_linear(spine_translate_timeline self, size_t frame) { + ((BoneTimeline2*)(TranslateTimeline*)self)->setLinear(frame); } -void spine_translate_timeline_set_bone_index(spine_translate_timeline obj, int value) { - if (!obj) return; - TranslateTimeline *_obj = (TranslateTimeline *) obj; - _obj->setBoneIndex(value); +void spine_translate_timeline_set_stepped(spine_translate_timeline self, size_t frame) { + ((BoneTimeline2*)(TranslateTimeline*)self)->setStepped(frame); +} + +void spine_translate_timeline_set_bezier(spine_translate_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline2*)(TranslateTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_translate_timeline_get_bezier_value(spine_translate_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_translate_timeline_get_curves(spine_translate_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(TranslateTimeline*)self)->getCurves(); +} + +size_t spine_translate_timeline_get_frame_entries(spine_translate_timeline self) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getFrameEntries(); +} + +size_t spine_translate_timeline_get_frame_count(spine_translate_timeline self) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_translate_timeline_get_frames(spine_translate_timeline self) { + return (spine_array_float)&((BoneTimeline2*)(TranslateTimeline*)self)->getFrames(); +} + +float spine_translate_timeline_get_duration(spine_translate_timeline self) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_translate_timeline_get_property_ids(spine_translate_timeline self) { + return (spine_array_property_id)&((BoneTimeline2*)(TranslateTimeline*)self)->getPropertyIds(); +} + +int spine_translate_timeline_get_bone_index(spine_translate_timeline self) { + return ((BoneTimeline2*)(TranslateTimeline*)self)->getBoneIndex(); +} + +void spine_translate_timeline_set_bone_index(spine_translate_timeline self, int inValue) { + ((BoneTimeline2*)(TranslateTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_translate_timeline_rtti(void) { + return (spine_rtti)&TranslateTimeline::rtti; } diff --git a/spine-c-new/src/generated/translate_timeline.h b/spine-c-new/src/generated/translate_timeline.h index 6f2d4485b..ebf00aeaa 100644 --- a/spine-c-new/src/generated/translate_timeline.h +++ b/spine-c-new/src/generated/translate_timeline.h @@ -1,52 +1,37 @@ -/****************************************************************************** - * 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_SPINE_TRANSLATE_TIMELINE_H +#define SPINE_SPINE_TRANSLATE_TIMELINE_H -#ifndef SPINE_C_TRANSLATETIMELINE_H -#define SPINE_C_TRANSLATETIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_translate_timeline spine_translate_timeline_create(size_t frameCount, size_t bezierCount, int 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_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 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); +SPINE_C_API void spine_translate_timeline_dispose(spine_translate_timeline self); + +SPINE_C_API spine_rtti spine_translate_timeline_get_rtti(spine_translate_timeline self); +SPINE_C_API void spine_translate_timeline_apply(spine_translate_timeline self, 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_API void spine_translate_timeline_set_frame(spine_translate_timeline self, size_t frame, float time, float value1, float value2); +SPINE_C_API float spine_translate_timeline_get_curve_value(spine_translate_timeline self, float time); +SPINE_C_API void spine_translate_timeline_set_linear(spine_translate_timeline self, size_t frame); +SPINE_C_API void spine_translate_timeline_set_stepped(spine_translate_timeline self, size_t frame); +SPINE_C_API void spine_translate_timeline_set_bezier(spine_translate_timeline self, 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_API float spine_translate_timeline_get_bezier_value(spine_translate_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_translate_timeline_get_curves(spine_translate_timeline self); +SPINE_C_API size_t spine_translate_timeline_get_frame_entries(spine_translate_timeline self); +SPINE_C_API size_t spine_translate_timeline_get_frame_count(spine_translate_timeline self); +SPINE_C_API spine_array_float spine_translate_timeline_get_frames(spine_translate_timeline self); +SPINE_C_API float spine_translate_timeline_get_duration(spine_translate_timeline self); +SPINE_C_API spine_array_property_id spine_translate_timeline_get_property_ids(spine_translate_timeline self); +SPINE_C_API int spine_translate_timeline_get_bone_index(spine_translate_timeline self); +SPINE_C_API void spine_translate_timeline_set_bone_index(spine_translate_timeline self, int inValue); +SPINE_C_API spine_rtti spine_translate_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSLATETIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSLATE_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/translate_x_timeline.cpp b/spine-c-new/src/generated/translate_x_timeline.cpp index eaefac67c..ee1cf1d0e 100644 --- a/spine-c-new/src/generated/translate_x_timeline.cpp +++ b/spine-c-new/src/generated/translate_x_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "translate_x_timeline.h" #include using namespace spine; 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; + return (spine_translate_x_timeline) new (__FILE__, __LINE__) TranslateXTimeline(frameCount, bezierCount, boneIndex); } -void spine_translate_x_timeline_dispose(spine_translate_x_timeline obj) { - if (!obj) return; - delete (TranslateXTimeline *) obj; +void spine_translate_x_timeline_dispose(spine_translate_x_timeline self) { + delete (TranslateXTimeline*)self; } -spine_rtti spine_translate_x_timeline_get_rtti() { - return (spine_rtti) &TranslateXTimeline::rtti; +spine_rtti spine_translate_x_timeline_get_rtti(spine_translate_x_timeline self) { + return (spine_rtti)&((TranslateXTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_translate_x_timeline_apply(spine_translate_x_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_translate_x_timeline_set_frame(spine_translate_x_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->setFrame(frame, time, value); } -float spine_translate_x_timeline_get_curve_value(spine_translate_x_timeline obj, float time) { - if (!obj) return 0; - TranslateXTimeline *_obj = (TranslateXTimeline *) obj; - return _obj->getCurveValue(time); +float spine_translate_x_timeline_get_curve_value(spine_translate_x_timeline self, float time) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_translate_x_timeline_get_relative_value(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_translate_x_timeline_get_absolute_value_1(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_translate_x_timeline_get_absolute_value_2(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_translate_x_timeline_get_scale_value(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_translate_x_timeline self, size_t frame) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->setLinear(frame); } -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); +void spine_translate_x_timeline_set_stepped(spine_translate_x_timeline self, size_t frame) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->setStepped(frame); +} + +void spine_translate_x_timeline_set_bezier(spine_translate_x_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_translate_x_timeline_get_bezier_value(spine_translate_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_translate_x_timeline_get_curves(spine_translate_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(TranslateXTimeline*)self)->getCurves(); +} + +size_t spine_translate_x_timeline_get_frame_entries(spine_translate_x_timeline self) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getFrameEntries(); +} + +size_t spine_translate_x_timeline_get_frame_count(spine_translate_x_timeline self) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_translate_x_timeline_get_frames(spine_translate_x_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(TranslateXTimeline*)self)->getFrames(); +} + +float spine_translate_x_timeline_get_duration(spine_translate_x_timeline self) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_translate_x_timeline_get_property_ids(spine_translate_x_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(TranslateXTimeline*)self)->getPropertyIds(); +} + +int spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline self) { + return ((BoneTimeline1*)(TranslateXTimeline*)self)->getBoneIndex(); +} + +void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline self, int inValue) { + ((BoneTimeline1*)(TranslateXTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_translate_x_timeline_rtti(void) { + return (spine_rtti)&TranslateXTimeline::rtti; } diff --git a/spine-c-new/src/generated/translate_x_timeline.h b/spine-c-new/src/generated/translate_x_timeline.h index cc1392fd1..813a4df6a 100644 --- a/spine-c-new/src/generated/translate_x_timeline.h +++ b/spine-c-new/src/generated/translate_x_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_TRANSLATE_X_TIMELINE_H +#define SPINE_SPINE_TRANSLATE_X_TIMELINE_H -#ifndef SPINE_C_TRANSLATEXTIMELINE_H -#define SPINE_C_TRANSLATEXTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_translate_x_timeline spine_translate_x_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_translate_x_timeline_dispose(spine_translate_x_timeline self); + +SPINE_C_API spine_rtti spine_translate_x_timeline_get_rtti(spine_translate_x_timeline self); +SPINE_C_API void spine_translate_x_timeline_apply(spine_translate_x_timeline self, 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_API void spine_translate_x_timeline_set_frame(spine_translate_x_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_translate_x_timeline_get_curve_value(spine_translate_x_timeline self, float time); +SPINE_C_API float spine_translate_x_timeline_get_relative_value(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_translate_x_timeline_get_absolute_value_1(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_translate_x_timeline_get_absolute_value_2(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_translate_x_timeline_get_scale_value(spine_translate_x_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_translate_x_timeline_set_linear(spine_translate_x_timeline self, size_t frame); +SPINE_C_API void spine_translate_x_timeline_set_stepped(spine_translate_x_timeline self, size_t frame); +SPINE_C_API void spine_translate_x_timeline_set_bezier(spine_translate_x_timeline self, 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_API float spine_translate_x_timeline_get_bezier_value(spine_translate_x_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_translate_x_timeline_get_curves(spine_translate_x_timeline self); +SPINE_C_API size_t spine_translate_x_timeline_get_frame_entries(spine_translate_x_timeline self); +SPINE_C_API size_t spine_translate_x_timeline_get_frame_count(spine_translate_x_timeline self); +SPINE_C_API spine_array_float spine_translate_x_timeline_get_frames(spine_translate_x_timeline self); +SPINE_C_API float spine_translate_x_timeline_get_duration(spine_translate_x_timeline self); +SPINE_C_API spine_array_property_id spine_translate_x_timeline_get_property_ids(spine_translate_x_timeline self); +SPINE_C_API int spine_translate_x_timeline_get_bone_index(spine_translate_x_timeline self); +SPINE_C_API void spine_translate_x_timeline_set_bone_index(spine_translate_x_timeline self, int inValue); +SPINE_C_API spine_rtti spine_translate_x_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSLATEXTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSLATE_X_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/translate_y_timeline.cpp b/spine-c-new/src/generated/translate_y_timeline.cpp index c1ff703e9..2ce662dbd 100644 --- a/spine-c-new/src/generated/translate_y_timeline.cpp +++ b/spine-c-new/src/generated/translate_y_timeline.cpp @@ -1,101 +1,96 @@ -/****************************************************************************** - * 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 "translate_y_timeline.h" #include using namespace spine; 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; + return (spine_translate_y_timeline) new (__FILE__, __LINE__) TranslateYTimeline(frameCount, bezierCount, boneIndex); } -void spine_translate_y_timeline_dispose(spine_translate_y_timeline obj) { - if (!obj) return; - delete (TranslateYTimeline *) obj; +void spine_translate_y_timeline_dispose(spine_translate_y_timeline self) { + delete (TranslateYTimeline*)self; } -spine_rtti spine_translate_y_timeline_get_rtti() { - return (spine_rtti) &TranslateYTimeline::rtti; +spine_rtti spine_translate_y_timeline_get_rtti(spine_translate_y_timeline self) { + return (spine_rtti)&((TranslateYTimeline*)self)->getRTTI(); } -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*) skeleton, lastTime, time, (Array *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose); +void spine_translate_y_timeline_apply(spine_translate_y_timeline self, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->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, size_t frame, float time, float value) { - if (!obj) return ; - TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - _obj->setFrame(frame, time, value); +void spine_translate_y_timeline_set_frame(spine_translate_y_timeline self, size_t frame, float time, float value) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->setFrame(frame, time, value); } -float spine_translate_y_timeline_get_curve_value(spine_translate_y_timeline obj, float time) { - if (!obj) return 0; - TranslateYTimeline *_obj = (TranslateYTimeline *) obj; - return _obj->getCurveValue(time); +float spine_translate_y_timeline_get_curve_value(spine_translate_y_timeline self, float time) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getCurveValue(time); } -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, (MixBlend) blend, current, setup); +float spine_translate_y_timeline_get_relative_value(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->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, (MixBlend) blend, current, setup); +float spine_translate_y_timeline_get_absolute_value_1(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getAbsoluteValue(time, alpha, (MixBlend)blend, current, setup); } -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, (MixBlend) blend, current, setup, value); +float spine_translate_y_timeline_get_absolute_value_2(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->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, (MixBlend) blend, (MixDirection) direction, current, setup); +float spine_translate_y_timeline_get_scale_value(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getScaleValue(time, alpha, (MixBlend)blend, (MixDirection)direction, current, setup); } -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_linear(spine_translate_y_timeline self, size_t frame) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->setLinear(frame); } -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); +void spine_translate_y_timeline_set_stepped(spine_translate_y_timeline self, size_t frame) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->setStepped(frame); +} + +void spine_translate_y_timeline_set_bezier(spine_translate_y_timeline self, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2); +} + +float spine_translate_y_timeline_get_bezier_value(spine_translate_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getBezierValue(time, frame, valueOffset, i); +} + +spine_array_float spine_translate_y_timeline_get_curves(spine_translate_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(TranslateYTimeline*)self)->getCurves(); +} + +size_t spine_translate_y_timeline_get_frame_entries(spine_translate_y_timeline self) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getFrameEntries(); +} + +size_t spine_translate_y_timeline_get_frame_count(spine_translate_y_timeline self) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getFrameCount(); +} + +spine_array_float spine_translate_y_timeline_get_frames(spine_translate_y_timeline self) { + return (spine_array_float)&((BoneTimeline1*)(TranslateYTimeline*)self)->getFrames(); +} + +float spine_translate_y_timeline_get_duration(spine_translate_y_timeline self) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getDuration(); +} + +spine_array_property_id spine_translate_y_timeline_get_property_ids(spine_translate_y_timeline self) { + return (spine_array_property_id)&((BoneTimeline1*)(TranslateYTimeline*)self)->getPropertyIds(); +} + +int spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline self) { + return ((BoneTimeline1*)(TranslateYTimeline*)self)->getBoneIndex(); +} + +void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline self, int inValue) { + ((BoneTimeline1*)(TranslateYTimeline*)self)->setBoneIndex(inValue); +} + +spine_rtti spine_translate_y_timeline_rtti(void) { + return (spine_rtti)&TranslateYTimeline::rtti; } diff --git a/spine-c-new/src/generated/translate_y_timeline.h b/spine-c-new/src/generated/translate_y_timeline.h index 850b3aa1d..fe64caa61 100644 --- a/spine-c-new/src/generated/translate_y_timeline.h +++ b/spine-c-new/src/generated/translate_y_timeline.h @@ -1,56 +1,41 @@ -/****************************************************************************** - * 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_SPINE_TRANSLATE_Y_TIMELINE_H +#define SPINE_SPINE_TRANSLATE_Y_TIMELINE_H -#ifndef SPINE_C_TRANSLATEYTIMELINE_H -#define SPINE_C_TRANSLATEYTIMELINE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API spine_translate_y_timeline spine_translate_y_timeline_create(size_t frameCount, size_t bezierCount, int 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_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_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 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); +SPINE_C_API void spine_translate_y_timeline_dispose(spine_translate_y_timeline self); + +SPINE_C_API spine_rtti spine_translate_y_timeline_get_rtti(spine_translate_y_timeline self); +SPINE_C_API void spine_translate_y_timeline_apply(spine_translate_y_timeline self, 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_API void spine_translate_y_timeline_set_frame(spine_translate_y_timeline self, size_t frame, float time, float value); +SPINE_C_API float spine_translate_y_timeline_get_curve_value(spine_translate_y_timeline self, float time); +SPINE_C_API float spine_translate_y_timeline_get_relative_value(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_translate_y_timeline_get_absolute_value_1(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup); +SPINE_C_API float spine_translate_y_timeline_get_absolute_value_2(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, float current, float setup, float value); +SPINE_C_API float spine_translate_y_timeline_get_scale_value(spine_translate_y_timeline self, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup); +SPINE_C_API void spine_translate_y_timeline_set_linear(spine_translate_y_timeline self, size_t frame); +SPINE_C_API void spine_translate_y_timeline_set_stepped(spine_translate_y_timeline self, size_t frame); +SPINE_C_API void spine_translate_y_timeline_set_bezier(spine_translate_y_timeline self, 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_API float spine_translate_y_timeline_get_bezier_value(spine_translate_y_timeline self, float time, size_t frame, size_t valueOffset, size_t i); +SPINE_C_API spine_array_float spine_translate_y_timeline_get_curves(spine_translate_y_timeline self); +SPINE_C_API size_t spine_translate_y_timeline_get_frame_entries(spine_translate_y_timeline self); +SPINE_C_API size_t spine_translate_y_timeline_get_frame_count(spine_translate_y_timeline self); +SPINE_C_API spine_array_float spine_translate_y_timeline_get_frames(spine_translate_y_timeline self); +SPINE_C_API float spine_translate_y_timeline_get_duration(spine_translate_y_timeline self); +SPINE_C_API spine_array_property_id spine_translate_y_timeline_get_property_ids(spine_translate_y_timeline self); +SPINE_C_API int spine_translate_y_timeline_get_bone_index(spine_translate_y_timeline self); +SPINE_C_API void spine_translate_y_timeline_set_bone_index(spine_translate_y_timeline self, int inValue); +SPINE_C_API spine_rtti spine_translate_y_timeline_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_TRANSLATEYTIMELINE_H \ No newline at end of file +#endif /* SPINE_SPINE_TRANSLATE_Y_TIMELINE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/types.h b/spine-c-new/src/generated/types.h index 4b5c4611c..977f60832 100644 --- a/spine-c-new/src/generated/types.h +++ b/spine-c-new/src/generated/types.h @@ -37,19 +37,17 @@ extern "C" { #include "../base.h" // Forward declarations for all non-enum types +SPINE_OPAQUE_TYPE(spine_alpha_timeline) 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_atlas_page) +SPINE_OPAQUE_TYPE(spine_atlas_region) 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) @@ -60,11 +58,6 @@ 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) @@ -76,16 +69,21 @@ 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_queue_entry) SPINE_OPAQUE_TYPE(spine_event_timeline) +SPINE_OPAQUE_TYPE(spine_from_property) +SPINE_OPAQUE_TYPE(spine_from_rotate) +SPINE_OPAQUE_TYPE(spine_from_scale_x) +SPINE_OPAQUE_TYPE(spine_from_scale_y) +SPINE_OPAQUE_TYPE(spine_from_shear_y) +SPINE_OPAQUE_TYPE(spine_from_x) +SPINE_OPAQUE_TYPE(spine_from_y) 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) @@ -95,24 +93,30 @@ 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_data) SPINE_OPAQUE_TYPE(spine_physics_constraint_gravity_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_inertia_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_mass_timeline) SPINE_OPAQUE_TYPE(spine_physics_constraint_mix_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_pose) SPINE_OPAQUE_TYPE(spine_physics_constraint_reset_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_strength_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_timeline) +SPINE_OPAQUE_TYPE(spine_physics_constraint_wind_timeline) SPINE_OPAQUE_TYPE(spine_point_attachment) +SPINE_OPAQUE_TYPE(spine_polygon) 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_render_command) +SPINE_OPAQUE_TYPE(spine_rgb2_timeline) +SPINE_OPAQUE_TYPE(spine_rgba2_timeline) +SPINE_OPAQUE_TYPE(spine_rgba_timeline) +SPINE_OPAQUE_TYPE(spine_rgb_timeline) SPINE_OPAQUE_TYPE(spine_rotate_timeline) +SPINE_OPAQUE_TYPE(spine_rtti) SPINE_OPAQUE_TYPE(spine_scale_timeline) SPINE_OPAQUE_TYPE(spine_scale_x_timeline) SPINE_OPAQUE_TYPE(spine_scale_y_timeline) @@ -124,10 +128,9 @@ 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_clipping) 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) @@ -142,21 +145,15 @@ 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_to_x) +SPINE_OPAQUE_TYPE(spine_to_y) +SPINE_OPAQUE_TYPE(spine_track_entry) +SPINE_OPAQUE_TYPE(spine_transform_constraint) SPINE_OPAQUE_TYPE(spine_transform_constraint_data) SPINE_OPAQUE_TYPE(spine_transform_constraint_pose) SPINE_OPAQUE_TYPE(spine_transform_constraint_timeline) @@ -165,15 +162,12 @@ 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 "event_type.h" +#include "format.h" #include "inherit.h" #include "mix_blend.h" #include "mix_direction.h" @@ -183,6 +177,8 @@ SPINE_OPAQUE_TYPE(spine_vertices) #include "rotate_mode.h" #include "sequence_mode.h" #include "spacing_mode.h" +#include "texture_filter.h" +#include "texture_wrap.h" // Array specializations #include "arrays.h" diff --git a/spine-c-new/src/generated/update.cpp b/spine-c-new/src/generated/update.cpp index 326ef9c19..2ad6d03a5 100644 --- a/spine-c-new/src/generated/update.cpp +++ b/spine-c-new/src/generated/update.cpp @@ -1,48 +1,20 @@ -/****************************************************************************** - * 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 "update.h" #include using namespace spine; -void spine_update_dispose(spine_update obj) { - if (!obj) return; - delete (Update *) obj; +void spine_update_dispose(spine_update self) { + delete (Update*)self; } -spine_rtti spine_update_get_rtti() { - return (spine_rtti) &Update::rtti; +spine_rtti spine_update_get_rtti(spine_update self) { + return (spine_rtti)&((Update*)self)->getRTTI(); } -void spine_update_update(spine_update obj, spine_skeleton skeleton, spine_physics physics) { - if (!obj) return ; - Update *_obj = (Update *) obj; - _obj->update(*(Skeleton*) skeleton, (Physics) physics); +void spine_update_update(spine_update self, spine_skeleton skeleton, spine_physics physics) { + ((Update*)self)->update(*((Skeleton*)skeleton), (Physics)physics); +} + +spine_rtti spine_update_rtti(void) { + return (spine_rtti)&Update::rtti; } diff --git a/spine-c-new/src/generated/update.h b/spine-c-new/src/generated/update.h index 5b29c0067..c33236672 100644 --- a/spine-c-new/src/generated/update.h +++ b/spine-c-new/src/generated/update.h @@ -1,47 +1,21 @@ -/****************************************************************************** - * 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_SPINE_UPDATE_H +#define SPINE_SPINE_UPDATE_H -#ifndef SPINE_C_UPDATE_H -#define SPINE_C_UPDATE_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_update_dispose(spine_update self); -SPINE_C_EXPORT void spine_update_dispose(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); +SPINE_C_API spine_rtti spine_update_get_rtti(spine_update self); +SPINE_C_API void spine_update_update(spine_update self, spine_skeleton skeleton, spine_physics physics); +SPINE_C_API spine_rtti spine_update_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_UPDATE_H \ No newline at end of file +#endif /* SPINE_SPINE_UPDATE_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/vertex_attachment.cpp b/spine-c-new/src/generated/vertex_attachment.cpp index b99c26699..6f6f61acb 100644 --- a/spine-c-new/src/generated/vertex_attachment.cpp +++ b/spine-c-new/src/generated/vertex_attachment.cpp @@ -1,156 +1,84 @@ -/****************************************************************************** - * 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 "vertex_attachment.h" #include using namespace spine; -void spine_vertex_attachment_dispose(spine_vertex_attachment obj) { - if (!obj) return; - delete (VertexAttachment *) obj; +void spine_vertex_attachment_dispose(spine_vertex_attachment self) { + delete (VertexAttachment*)self; } -spine_rtti spine_vertex_attachment_get_rtti() { - return (spine_rtti) &VertexAttachment::rtti; +spine_rtti spine_vertex_attachment_get_rtti(spine_vertex_attachment self) { + return (spine_rtti)&((VertexAttachment*)self)->getRTTI(); } -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*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride); +void spine_vertex_attachment_compute_world_vertices_1(spine_vertex_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, worldVertices, offset, 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*) skeleton, *(Slot*) slot, start, count, (Array &) worldVertices, offset, stride); +void spine_vertex_attachment_compute_world_vertices_2(spine_vertex_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) { + ((VertexAttachment*)self)->computeWorldVertices(*((Skeleton*)skeleton), *((Slot*)slot), start, count, *((Array*)worldVertices), offset, stride); } -int spine_vertex_attachment_get_id(spine_vertex_attachment obj) { - if (!obj) return 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return _obj->getId(); +int spine_vertex_attachment_get_id(spine_vertex_attachment self) { + return ((VertexAttachment*)self)->getId(); } -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(); +spine_array_int spine_vertex_attachment_get_bones(spine_vertex_attachment self) { + return (spine_array_int)&((VertexAttachment*)self)->getBones(); } -int *spine_vertex_attachment_get_bones(spine_vertex_attachment obj) { - if (!obj) return nullptr; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (int *) _obj->getBones().buffer(); +void spine_vertex_attachment_set_bones(spine_vertex_attachment self, spine_array_int bones) { + ((VertexAttachment*)self)->setBones(*((Array*)bones)); } -void spine_vertex_attachment_set_bones(spine_vertex_attachment obj, spine_array_int value) { - if (!obj) return; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->setBones((Array &) value); +spine_array_float spine_vertex_attachment_get_vertices(spine_vertex_attachment self) { + return (spine_array_float)&((VertexAttachment*)self)->getVertices(); } -int32_t spine_vertex_attachment_get_num_vertices(spine_vertex_attachment obj) { - if (!obj) return 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (int32_t) _obj->getVertices().size(); +void spine_vertex_attachment_set_vertices(spine_vertex_attachment self, spine_array_float vertices) { + ((VertexAttachment*)self)->setVertices(*((Array*)vertices)); } -float *spine_vertex_attachment_get_vertices(spine_vertex_attachment obj) { - if (!obj) return nullptr; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (float *) _obj->getVertices().buffer(); +size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment self) { + return ((VertexAttachment*)self)->getWorldVerticesLength(); } -void spine_vertex_attachment_set_vertices(spine_vertex_attachment obj, spine_array_float value) { - if (!obj) return; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->setVertices((Array &) value); +void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment self, size_t inValue) { + ((VertexAttachment*)self)->setWorldVerticesLength(inValue); } -size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment obj) { - if (!obj) return 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return _obj->getWorldVerticesLength(); +spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment self) { + return (spine_attachment)((VertexAttachment*)self)->getTimelineAttachment(); } -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); +void spine_vertex_attachment_set_timeline_attachment(spine_vertex_attachment self, spine_attachment attachment) { + ((VertexAttachment*)self)->setTimelineAttachment((Attachment *)attachment); } -spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment obj) { - if (!obj) return (spine_attachment) 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (spine_attachment) _obj->getTimelineAttachment(); +void spine_vertex_attachment_copy_to(spine_vertex_attachment self, spine_vertex_attachment other) { + ((VertexAttachment*)self)->copyTo((VertexAttachment *)other); } -void spine_vertex_attachment_set_timeline_attachment(spine_vertex_attachment obj, spine_attachment value) { - if (!obj) return; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->setTimelineAttachment((Attachment *) value); +const char* spine_vertex_attachment_get_name(spine_vertex_attachment self) { + return (const char*)&((Attachment*)(VertexAttachment*)self)->getName(); } -void spine_vertex_attachment_copy_to(spine_vertex_attachment obj, spine_vertex_attachment other) { - if (!obj) return ; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->copyTo((VertexAttachment *) other); +spine_attachment spine_vertex_attachment_copy(spine_vertex_attachment self) { + return (spine_attachment)((Attachment*)(VertexAttachment*)self)->copy(); } -const char* spine_vertex_attachment_get_name(spine_vertex_attachment obj) { - if (!obj) return nullptr; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (const char *) _obj->getName().buffer(); +int spine_vertex_attachment_get_ref_count(spine_vertex_attachment self) { + return ((Attachment*)(VertexAttachment*)self)->getRefCount(); } -spine_attachment spine_vertex_attachment_copy(spine_vertex_attachment obj) { - if (!obj) return (spine_attachment) 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return (spine_attachment) _obj->copy(); +void spine_vertex_attachment_reference(spine_vertex_attachment self) { + ((Attachment*)(VertexAttachment*)self)->reference(); } -int spine_vertex_attachment_get_ref_count(spine_vertex_attachment obj) { - if (!obj) return 0; - VertexAttachment *_obj = (VertexAttachment *) obj; - return _obj->getRefCount(); +void spine_vertex_attachment_dereference(spine_vertex_attachment self) { + ((Attachment*)(VertexAttachment*)self)->dereference(); } -void spine_vertex_attachment_reference(spine_vertex_attachment obj) { - if (!obj) return ; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->reference(); -} - -void spine_vertex_attachment_dereference(spine_vertex_attachment obj) { - if (!obj) return ; - VertexAttachment *_obj = (VertexAttachment *) obj; - _obj->dereference(); +spine_rtti spine_vertex_attachment_rtti(void) { + return (spine_rtti)&VertexAttachment::rtti; } diff --git a/spine-c-new/src/generated/vertex_attachment.h b/spine-c-new/src/generated/vertex_attachment.h index a55ca0d5c..118749017 100644 --- a/spine-c-new/src/generated/vertex_attachment.h +++ b/spine-c-new/src/generated/vertex_attachment.h @@ -1,65 +1,37 @@ -/****************************************************************************** - * 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_SPINE_VERTEX_ATTACHMENT_H +#define SPINE_SPINE_VERTEX_ATTACHMENT_H -#ifndef SPINE_C_VERTEXATTACHMENT_H -#define SPINE_C_VERTEXATTACHMENT_H +#include "../base.h" +#include "types.h" #ifdef __cplusplus extern "C" { #endif -#include "types.h" +SPINE_C_API void spine_vertex_attachment_dispose(spine_vertex_attachment self); -SPINE_C_EXPORT void spine_vertex_attachment_dispose(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 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 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 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 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); +SPINE_C_API spine_rtti spine_vertex_attachment_get_rtti(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_compute_world_vertices_1(spine_vertex_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride); +SPINE_C_API void spine_vertex_attachment_compute_world_vertices_2(spine_vertex_attachment self, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride); +SPINE_C_API int spine_vertex_attachment_get_id(spine_vertex_attachment self); +SPINE_C_API spine_array_int spine_vertex_attachment_get_bones(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_set_bones(spine_vertex_attachment self, spine_array_int bones); +SPINE_C_API spine_array_float spine_vertex_attachment_get_vertices(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_set_vertices(spine_vertex_attachment self, spine_array_float vertices); +SPINE_C_API size_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_set_world_vertices_length(spine_vertex_attachment self, size_t inValue); +SPINE_C_API spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_set_timeline_attachment(spine_vertex_attachment self, spine_attachment attachment); +SPINE_C_API void spine_vertex_attachment_copy_to(spine_vertex_attachment self, spine_vertex_attachment other); +SPINE_C_API const char* spine_vertex_attachment_get_name(spine_vertex_attachment self); +SPINE_C_API spine_attachment spine_vertex_attachment_copy(spine_vertex_attachment self); +SPINE_C_API int spine_vertex_attachment_get_ref_count(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_reference(spine_vertex_attachment self); +SPINE_C_API void spine_vertex_attachment_dereference(spine_vertex_attachment self); +SPINE_C_API spine_rtti spine_vertex_attachment_rtti(void); #ifdef __cplusplus } #endif -#endif // SPINE_C_VERTEXATTACHMENT_H \ No newline at end of file +#endif /* SPINE_SPINE_VERTEX_ATTACHMENT_H */ \ No newline at end of file diff --git a/spine-c-new/src/generated/vertices.cpp b/spine-c-new/src/generated/vertices.cpp deleted file mode 100644 index 5fdba85ef..000000000 --- a/spine-c-new/src/generated/vertices.cpp +++ /dev/null @@ -1,38 +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 "vertices.h" -#include - -using namespace spine; - -void spine_vertices_dispose(spine_vertices obj) { - if (!obj) return; - delete (Vertices *) obj; -} diff --git a/spine-c-new/src/generated/vertices.h b/spine-c-new/src/generated/vertices.h deleted file mode 100644 index 0edacd579..000000000 --- a/spine-c-new/src/generated/vertices.h +++ /dev/null @@ -1,45 +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_VERTICES_H -#define SPINE_C_VERTICES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "types.h" - -SPINE_C_EXPORT void spine_vertices_dispose(spine_vertices obj); - -#ifdef __cplusplus -} -#endif - -#endif // SPINE_C_VERTICES_H \ No newline at end of file diff --git a/spine-cocos2dx/example/Classes/RaptorExample.cpp b/spine-cocos2dx/example/Classes/RaptorExample.cpp index fb7c3dfd0..f444ca543 100644 --- a/spine-cocos2dx/example/Classes/RaptorExample.cpp +++ b/spine-cocos2dx/example/Classes/RaptorExample.cpp @@ -34,9 +34,6 @@ USING_NS_CC; using namespace spine; -PowInterpolation pow2(2); -PowOutInterpolation powOut2(2); - Scene *RaptorExample::scene() { Scene *scene = Scene::create(); scene->addChild(RaptorExample::create()); diff --git a/spine-cpp/spine-cpp/include/spine/Constraint.h b/spine-cpp/spine-cpp/include/spine/Constraint.h index 62c9891a6..300d6ced1 100644 --- a/spine-cpp/spine-cpp/include/spine/Constraint.h +++ b/spine-cpp/spine-cpp/include/spine/Constraint.h @@ -55,14 +55,14 @@ namespace spine { return true; } - virtual void pose() = 0; - - virtual void setupPose() = 0; - // Inherited from Update virtual void update(Skeleton &skeleton, Physics physics) override = 0; protected: + virtual void pose() = 0; + + virtual void setupPose() = 0; + bool _active; }; @@ -79,6 +79,7 @@ namespace spine { return PosedGeneric::getData(); } + protected: virtual void pose() override { PosedGeneric::pose(); } diff --git a/spine-cpp/spine-cpp/include/spine/MathUtil.h b/spine-cpp/spine-cpp/include/spine/MathUtil.h index fb6d24b59..ef8f46bfc 100644 --- a/spine-cpp/spine-cpp/include/spine/MathUtil.h +++ b/spine-cpp/spine-cpp/include/spine/MathUtil.h @@ -100,40 +100,6 @@ namespace spine { static float ceil(float v); }; - - struct SP_API Interpolation { - virtual float apply(float a) = 0; - - virtual float interpolate(float start, float end, float a) { - return start + (end - start) * apply(a); - } - - virtual ~Interpolation() {}; - }; - - struct SP_API PowInterpolation : public Interpolation { - PowInterpolation(int power) : power(power) { - } - - float apply(float a) { - if (a <= 0.5f) return MathUtil::pow(a * 2.0f, (float) power) / 2.0f; - return MathUtil::pow((a - 1.0f) * 2.0f, (float) power) / (power % 2 == 0 ? -2.0f : 2.0f) + 1.0f; - } - - int power; - }; - - struct SP_API PowOutInterpolation : public Interpolation { - PowOutInterpolation(int power) : power(power) { - } - - float apply(float a) { - return MathUtil::pow(a - 1, (float) power) * (power % 2 == 0 ? -1.0f : 1.0f) + 1.0f; - } - - int power; - }; - } #endif /* Spine_MathUtil_h */ diff --git a/spine-cpp/spine-cpp/include/spine/Posed.h b/spine-cpp/spine-cpp/include/spine/Posed.h index fd4699ce4..09a044f69 100644 --- a/spine-cpp/spine-cpp/include/spine/Posed.h +++ b/spine-cpp/spine-cpp/include/spine/Posed.h @@ -39,15 +39,16 @@ namespace spine { Posed() {} virtual ~Posed() {} - virtual void setupPose() = 0; - - virtual void pose() = 0; - virtual void constrained() = 0; virtual void resetConstrained() = 0; virtual bool isPoseEqualToApplied() const = 0; + + protected: + virtual void setupPose() = 0; + + virtual void pose() = 0; }; template @@ -89,10 +90,6 @@ namespace spine { virtual ~PosedGeneric() { } - virtual void setupPose() override { - _pose.set(_data.getSetupPose()); - } - /// The constraint's setup pose data. D &getData() { return _data; @@ -112,10 +109,6 @@ namespace spine { _constrained.set(_pose); } - virtual void pose() override { - _applied = &_pose; - } - virtual void constrained() override { _applied = &_constrained; } @@ -124,6 +117,14 @@ namespace spine { return _applied == &_pose; } + protected: + virtual void pose() override { + _applied = &_pose; + } + virtual void setupPose() override { + _pose.set(_data.getSetupPose()); + } + protected: D &_data; A _pose; ///< Stored as A type (concrete pose type) to match Java behavior diff --git a/spine-cpp/spine-cpp/include/spine/spine.h b/spine-cpp/spine-cpp/include/spine/spine.h index 667e5838c..12a28ca42 100644 --- a/spine-cpp/spine-cpp/include/spine/spine.h +++ b/spine-cpp/spine-cpp/include/spine/spine.h @@ -99,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,8 @@ #include #include #include +#include +#include #include #include #include @@ -130,6 +133,5 @@ #include #include #include -#include #endif diff --git a/spine-sfml/cpp/example/main.cpp b/spine-sfml/cpp/example/main.cpp index a8e8ba76a..52113b2df 100644 --- a/spine-sfml/cpp/example/main.cpp +++ b/spine-sfml/cpp/example/main.cpp @@ -276,9 +276,6 @@ void raptor(SkeletonData *skeletonData, Atlas *atlas) { drawable.timeScale = 1; drawable.setUsePremultipliedAlpha(true); - PowInterpolation pow2(2); - PowOutInterpolation powOut2(2); - Skeleton *skeleton = drawable.skeleton; skeleton->setPosition(320, 590); skeleton->updateWorldTransform(Physics_Update);