[c] Port type extractor to TypeScript and improve codegen

- Ported extract-spine-cpp-types.js to TypeScript in type-extractor.ts
- Improved type interfaces with discriminated unions for better type safety
- Added proper isConst tracking for const-qualified methods
- Fixed exclusions to check method.isConst instead of return type
- Removed special type mappings (utf8, spine_void) - primitives pass through unchanged
- Made toCTypeName strict with proper error handling
- Documented all conversion functions with examples
- Excluded SpineObject from extraction (matches JS behavior)
- Removed original JS extractor as it's now replaced by TypeScript version

The TypeScript extractor produces identical output (107 files, 164 types) while providing better type information including isConst for methods and consistent isStatic fields.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mario Zechner 2025-07-09 01:50:41 +02:00
parent 22ea76db1b
commit e324cf5cb1
289 changed files with 6673 additions and 5608 deletions

View File

@ -24,40 +24,23 @@ type: EventQueue
type: Json
type: BaseTimeline
# Excluded methods (specific methods on otherwise included types)
# We handle those in extensions.cpp through a simpler mechanism
method: AnimationState::setListener
method: AnimationState::addListener
method: AnimationState::removeListener
method: AnimationState::clearListeners
method: AnimationState::disableQueue
method: AnimationState::enableQueue
method: AnimationState::setManualTrackEntryDisposal
method: AnimationState::getManualTrackEntryDisposal
method: Skeleton::updateCache
method: Skeleton::printUpdateCache
method: SkeletonData::setName
method: SkeletonData::setVersion
method: SkeletonData::setHash
method: SkeletonData::setImagesPath
method: SkeletonData::setAudioPath
method: SkeletonData::setFps
method: EventData::setIntValue
method: EventData::setFloatValue
method: EventData::setStringValue
method: EventData::setAudioPath
method: EventData::setVolume
method: EventData::setBalance
method: TrackEntry::setListener
method: TrackEntry::getListener
# Used in UE4, not used anywhere else
method: AnimationState::setRendererObject
method: TrackEntry::setRendererObject
# Array<String> methods need special handling
method: AttachmentTimeline.getAttachmentNames
# BoneLocal/BonePose setScale is overloaded in a confusing way
method: BoneLocal::setScale
method: BonePose::setScale
# Color set is overloaded with conflicting signatures
method: Color::set
# Can not emulate AttachmentMap::Entries, as that's stack allocated
method: Skin::getAttachments
# Exclude const versions of getSetupPose() - we'll only expose the non-const version
method: BoneData::getSetupPose const

View File

@ -103,8 +103,8 @@ export function scanArraySpecializations(typesJson: SpineTypes, exclusions: any[
if (isPrimitive) {
// Map primitive types
const typeMap: { [key: string]: string } = {
'int': 'int32_t',
'unsigned short': 'uint16_t',
'int': 'int',
'unsigned short': 'unsigned short',
'float': 'float',
'double': 'double',
'bool': 'bool',

View File

@ -81,13 +81,6 @@ export class ArrayGenerator {
source.push('}');
source.push('');
// Generate create with capacity
header.push(`SPINE_C_EXPORT ${spec.cTypeName} ${spec.cTypeName}_create_with_capacity(int32_t capacity);`);
source.push(`${spec.cTypeName} ${spec.cTypeName}_create_with_capacity(int32_t capacity) {`);
source.push(` return (${spec.cTypeName}) new (__FILE__, __LINE__) ${spec.cppType}(capacity);`);
source.push('}');
source.push('');
// Generate dispose
header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_dispose(${spec.cTypeName} array);`);
source.push(`void ${spec.cTypeName}_dispose(${spec.cTypeName} array) {`);
@ -97,16 +90,16 @@ export class ArrayGenerator {
source.push('');
// Generate hardcoded get/set methods
header.push(`SPINE_C_EXPORT ${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int32_t index);`);
source.push(`${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int32_t index) {`);
header.push(`SPINE_C_EXPORT ${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int index);`);
source.push(`${spec.cElementType} ${spec.cTypeName}_get(${spec.cTypeName} array, int index) {`);
source.push(` if (!array) return ${this.getDefaultValue(spec)};`);
source.push(` ${spec.cppType} *_array = (${spec.cppType}*) array;`);
source.push(` return ${this.convertFromCpp(spec, '(*_array)[index]')};`);
source.push('}');
source.push('');
header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_set(${spec.cTypeName} array, int32_t index, ${spec.cElementType} value);`);
source.push(`void ${spec.cTypeName}_set(${spec.cTypeName} array, int32_t index, ${spec.cElementType} value) {`);
header.push(`SPINE_C_EXPORT void ${spec.cTypeName}_set(${spec.cTypeName} array, int index, ${spec.cElementType} value);`);
source.push(`void ${spec.cTypeName}_set(${spec.cTypeName} array, int index, ${spec.cElementType} value) {`);
source.push(` if (!array) return;`);
source.push(` ${spec.cppType} *_array = (${spec.cppType}*) array;`);
source.push(` (*_array)[index] = ${this.convertToCpp(spec, 'value')};`);
@ -141,7 +134,7 @@ export class ArrayGenerator {
} else if (method.returnType === 'size_t') {
returnType = 'size_t';
} else if (method.returnType === 'int') {
returnType = 'int32_t';
returnType = 'int';
} else if (method.returnType === 'bool') {
returnType = 'bool';
} else if (method.returnType === `${spec.cppType} *`) {
@ -167,7 +160,7 @@ export class ArrayGenerator {
cParams.push(`size_t ${param.name}`);
cppArgs.push(param.name);
} else if (param.type === 'int') {
cParams.push(`int32_t ${param.name}`);
cParams.push(`int ${param.name}`);
cppArgs.push(param.name);
} else {
// Unknown parameter type - skip this method
@ -212,7 +205,7 @@ export class ArrayGenerator {
private getDefaultReturn(returnType: string, spec: ArraySpecialization): string {
if (returnType === 'bool') return 'false';
if (returnType === 'size_t' || returnType === 'int32_t') return '0';
if (returnType === 'size_t' || returnType === 'int') return '0';
if (returnType === spec.cElementType) return this.getDefaultValue(spec);
if (returnType === spec.cTypeName) return 'nullptr';
return '0';

View File

@ -3,7 +3,7 @@ import { isMethodExcluded } from '../exclusions';
import { GeneratorResult } from './constructor-generator';
export class MethodGenerator {
constructor(private exclusions: Exclusion[], private validTypes: Set<string>) {}
constructor(private exclusions: Exclusion[], private validTypes: Set<string>) { }
generate(type: Type): GeneratorResult {
const declarations: string[] = [];
@ -14,7 +14,7 @@ export class MethodGenerator {
const methods = type.members.filter(m =>
m.kind === 'method'
).filter(m => !isMethodExcluded(type.name, m.name, this.exclusions, m))
.filter(m => !m.isStatic);
.filter(m => !m.isStatic);
// Check for const/non-const method pairs
const methodGroups = new Map<string, Method[]>();
@ -86,105 +86,112 @@ export class MethodGenerator {
const methodSeenCounts = new Map<string, number>();
for (const method of uniqueMethods) {
// Handle getters
if (method.name.startsWith('get') && (!method.parameters || method.parameters.length === 0)) {
const propName = method.name.substring(3);
try {
// Handle getters
if (method.name.startsWith('get') && (!method.parameters || method.parameters.length === 0)) {
const propName = method.name.substring(3);
// Check if return type is Array
if (method.returnType && method.returnType.includes('Array<')) {
// For Array types, only generate collection accessors
this.generateCollectionAccessors(type, method, propName, declarations, implementations);
} else if (method.name === 'getRTTI') {
// Special handling for getRTTI - make it static
const funcName = toCFunctionName(type.name, 'get_rtti');
const returnType = 'spine_rtti';
// Check if return type is Array
if (method.returnType && method.returnType.includes('Array<')) {
// For Array types, only generate collection accessors
this.generateCollectionAccessors(type, method, propName, declarations, implementations);
} else if (method.name === 'getRTTI') {
// Special handling for getRTTI - make it static
const funcName = toCFunctionName(type.name, 'get_rtti');
const returnType = 'spine_rtti';
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}();`);
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}();`);
implementations.push(`${returnType} ${funcName}() {`);
implementations.push(` return (spine_rtti) &${type.name}::rtti;`);
implementations.push(`${returnType} ${funcName}() {`);
implementations.push(` return (spine_rtti) &${type.name}::rtti;`);
implementations.push(`}`);
implementations.push('');
} else {
// For non-Array types, generate regular getter
const funcName = toCFunctionName(type.name, method.name);
const returnType = toCTypeName(method.returnType || 'void', this.validTypes);
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${cTypeName} obj);`);
implementations.push(`${returnType} ${funcName}(${cTypeName} obj) {`);
implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`);
implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`);
const callExpr = this.generateMethodCall('_obj', method);
implementations.push(` return ${callExpr};`);
implementations.push(`}`);
implementations.push('');
}
}
// Handle setters
else if (method.name.startsWith('set') && method.parameters && method.parameters.length === 1) {
const funcName = toCFunctionName(type.name, method.name);
const paramType = toCTypeName(method.parameters[0].type, this.validTypes);
declarations.push(`SPINE_C_EXPORT void ${funcName}(${cTypeName} obj, ${paramType} value);`);
implementations.push(`void ${funcName}(${cTypeName} obj, ${paramType} value) {`);
implementations.push(` if (!obj) return;`);
implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`);
const callExpr = this.generateSetterCall('_obj', method, 'value');
implementations.push(` ${callExpr};`);
implementations.push(`}`);
implementations.push('');
} else {
// For non-Array types, generate regular getter
const funcName = toCFunctionName(type.name, method.name);
}
// Handle other methods
else {
// Check if this is an overloaded method
const isOverloaded = (methodCounts.get(method.name) || 0) > 1;
const seenCount = methodSeenCounts.get(method.name) || 0;
methodSeenCounts.set(method.name, seenCount + 1);
// Generate function name with suffix for overloads
let funcName = toCFunctionName(type.name, method.name);
// Check for naming conflicts with type names
if (method.name === 'pose' && type.name === 'Bone') {
// Rename bone_pose() method to avoid conflict with spine_bone_pose type
funcName = toCFunctionName(type.name, 'update_pose');
}
if (isOverloaded && seenCount > 0) {
// Add parameter count suffix for overloaded methods
const paramCount = method.parameters ? method.parameters.length : 0;
funcName = `${funcName}_${paramCount}`;
}
const returnType = toCTypeName(method.returnType || 'void', this.validTypes);
const params = this.generateMethodParameters(cTypeName, method);
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${cTypeName} obj);`);
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${params.declaration});`);
implementations.push(`${returnType} ${funcName}(${cTypeName} obj) {`);
implementations.push(`${returnType} ${funcName}(${params.declaration}) {`);
implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`);
implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`);
const callExpr = this.generateMethodCall('_obj', method);
implementations.push(` return ${callExpr};`);
const callExpr = this.generateMethodCall('_obj', method, params.call);
if (returnType === 'void') {
implementations.push(` ${callExpr};`);
} else {
implementations.push(` return ${callExpr};`);
}
implementations.push(`}`);
implementations.push('');
}
}
// Handle setters
else if (method.name.startsWith('set') && method.parameters && method.parameters.length === 1) {
const funcName = toCFunctionName(type.name, method.name);
const paramType = toCTypeName(method.parameters[0].type, this.validTypes);
declarations.push(`SPINE_C_EXPORT void ${funcName}(${cTypeName} obj, ${paramType} value);`);
implementations.push(`void ${funcName}(${cTypeName} obj, ${paramType} value) {`);
implementations.push(` if (!obj) return;`);
implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`);
const callExpr = this.generateSetterCall('_obj', method, 'value');
implementations.push(` ${callExpr};`);
implementations.push(`}`);
implementations.push('');
}
// Handle other methods
else {
// Check if this is an overloaded method
const isOverloaded = (methodCounts.get(method.name) || 0) > 1;
const seenCount = methodSeenCounts.get(method.name) || 0;
methodSeenCounts.set(method.name, seenCount + 1);
// Generate function name with suffix for overloads
let funcName = toCFunctionName(type.name, method.name);
// Check for naming conflicts with type names
if (method.name === 'pose' && type.name === 'Bone') {
// Rename bone_pose() method to avoid conflict with spine_bone_pose type
funcName = toCFunctionName(type.name, 'update_pose');
}
if (isOverloaded && seenCount > 0) {
// Add parameter count suffix for overloaded methods
const paramCount = method.parameters ? method.parameters.length : 0;
funcName = `${funcName}_${paramCount}`;
}
const returnType = toCTypeName(method.returnType || 'void', this.validTypes);
const params = this.generateMethodParameters(cTypeName, method);
declarations.push(`SPINE_C_EXPORT ${returnType} ${funcName}(${params.declaration});`);
implementations.push(`${returnType} ${funcName}(${params.declaration}) {`);
implementations.push(` if (!obj) return ${this.getDefaultReturn(returnType)};`);
implementations.push(` ${type.name} *_obj = (${type.name} *) obj;`);
const callExpr = this.generateMethodCall('_obj', method, params.call);
if (returnType === 'void') {
implementations.push(` ${callExpr};`);
} else {
implementations.push(` return ${callExpr};`);
}
implementations.push(`}`);
implementations.push('');
} catch (error) {
console.error(`Error generating method for type ${type.name}::${method.name}:`);
console.error(error);
throw error;
}
}
return { declarations, implementations };
}
private generateCollectionAccessors(type: Type, method: Method, propName: string,
declarations: string[], implementations: string[]) {
declarations: string[], implementations: string[]) {
const cTypeName = `spine_${toSnakeCase(type.name)}`;
const propSnake = toSnakeCase(propName);
const arrayMatch = method.returnType!.match(/Array<(.+?)>/);
@ -193,15 +200,15 @@ export class MethodGenerator {
const elementType = arrayMatch[1].trim().replace(/\s*\*$/, '');
let cElementType: string;
if (elementType === 'int') {
cElementType = 'int32_t';
cElementType = 'int';
} else if (elementType === 'float') {
cElementType = 'float';
} else if (elementType === 'uint8_t') {
cElementType = 'uint8_t';
} else if (elementType === 'String') {
cElementType = 'const utf8 *';
cElementType = 'const char *';
} else if (elementType === 'PropertyId') {
cElementType = 'int32_t'; // PropertyId is just an int
cElementType = 'int64_t'; // PropertyId is just an int
} else {
cElementType = `spine_${toSnakeCase(elementType)}`;
}
@ -245,7 +252,7 @@ export class MethodGenerator {
// Handle return type conversions
if (method.returnType) {
if (method.returnType === 'const String &' || method.returnType === 'String') {
call = `(const utf8 *) ${call}.buffer()`;
call = `(const char *) ${call}.buffer()`;
} else if (method.returnType === 'const RTTI &' || method.returnType === 'RTTI &') {
// RTTI needs special handling - return as opaque pointer
call = `(spine_rtti) &${call}`;
@ -366,6 +373,6 @@ export class MethodGenerator {
private isPrimitiveType(type: string): boolean {
return ['int', 'float', 'double', 'bool', 'size_t', 'int32_t', 'uint32_t',
'int16_t', 'uint16_t', 'uint8_t', 'void'].includes(type);
'int16_t', 'uint16_t', 'uint8_t', 'void'].includes(type);
}
}

View File

@ -30,25 +30,14 @@
#ifndef SPINE_C_H
#define SPINE_C_H
// Custom types and functions
#include "../src/custom.h"
// Base definitions
#include "../src/base.h"
// Generated enum types
#include "../src/generated/event_type.h"
#include "../src/generated/format.h"
#include "../src/generated/texture_filter.h"
#include "../src/generated/texture_wrap.h"
#include "../src/generated/attachment_type.h"
#include "../src/generated/blend_mode.h"
#include "../src/generated/inherit.h"
#include "../src/generated/mix_blend.h"
#include "../src/generated/mix_direction.h"
#include "../src/generated/physics.h"
#include "../src/generated/position_mode.h"
#include "../src/generated/property.h"
#include "../src/generated/rotate_mode.h"
#include "../src/generated/sequence_mode.h"
#include "../src/generated/spacing_mode.h"
// All type declarations and enum includes
#include "../src/generated/types.h"
// Extension functions
#include "../src/extensions.h"
// Generated class types
#include "../src/generated/animation.h"
@ -80,9 +69,7 @@
#include "../src/generated/rgba2_timeline.h"
#include "../src/generated/rgb2_timeline.h"
#include "../src/generated/constraint.h"
#include "../src/generated/constraint_generic.h"
#include "../src/generated/constraint_data.h"
#include "../src/generated/constraint_data_generic.h"
#include "../src/generated/constraint_timeline.h"
#include "../src/generated/constraint_timeline1.h"
#include "../src/generated/curve_timeline.h"
@ -93,7 +80,6 @@
#include "../src/generated/event.h"
#include "../src/generated/event_data.h"
#include "../src/generated/event_timeline.h"
#include "../src/generated/hash_map.h"
#include "../src/generated/ik_constraint.h"
#include "../src/generated/ik_constraint_data.h"
#include "../src/generated/ik_constraint_pose.h"
@ -124,12 +110,9 @@
#include "../src/generated/physics_constraint_mix_timeline.h"
#include "../src/generated/physics_constraint_reset_timeline.h"
#include "../src/generated/point_attachment.h"
#include "../src/generated/pose.h"
#include "../src/generated/posed.h"
#include "../src/generated/posed_generic.h"
#include "../src/generated/posed_active.h"
#include "../src/generated/posed_data.h"
#include "../src/generated/posed_data_generic.h"
#include "../src/generated/rtti.h"
#include "../src/generated/region_attachment.h"
#include "../src/generated/rotate_timeline.h"

View File

@ -27,28 +27,39 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef SPINE_C_POSE_H
#define SPINE_C_POSE_H
#ifndef SPINE_C_BASE_H
#define SPINE_C_BASE_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#if _WIN32
#define SPINE_C_EXPORT extern "C" __declspec(dllexport)
#else
#ifdef __EMSCRIPTEN__
#define SPINE_C_EXPORT extern "C" __attribute__((used))
#else
#define SPINE_C_EXPORT extern "C"
#endif
#endif
#else
#if _WIN32
#define SPINE_C_EXPORT __declspec(dllexport)
#else
#ifdef __EMSCRIPTEN__
#define SPINE_C_EXPORT __attribute__((used))
#else
#define SPINE_C_EXPORT
#endif
#endif
#endif
#include "../custom.h"
#define SPINE_OPAQUE_TYPE(name) \
typedef struct name##_wrapper { \
char _dummy; \
} name##_wrapper; \
typedef name##_wrapper *name;
SPINE_OPAQUE_TYPE(spine_pose)
SPINE_C_EXPORT spine_pose spine_pose_create(void);
SPINE_C_EXPORT void spine_pose_dispose(spine_pose obj);
SPINE_C_EXPORT void spine_pose_set(spine_pose obj, spine_p value);
typedef enum spine_pose_type {
} spine_pose_type;
SPINE_C_EXPORT spine_bool spine_pose_is_type(spine_pose obj, spine_pose_type type);
#ifdef __cplusplus
}
#endif
#endif // SPINE_C_POSE_H
#endif // SPINE_C_BASE_H

View File

@ -0,0 +1,531 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include "base.h"
#include "generated/types.h"
#include "extensions.h"
#include <spine/spine.h>
#include <spine/Version.h>
#include <spine/Debug.h>
#include <spine/SkeletonRenderer.h>
#include <spine/AnimationState.h>
#include <cstring>
using namespace spine;
// Internal structures
struct _spine_atlas {
void *atlas;
const char **imagePaths;
int32_t numImagePaths;
const char *error;
};
struct _spine_skeleton_data_result {
spine_skeleton_data skeletonData;
const char *error;
};
struct _spine_bounds {
float x, y, width, height;
};
struct _spine_vector {
float x, y;
};
struct _spine_skeleton_drawable : public SpineObject {
spine_skeleton skeleton;
spine_animation_state animationState;
spine_animation_state_data animationStateData;
spine_animation_state_events animationStateEvents;
SkeletonRenderer *renderer;
};
struct _spine_skin_entry {
int32_t slotIndex;
const char *name;
spine_attachment attachment;
};
struct _spine_skin_entries {
int32_t numEntries;
_spine_skin_entry *entries;
};
// Animation state event tracking
struct AnimationStateEvent {
EventType type;
TrackEntry *entry;
Event *event;
AnimationStateEvent(EventType type, TrackEntry *entry, Event *event) : type(type), entry(entry), event(event){};
};
class EventListener : public AnimationStateListenerObject, public SpineObject {
public:
Array<AnimationStateEvent> events;
void callback(AnimationState *state, EventType type, TrackEntry *entry, Event *event) override {
events.add(AnimationStateEvent(type, entry, event));
SP_UNUSED(state);
}
};
// Static variables
static Color NULL_COLOR(0, 0, 0, 0);
static SpineExtension *defaultExtension = nullptr;
static DebugExtension *debugExtension = nullptr;
static void initExtensions() {
if (defaultExtension == nullptr) {
defaultExtension = new DefaultSpineExtension();
debugExtension = new DebugExtension(defaultExtension);
}
}
namespace spine {
SpineExtension *getDefaultExtension() {
initExtensions();
return defaultExtension;
}
}
// Version functions
int32_t spine_major_version() {
return SPINE_MAJOR_VERSION;
}
int32_t spine_minor_version() {
return SPINE_MINOR_VERSION;
}
void spine_enable_debug_extension(bool enable) {
initExtensions();
SpineExtension::setInstance(enable ? debugExtension : defaultExtension);
}
void spine_report_leaks() {
initExtensions();
debugExtension->reportLeaks();
fflush(stdout);
}
// Color functions
float spine_color_get_r(spine_color color) {
if (!color) return 0;
return ((Color *) color)->r;
}
float spine_color_get_g(spine_color color) {
if (!color) return 0;
return ((Color *) color)->g;
}
float spine_color_get_b(spine_color color) {
if (!color) return 0;
return ((Color *) color)->b;
}
float spine_color_get_a(spine_color color) {
if (!color) return 0;
return ((Color *) color)->a;
}
// Bounds functions
float spine_bounds_get_x(spine_bounds bounds) {
if (!bounds) return 0;
return ((_spine_bounds *) bounds)->x;
}
float spine_bounds_get_y(spine_bounds bounds) {
if (!bounds) return 0;
return ((_spine_bounds *) bounds)->y;
}
float spine_bounds_get_width(spine_bounds bounds) {
if (!bounds) return 0;
return ((_spine_bounds *) bounds)->width;
}
float spine_bounds_get_height(spine_bounds bounds) {
if (!bounds) return 0;
return ((_spine_bounds *) bounds)->height;
}
// Vector functions
float spine_vector_get_x(spine_vector vector) {
if (!vector) return 0;
return ((_spine_vector *) vector)->x;
}
float spine_vector_get_y(spine_vector vector) {
if (!vector) return 0;
return ((_spine_vector *) vector)->y;
}
// Atlas functions
class LiteTextureLoad : public TextureLoader {
void load(AtlasPage &page, const String &path) {
page.texture = (void *) (intptr_t) page.index;
}
void unload(void *texture) {
}
};
static LiteTextureLoad liteLoader;
spine_atlas spine_atlas_load(const char *atlasData) {
if (!atlasData) return nullptr;
int32_t length = (int32_t) strlen(atlasData);
auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, "", &liteLoader, true);
_spine_atlas *result = SpineExtension::calloc<_spine_atlas>(1, __FILE__, __LINE__);
result->atlas = atlas;
result->numImagePaths = (int32_t) atlas->getPages().size();
result->imagePaths = SpineExtension::calloc<const char *>(result->numImagePaths, __FILE__, __LINE__);
for (int i = 0; i < result->numImagePaths; i++) {
result->imagePaths[i] = (const char *) strdup(atlas->getPages()[i]->texturePath.buffer());
}
return (spine_atlas) result;
}
class CallbackTextureLoad : public TextureLoader {
spine_texture_loader_load_func loadCb;
spine_texture_loader_unload_func unloadCb;
public:
CallbackTextureLoad() : loadCb(nullptr), unloadCb(nullptr) {}
void setCallbacks(spine_texture_loader_load_func load, spine_texture_loader_unload_func unload) {
loadCb = load;
unloadCb = unload;
}
void load(AtlasPage &page, const String &path) {
page.texture = this->loadCb(path.buffer());
}
void unload(void *texture) {
this->unloadCb(texture);
}
};
static CallbackTextureLoad callbackLoader;
spine_atlas spine_atlas_load_callback(const char *atlasData, const char *atlasDir,
spine_texture_loader_load_func load,
spine_texture_loader_unload_func unload) {
if (!atlasData) return nullptr;
int32_t length = (int32_t) strlen(atlasData);
callbackLoader.setCallbacks(load, unload);
auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, (const char *) atlasDir, &callbackLoader, true);
_spine_atlas *result = SpineExtension::calloc<_spine_atlas>(1, __FILE__, __LINE__);
result->atlas = atlas;
result->numImagePaths = (int32_t) atlas->getPages().size();
result->imagePaths = SpineExtension::calloc<const char *>(result->numImagePaths, __FILE__, __LINE__);
for (int i = 0; i < result->numImagePaths; i++) {
result->imagePaths[i] = (const char *) strdup(atlas->getPages()[i]->texturePath.buffer());
}
return (spine_atlas) result;
}
int32_t spine_atlas_get_num_image_paths(spine_atlas atlas) {
if (!atlas) return 0;
return ((_spine_atlas *) atlas)->numImagePaths;
}
const char *spine_atlas_get_image_path(spine_atlas atlas, int32_t index) {
if (!atlas) return nullptr;
_spine_atlas *_atlas = (_spine_atlas *) atlas;
if (index < 0 || index >= _atlas->numImagePaths) return nullptr;
return _atlas->imagePaths[index];
}
bool spine_atlas_is_pma(spine_atlas atlas) {
if (!atlas) return false;
Atlas *_atlas = (Atlas *) ((_spine_atlas *) atlas)->atlas;
for (size_t i = 0; i < _atlas->getPages().size(); i++) {
AtlasPage *page = _atlas->getPages()[i];
if (page->pma) return true;
}
return false;
}
const char *spine_atlas_get_error(spine_atlas atlas) {
if (!atlas) return nullptr;
return ((_spine_atlas *) atlas)->error;
}
void spine_atlas_dispose(spine_atlas atlas) {
if (!atlas) return;
_spine_atlas *_atlas = (_spine_atlas *) atlas;
if (_atlas->atlas) {
delete (Atlas *) _atlas->atlas;
}
if (_atlas->imagePaths) {
for (int i = 0; i < _atlas->numImagePaths; i++) {
if (_atlas->imagePaths[i]) {
SpineExtension::free(_atlas->imagePaths[i], __FILE__, __LINE__);
}
}
SpineExtension::free(_atlas->imagePaths, __FILE__, __LINE__);
}
if (_atlas->error) {
SpineExtension::free(_atlas->error, __FILE__, __LINE__);
}
SpineExtension::free(_atlas, __FILE__, __LINE__);
}
// Skeleton data loading
spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const char *skeletonData) {
if (!atlas || !skeletonData) return nullptr;
_spine_skeleton_data_result *result = SpineExtension::calloc<_spine_skeleton_data_result>(1, __FILE__, __LINE__);
SkeletonJson json((Atlas *) ((_spine_atlas *) atlas)->atlas);
json.setScale(1);
SkeletonData *data = json.readSkeletonData(skeletonData);
if (!data) {
result->error = (const char *) strdup("Failed to load skeleton data");
return (spine_skeleton_data_result) result;
}
result->skeletonData = (spine_skeleton_data) data;
return (spine_skeleton_data_result) result;
}
spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length) {
if (!atlas || !skeletonData) return nullptr;
_spine_skeleton_data_result *result = SpineExtension::calloc<_spine_skeleton_data_result>(1, __FILE__, __LINE__);
SkeletonBinary binary((Atlas *) ((_spine_atlas *) atlas)->atlas);
binary.setScale(1);
SkeletonData *data = binary.readSkeletonData((const unsigned char *) skeletonData, length);
if (!data) {
result->error = (const char *) strdup("Failed to load skeleton data");
return (spine_skeleton_data_result) result;
}
result->skeletonData = (spine_skeleton_data) data;
return (spine_skeleton_data_result) result;
}
const char *spine_skeleton_data_result_get_error(spine_skeleton_data_result result) {
if (!result) return nullptr;
return ((_spine_skeleton_data_result *) result)->error;
}
spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result) {
if (!result) return nullptr;
return ((_spine_skeleton_data_result *) result)->skeletonData;
}
void spine_skeleton_data_result_dispose(spine_skeleton_data_result result) {
if (!result) return;
_spine_skeleton_data_result *_result = (_spine_skeleton_data_result *) result;
if (_result->error) {
SpineExtension::free(_result->error, __FILE__, __LINE__);
}
SpineExtension::free(_result, __FILE__, __LINE__);
}
// Skeleton drawable
spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData) {
if (!skeletonData) return nullptr;
_spine_skeleton_drawable *drawable = new (__FILE__, __LINE__) _spine_skeleton_drawable();
Skeleton *skeleton = new (__FILE__, __LINE__) Skeleton(*((SkeletonData *) skeletonData));
AnimationStateData *stateData = new (__FILE__, __LINE__) AnimationStateData((SkeletonData *) skeletonData);
AnimationState *state = new (__FILE__, __LINE__) AnimationState(stateData);
EventListener *listener = new (__FILE__, __LINE__) EventListener();
state->setListener(listener);
drawable->skeleton = (spine_skeleton) skeleton;
drawable->animationStateData = (spine_animation_state_data) stateData;
drawable->animationState = (spine_animation_state) state;
drawable->animationStateEvents = (spine_animation_state_events) listener;
drawable->renderer = new (__FILE__, __LINE__) SkeletonRenderer();
return (spine_skeleton_drawable) drawable;
}
spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable) {
if (!drawable) return nullptr;
_spine_skeleton_drawable *_drawable = (_spine_skeleton_drawable *) drawable;
Skeleton *skeleton = (Skeleton *) _drawable->skeleton;
SkeletonRenderer *renderer = _drawable->renderer;
RenderCommand *commands = renderer->render(*skeleton);
return (spine_render_command) commands;
}
void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable) {
if (!drawable) return;
_spine_skeleton_drawable *_drawable = (_spine_skeleton_drawable *) drawable;
if (_drawable->renderer) {
delete _drawable->renderer;
}
if (_drawable->animationState) {
delete (AnimationState *) _drawable->animationState;
}
if (_drawable->animationStateData) {
delete (AnimationStateData *) _drawable->animationStateData;
}
if (_drawable->skeleton) {
delete (Skeleton *) _drawable->skeleton;
}
if (_drawable->animationStateEvents) {
delete (EventListener *) _drawable->animationStateEvents;
}
delete _drawable;
}
spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable) {
if (!drawable) return nullptr;
return ((_spine_skeleton_drawable *) drawable)->skeleton;
}
spine_animation_state spine_skeleton_drawable_get_animation_state(spine_skeleton_drawable drawable) {
if (!drawable) return nullptr;
return ((_spine_skeleton_drawable *) drawable)->animationState;
}
spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable) {
if (!drawable) return nullptr;
return ((_spine_skeleton_drawable *) drawable)->animationStateData;
}
spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable) {
if (!drawable) return nullptr;
return ((_spine_skeleton_drawable *) drawable)->animationStateEvents;
}
// Render command functions
float *spine_render_command_get_positions(spine_render_command command) {
if (!command) return nullptr;
return ((RenderCommand *) command)->positions;
}
float *spine_render_command_get_uvs(spine_render_command command) {
if (!command) return nullptr;
return ((RenderCommand *) command)->uvs;
}
int32_t *spine_render_command_get_colors(spine_render_command command) {
if (!command) return nullptr;
return (int32_t *) ((RenderCommand *) command)->colors;
}
int32_t *spine_render_command_get_dark_colors(spine_render_command command) {
if (!command) return nullptr;
return (int32_t *) ((RenderCommand *) command)->darkColors;
}
int32_t spine_render_command_get_num_vertices(spine_render_command command) {
if (!command) return 0;
return ((RenderCommand *) command)->numVertices;
}
uint16_t *spine_render_command_get_indices(spine_render_command command) {
if (!command) return nullptr;
return ((RenderCommand *) command)->indices;
}
int32_t spine_render_command_get_num_indices(spine_render_command command) {
if (!command) return 0;
return ((RenderCommand *) command)->numIndices;
}
int32_t spine_render_command_get_atlas_page(spine_render_command command) {
if (!command) return 0;
return (int32_t) (intptr_t) ((RenderCommand *) command)->texture;
}
spine_blend_mode spine_render_command_get_blend_mode(spine_render_command command) {
if (!command) return SPINE_BLEND_MODE_NORMAL;
BlendMode mode = ((RenderCommand *) command)->blendMode;
switch (mode) {
case BlendMode_Normal: return SPINE_BLEND_MODE_NORMAL;
case BlendMode_Additive: return SPINE_BLEND_MODE_ADDITIVE;
case BlendMode_Multiply: return SPINE_BLEND_MODE_MULTIPLY;
case BlendMode_Screen: return SPINE_BLEND_MODE_SCREEN;
default: return SPINE_BLEND_MODE_NORMAL;
}
}
spine_render_command spine_render_command_get_next(spine_render_command command) {
if (!command) return nullptr;
return (spine_render_command) ((RenderCommand *) command)->next;
}
// Skin entries
spine_skin_entries spine_skin_entries_create() {
_spine_skin_entries *entries = SpineExtension::calloc<_spine_skin_entries>(1, __FILE__, __LINE__);
return (spine_skin_entries) entries;
}
void spine_skin_entries_dispose(spine_skin_entries entries) {
if (!entries) return;
_spine_skin_entries *_entries = (_spine_skin_entries *) entries;
if (_entries->entries) {
for (int i = 0; i < _entries->numEntries; i++) {
if (_entries->entries[i].name) {
SpineExtension::free(_entries->entries[i].name, __FILE__, __LINE__);
}
}
SpineExtension::free(_entries->entries, __FILE__, __LINE__);
}
SpineExtension::free(_entries, __FILE__, __LINE__);
}
int32_t spine_skin_entries_get_num_entries(spine_skin_entries entries) {
if (!entries) return 0;
return ((_spine_skin_entries *) entries)->numEntries;
}
spine_skin_entry spine_skin_entries_get_entry(spine_skin_entries entries, int32_t index) {
if (!entries) return nullptr;
_spine_skin_entries *_entries = (_spine_skin_entries *) entries;
if (index < 0 || index >= _entries->numEntries) return nullptr;
return (spine_skin_entry) &_entries->entries[index];
}
int32_t spine_skin_entry_get_slot_index(spine_skin_entry entry) {
if (!entry) return 0;
return ((_spine_skin_entry *) entry)->slotIndex;
}
const char *spine_skin_entry_get_name(spine_skin_entry entry) {
if (!entry) return nullptr;
return ((_spine_skin_entry *) entry)->name;
}
spine_attachment spine_skin_entry_get_attachment(spine_skin_entry entry) {
if (!entry) return nullptr;
return ((_spine_skin_entry *) entry)->attachment;
}

View File

@ -0,0 +1,133 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef SPINE_C_EXTENSIONS_H
#define SPINE_C_EXTENSIONS_H
#ifdef __cplusplus
extern "C" {
#endif
#include "base.h"
// Custom types for spine-c-new (not generated)
SPINE_OPAQUE_TYPE(spine_skeleton_data_result)
SPINE_OPAQUE_TYPE(spine_bounds)
SPINE_OPAQUE_TYPE(spine_vector)
SPINE_OPAQUE_TYPE(spine_skeleton_drawable)
SPINE_OPAQUE_TYPE(spine_animation_state_events)
SPINE_OPAQUE_TYPE(spine_skin_entry)
SPINE_OPAQUE_TYPE(spine_skin_entries)
SPINE_OPAQUE_TYPE(spine_texture_loader)
// Additional types
typedef void* spine_void;
typedef void (*spine_dispose_renderer_object)(void*);
// Texture loader callbacks
typedef void* (*spine_texture_loader_load_func)(const char *path);
typedef void (*spine_texture_loader_unload_func)(void *texture);
// Version functions
SPINE_C_EXPORT int32_t spine_major_version();
SPINE_C_EXPORT int32_t spine_minor_version();
SPINE_C_EXPORT void spine_enable_debug_extension(bool enable);
SPINE_C_EXPORT void spine_report_leaks();
// Color functions
SPINE_C_EXPORT float spine_color_get_r(spine_color color);
SPINE_C_EXPORT float spine_color_get_g(spine_color color);
SPINE_C_EXPORT float spine_color_get_b(spine_color color);
SPINE_C_EXPORT float spine_color_get_a(spine_color color);
// Bounds functions
SPINE_C_EXPORT float spine_bounds_get_x(spine_bounds bounds);
SPINE_C_EXPORT float spine_bounds_get_y(spine_bounds bounds);
SPINE_C_EXPORT float spine_bounds_get_width(spine_bounds bounds);
SPINE_C_EXPORT float spine_bounds_get_height(spine_bounds bounds);
// Vector functions
SPINE_C_EXPORT float spine_vector_get_x(spine_vector vector);
SPINE_C_EXPORT float spine_vector_get_y(spine_vector vector);
// Atlas functions
SPINE_C_EXPORT spine_atlas spine_atlas_load(const char *atlasData);
SPINE_C_EXPORT spine_atlas spine_atlas_load_callback(const char *atlasData, const char *atlasDir,
spine_texture_loader_load_func load,
spine_texture_loader_unload_func unload);
SPINE_C_EXPORT int32_t spine_atlas_get_num_image_paths(spine_atlas atlas);
SPINE_C_EXPORT const char *spine_atlas_get_image_path(spine_atlas atlas, int32_t index);
SPINE_C_EXPORT bool spine_atlas_is_pma(spine_atlas atlas);
SPINE_C_EXPORT const char *spine_atlas_get_error(spine_atlas atlas);
SPINE_C_EXPORT void spine_atlas_dispose(spine_atlas atlas);
// Skeleton data functions
SPINE_C_EXPORT spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const char *skeletonData);
SPINE_C_EXPORT spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length);
SPINE_C_EXPORT const char *spine_skeleton_data_result_get_error(spine_skeleton_data_result result);
SPINE_C_EXPORT spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result);
SPINE_C_EXPORT void spine_skeleton_data_result_dispose(spine_skeleton_data_result result);
// Skeleton drawable functions
SPINE_C_EXPORT spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData);
SPINE_C_EXPORT spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable);
SPINE_C_EXPORT void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable);
SPINE_C_EXPORT spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable);
SPINE_C_EXPORT spine_animation_state spine_skeleton_drawable_get_animation_state(spine_skeleton_drawable drawable);
SPINE_C_EXPORT spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable);
SPINE_C_EXPORT spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable);
// Render command functions
SPINE_C_EXPORT float *spine_render_command_get_positions(spine_render_command command);
SPINE_C_EXPORT float *spine_render_command_get_uvs(spine_render_command command);
SPINE_C_EXPORT int32_t *spine_render_command_get_colors(spine_render_command command);
SPINE_C_EXPORT int32_t *spine_render_command_get_dark_colors(spine_render_command command);
SPINE_C_EXPORT int32_t spine_render_command_get_num_vertices(spine_render_command command);
SPINE_C_EXPORT uint16_t *spine_render_command_get_indices(spine_render_command command);
SPINE_C_EXPORT int32_t spine_render_command_get_num_indices(spine_render_command command);
SPINE_C_EXPORT int32_t spine_render_command_get_atlas_page(spine_render_command command);
SPINE_C_EXPORT spine_blend_mode spine_render_command_get_blend_mode(spine_render_command command);
SPINE_C_EXPORT spine_render_command spine_render_command_get_next(spine_render_command command);
// Skin entries functions
SPINE_C_EXPORT spine_skin_entries spine_skin_entries_create();
SPINE_C_EXPORT void spine_skin_entries_dispose(spine_skin_entries entries);
SPINE_C_EXPORT int32_t spine_skin_entries_get_num_entries(spine_skin_entries entries);
SPINE_C_EXPORT spine_skin_entry spine_skin_entries_get_entry(spine_skin_entries entries, int32_t index);
// Skin entry functions
SPINE_C_EXPORT int32_t spine_skin_entry_get_slot_index(spine_skin_entry entry);
SPINE_C_EXPORT const char *spine_skin_entry_get_name(spine_skin_entry entry);
SPINE_C_EXPORT spine_attachment spine_skin_entry_get_attachment(spine_skin_entry entry);
#ifdef __cplusplus
}
#endif
#endif // SPINE_C_EXTENSIONS_H

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_alpha_timeline spine_alpha_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex) {
spine_alpha_timeline spine_alpha_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex) {
AlphaTimeline *obj = new (__FILE__, __LINE__) AlphaTimeline(frameCount, bezierCount, slotIndex);
return (spine_alpha_timeline) obj;
}
@ -42,19 +42,17 @@ void spine_alpha_timeline_dispose(spine_alpha_timeline obj) {
delete (AlphaTimeline *) obj;
}
spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline obj) {
if (!obj) return nullptr;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_alpha_timeline_get_rtti() {
return (spine_rtti) &AlphaTimeline::rtti;
}
void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, spine_size_t frame, float time, float value) {
void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, size_t frame, float time, float value) {
if (!obj) return ;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
_obj->setFrame(frame, time, value);
@ -69,34 +67,34 @@ float spine_alpha_timeline_get_curve_value(spine_alpha_timeline obj, float time)
float spine_alpha_timeline_get_relative_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return _obj->getRelativeValue(time, alpha, blend, current, setup);
return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
float spine_alpha_timeline_get_absolute_value_6(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
if (!obj) return 0;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value);
}
float spine_alpha_timeline_get_scale_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) {
if (!obj) return 0;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return _obj->getScaleValue(time, alpha, blend, direction, current, setup);
return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup);
}
int32_t spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj) {
int spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj) {
if (!obj) return 0;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
return _obj->getSlotIndex();
}
void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int32_t value) {
void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int value) {
if (!obj) return;
AlphaTimeline *_obj = (AlphaTimeline *) obj;
_obj->setSlotIndex(value);

View File

@ -34,22 +34,20 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_alpha_timeline)
SPINE_C_EXPORT spine_alpha_timeline spine_alpha_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex);
SPINE_C_EXPORT spine_alpha_timeline spine_alpha_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex);
SPINE_C_EXPORT void spine_alpha_timeline_dispose(spine_alpha_timeline obj);
SPINE_C_EXPORT spine_rtti spine_alpha_timeline_get_rtti(spine_alpha_timeline obj);
SPINE_C_EXPORT void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, spine_size_t frame, float time, float value);
SPINE_C_EXPORT spine_rtti spine_alpha_timeline_get_rtti();
SPINE_C_EXPORT void spine_alpha_timeline_apply(spine_alpha_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT void spine_alpha_timeline_set_frame(spine_alpha_timeline obj, size_t frame, float time, float value);
SPINE_C_EXPORT float spine_alpha_timeline_get_curve_value(spine_alpha_timeline obj, float time);
SPINE_C_EXPORT float spine_alpha_timeline_get_relative_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_alpha_timeline_get_absolute_value_6(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_alpha_timeline_get_scale_value(spine_alpha_timeline obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup);
SPINE_C_EXPORT int32_t spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj);
SPINE_C_EXPORT void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int32_t value);
SPINE_C_EXPORT int spine_alpha_timeline_get_slot_index(spine_alpha_timeline obj);
SPINE_C_EXPORT void spine_alpha_timeline_set_slot_index(spine_alpha_timeline obj, int value);
#ifdef __cplusplus
}

View File

@ -32,8 +32,8 @@
using namespace spine;
spine_animation spine_animation_create(const utf8 * name, void * timelines, float duration) {
Animation *obj = new (__FILE__, __LINE__) Animation(String(name), (Vector<Timeline *> &) timelines, duration);
spine_animation spine_animation_create(const char* name, spine_array_timeline timelines, float duration) {
Animation *obj = new (__FILE__, __LINE__) Animation(String(name), (Array<Timeline *> &) timelines, duration);
return (spine_animation) obj;
}
@ -42,12 +42,6 @@ void spine_animation_dispose(spine_animation obj) {
delete (Animation *) obj;
}
void * spine_animation_get_timelines(spine_animation obj) {
if (!obj) return nullptr;
Animation *_obj = (Animation *) obj;
return (void *) _obj->getTimelines();
}
int32_t spine_animation_get_num_timelines(spine_animation obj) {
if (!obj) return 0;
Animation *_obj = (Animation *) obj;
@ -60,16 +54,16 @@ spine_timeline *spine_animation_get_timelines(spine_animation obj) {
return (spine_timeline *) _obj->getTimelines().buffer();
}
void spine_animation_set_timelines(spine_animation obj, void * value) {
void spine_animation_set_timelines(spine_animation obj, spine_array_timeline value) {
if (!obj) return;
Animation *_obj = (Animation *) obj;
_obj->setTimelines((Vector<Timeline *> &) value);
_obj->setTimelines((Array<Timeline *> &) value);
}
spine_bool spine_animation_has_timeline(spine_animation obj, void * ids) {
if (!obj) return 0;
bool spine_animation_has_timeline(spine_animation obj, spine_array_property_id ids) {
if (!obj) return false;
Animation *_obj = (Animation *) obj;
return _obj->hasTimeline((Vector<PropertyId> &) ids);
return _obj->hasTimeline((Array<PropertyId> &) ids);
}
float spine_animation_get_duration(spine_animation obj) {
@ -84,22 +78,16 @@ void spine_animation_set_duration(spine_animation obj, float value) {
_obj->setDuration(value);
}
void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, spine_bool loop, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, bool loop, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
Animation *_obj = (Animation *) obj;
_obj->apply(skeleton, lastTime, time, loop, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, loop, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
const utf8 * spine_animation_get_name(spine_animation obj) {
const char* spine_animation_get_name(spine_animation obj) {
if (!obj) return nullptr;
Animation *_obj = (Animation *) obj;
return (const utf8 *) _obj->getName().buffer();
}
int32_t * spine_animation_get_bones(spine_animation obj) {
if (!obj) return 0;
Animation *_obj = (Animation *) obj;
return _obj->getBones();
return (const char *) _obj->getName().buffer();
}
int32_t spine_animation_get_num_bones(spine_animation obj) {
@ -108,8 +96,10 @@ int32_t spine_animation_get_num_bones(spine_animation obj) {
return (int32_t) _obj->getBones().size();
}
int32_t *spine_animation_get_bones(spine_animation obj) {
int *spine_animation_get_bones(spine_animation obj) {
if (!obj) return nullptr;
Animation *_obj = (Animation *) obj;
return (int32_t *) _obj->getBones().buffer();
auto& vec = _obj->getBones();
if (vec.size() == 0) return nullptr;
return (int *) &vec[0];
}

View File

@ -34,24 +34,20 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_animation)
SPINE_C_EXPORT spine_animation spine_animation_create(const utf8 * name, void * timelines, float duration);
SPINE_C_EXPORT spine_animation spine_animation_create(const char* name, spine_array_timeline timelines, float duration);
SPINE_C_EXPORT void spine_animation_dispose(spine_animation obj);
SPINE_C_EXPORT void * spine_animation_get_timelines(spine_animation obj);
SPINE_C_EXPORT int32_t spine_animation_get_num_timelines(spine_animation obj);
SPINE_C_EXPORT spine_timeline *spine_animation_get_timelines(spine_animation obj);
SPINE_C_EXPORT void spine_animation_set_timelines(spine_animation obj, void * value);
SPINE_C_EXPORT spine_bool spine_animation_has_timeline(spine_animation obj, void * ids);
SPINE_C_EXPORT void spine_animation_set_timelines(spine_animation obj, spine_array_timeline value);
SPINE_C_EXPORT bool spine_animation_has_timeline(spine_animation obj, spine_array_property_id ids);
SPINE_C_EXPORT float spine_animation_get_duration(spine_animation obj);
SPINE_C_EXPORT void spine_animation_set_duration(spine_animation obj, float value);
SPINE_C_EXPORT void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, spine_bool loop, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT const utf8 * spine_animation_get_name(spine_animation obj);
SPINE_C_EXPORT int32_t * spine_animation_get_bones(spine_animation obj);
SPINE_C_EXPORT void spine_animation_apply(spine_animation obj, spine_skeleton skeleton, float lastTime, float time, bool loop, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT const char* spine_animation_get_name(spine_animation obj);
SPINE_C_EXPORT int32_t spine_animation_get_num_bones(spine_animation obj);
SPINE_C_EXPORT int32_t *spine_animation_get_bones(spine_animation obj);
SPINE_C_EXPORT int *spine_animation_get_bones(spine_animation obj);
#ifdef __cplusplus
}

View File

@ -48,10 +48,10 @@ void spine_animation_state_update(spine_animation_state obj, float delta) {
_obj->update(delta);
}
spine_bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton) {
if (!obj) return 0;
bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton) {
if (!obj) return false;
AnimationState *_obj = (AnimationState *) obj;
return _obj->apply(skeleton);
return _obj->apply(*(Skeleton*) skeleton);
}
void spine_animation_state_clear_tracks(spine_animation_state obj) {
@ -60,44 +60,44 @@ void spine_animation_state_clear_tracks(spine_animation_state obj) {
_obj->clearTracks();
}
void spine_animation_state_clear_track(spine_animation_state obj, spine_size_t trackIndex) {
void spine_animation_state_clear_track(spine_animation_state obj, size_t trackIndex) {
if (!obj) return ;
AnimationState *_obj = (AnimationState *) obj;
_obj->clearTrack(trackIndex);
}
spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->setAnimation(trackIndex, String(animationName), loop);
}
spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_set_animation_3(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->setAnimation(trackIndex, (Animation *) animation, loop);
}
spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop, float delay) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop, float delay) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->addAnimation(trackIndex, String(animationName), loop, delay);
}
spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop, float delay) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_add_animation_4(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop, float delay) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->addAnimation(trackIndex, (Animation *) animation, loop, delay);
}
spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->setEmptyAnimation(trackIndex, mixDuration);
}
spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration, float delay) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration, float delay) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->addEmptyAnimation(trackIndex, mixDuration, delay);
}
@ -108,24 +108,18 @@ void spine_animation_state_set_empty_animations(spine_animation_state obj, float
_obj->setEmptyAnimations(value);
}
spine_track_entry spine_animation_state_get_current(spine_animation_state obj, spine_size_t trackIndex) {
if (!obj) return nullptr;
spine_track_entry spine_animation_state_get_current(spine_animation_state obj, size_t trackIndex) {
if (!obj) return (spine_track_entry) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_track_entry) _obj->getCurrent(trackIndex);
}
spine_animation_state_data spine_animation_state_get_data(spine_animation_state obj) {
if (!obj) return nullptr;
if (!obj) return (spine_animation_state_data) 0;
AnimationState *_obj = (AnimationState *) obj;
return (spine_animation_state_data) _obj->getData();
}
void * spine_animation_state_get_tracks(spine_animation_state obj) {
if (!obj) return nullptr;
AnimationState *_obj = (AnimationState *) obj;
return (void *) _obj->getTracks();
}
int32_t spine_animation_state_get_num_tracks(spine_animation_state obj) {
if (!obj) return 0;
AnimationState *_obj = (AnimationState *) obj;
@ -150,20 +144,38 @@ void spine_animation_state_set_time_scale(spine_animation_state obj, float value
_obj->setTimeScale(value);
}
void spine_animation_state_disable_queue(spine_animation_state obj) {
if (!obj) return ;
AnimationState *_obj = (AnimationState *) obj;
_obj->disableQueue();
}
void spine_animation_state_enable_queue(spine_animation_state obj) {
if (!obj) return ;
AnimationState *_obj = (AnimationState *) obj;
_obj->enableQueue();
}
void spine_animation_state_set_manual_track_entry_disposal(spine_animation_state obj, bool value) {
if (!obj) return;
AnimationState *_obj = (AnimationState *) obj;
_obj->setManualTrackEntryDisposal(value);
}
bool spine_animation_state_get_manual_track_entry_disposal(spine_animation_state obj) {
if (!obj) return false;
AnimationState *_obj = (AnimationState *) obj;
return _obj->getManualTrackEntryDisposal();
}
void spine_animation_state_dispose_track_entry(spine_animation_state obj, spine_track_entry entry) {
if (!obj) return ;
AnimationState *_obj = (AnimationState *) obj;
_obj->disposeTrackEntry((TrackEntry *) entry);
}
spine_void spine_animation_state_get_renderer_object(spine_animation_state obj) {
void * spine_animation_state_get_renderer_object(spine_animation_state obj) {
if (!obj) return nullptr;
AnimationState *_obj = (AnimationState *) obj;
return (spine_void) _obj->getRendererObject();
}
void spine_animation_state_set_renderer_object(spine_animation_state obj, spine_void rendererObject, spine_dispose_renderer_object dispose) {
if (!obj) return ;
AnimationState *_obj = (AnimationState *) obj;
_obj->setRendererObject((void *) rendererObject, dispose);
return (void *) _obj->getRendererObject();
}

View File

@ -34,33 +34,33 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_animation_state)
#include "types.h"
SPINE_C_EXPORT spine_animation_state spine_animation_state_create(spine_animation_state_data data);
SPINE_C_EXPORT void spine_animation_state_dispose(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_update(spine_animation_state obj, float delta);
SPINE_C_EXPORT spine_bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton);
SPINE_C_EXPORT bool spine_animation_state_apply(spine_animation_state obj, spine_skeleton skeleton);
SPINE_C_EXPORT void spine_animation_state_clear_tracks(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_clear_track(spine_animation_state obj, spine_size_t trackIndex);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, const utf8 * animationName, spine_bool loop, float delay);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, spine_size_t trackIndex, spine_animation animation, spine_bool loop, float delay);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, spine_size_t trackIndex, float mixDuration, float delay);
SPINE_C_EXPORT void spine_animation_state_clear_track(spine_animation_state obj, size_t trackIndex);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_animation_3(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation(spine_animation_state obj, size_t trackIndex, const char* animationName, bool loop, float delay);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_animation_4(spine_animation_state obj, size_t trackIndex, spine_animation animation, bool loop, float delay);
SPINE_C_EXPORT spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration);
SPINE_C_EXPORT spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state obj, size_t trackIndex, float mixDuration, float delay);
SPINE_C_EXPORT void spine_animation_state_set_empty_animations(spine_animation_state obj, float value);
SPINE_C_EXPORT spine_track_entry spine_animation_state_get_current(spine_animation_state obj, spine_size_t trackIndex);
SPINE_C_EXPORT spine_track_entry spine_animation_state_get_current(spine_animation_state obj, size_t trackIndex);
SPINE_C_EXPORT spine_animation_state_data spine_animation_state_get_data(spine_animation_state obj);
SPINE_C_EXPORT void * spine_animation_state_get_tracks(spine_animation_state obj);
SPINE_C_EXPORT int32_t spine_animation_state_get_num_tracks(spine_animation_state obj);
SPINE_C_EXPORT spine_track_entry *spine_animation_state_get_tracks(spine_animation_state obj);
SPINE_C_EXPORT float spine_animation_state_get_time_scale(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_set_time_scale(spine_animation_state obj, float value);
SPINE_C_EXPORT void spine_animation_state_disable_queue(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_enable_queue(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_set_manual_track_entry_disposal(spine_animation_state obj, bool value);
SPINE_C_EXPORT bool spine_animation_state_get_manual_track_entry_disposal(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_dispose_track_entry(spine_animation_state obj, spine_track_entry entry);
SPINE_C_EXPORT spine_void spine_animation_state_get_renderer_object(spine_animation_state obj);
SPINE_C_EXPORT void spine_animation_state_set_renderer_object(spine_animation_state obj, spine_void rendererObject, spine_dispose_renderer_object dispose);
SPINE_C_EXPORT void * spine_animation_state_get_renderer_object(spine_animation_state obj);
#ifdef __cplusplus
}

View File

@ -43,7 +43,7 @@ void spine_animation_state_data_dispose(spine_animation_state_data obj) {
}
spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data obj) {
if (!obj) return nullptr;
if (!obj) return (spine_skeleton_data) 0;
AnimationStateData *_obj = (AnimationStateData *) obj;
return (spine_skeleton_data) _obj->getSkeletonData();
}
@ -60,13 +60,13 @@ void spine_animation_state_data_set_default_mix(spine_animation_state_data obj,
_obj->setDefaultMix(value);
}
void spine_animation_state_data_set_mix(spine_animation_state_data obj, const utf8 * fromName, const utf8 * toName, float duration) {
void spine_animation_state_data_set_mix(spine_animation_state_data obj, const char* fromName, const char* toName, float duration) {
if (!obj) return ;
AnimationStateData *_obj = (AnimationStateData *) obj;
_obj->setMix(String(fromName), String(toName), duration);
}
void spine_animation_state_data_set_mix(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration) {
void spine_animation_state_data_set_mix_3(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration) {
if (!obj) return ;
AnimationStateData *_obj = (AnimationStateData *) obj;
_obj->setMix((Animation *) from, (Animation *) to, duration);

View File

@ -34,17 +34,15 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_animation_state_data)
#include "types.h"
SPINE_C_EXPORT spine_animation_state_data spine_animation_state_data_create(spine_skeleton_data skeletonData);
SPINE_C_EXPORT void spine_animation_state_data_dispose(spine_animation_state_data obj);
SPINE_C_EXPORT spine_skeleton_data spine_animation_state_data_get_skeleton_data(spine_animation_state_data obj);
SPINE_C_EXPORT float spine_animation_state_data_get_default_mix(spine_animation_state_data obj);
SPINE_C_EXPORT void spine_animation_state_data_set_default_mix(spine_animation_state_data obj, float value);
SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, const utf8 * fromName, const utf8 * toName, float duration);
SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration);
SPINE_C_EXPORT void spine_animation_state_data_set_mix(spine_animation_state_data obj, const char* fromName, const char* toName, float duration);
SPINE_C_EXPORT void spine_animation_state_data_set_mix_3(spine_animation_state_data obj, spine_animation from, spine_animation to, float duration);
SPINE_C_EXPORT float spine_animation_state_data_get_mix(spine_animation_state_data obj, spine_animation from, spine_animation to);
SPINE_C_EXPORT void spine_animation_state_data_clear(spine_animation_state_data obj);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,569 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef SPINE_C_ARRAYS_H
#define SPINE_C_ARRAYS_H
#include "../base.h"
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Array<Animation *>
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<AtlasPage *>
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<AtlasRegion *>
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<Attachment *>
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<Bone *>
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<BoneData *>
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<BonePose *>
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<BoundingBoxAttachment *>
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<Constraint *>
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<ConstraintData *>
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<Event *>
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<EventData *>
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<float>
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<class FromProperty *>
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<IkConstraintData *>
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<int>
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<PathConstraintData *>
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<PhysicsConstraint *>
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<PhysicsConstraintData *>
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<Polygon *>
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<PropertyId>
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<Skin *>
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<Slot *>
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<SlotData *>
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<TextureRegion *>
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<Timeline *>
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<class ToProperty *>
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<TrackEntry *>
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<TransformConstraintData *>
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<unsigned short>
SPINE_OPAQUE_TYPE(spine_array_unsigned_short)
SPINE_C_EXPORT spine_array_unsigned_short spine_array_unsigned_short_create();
SPINE_C_EXPORT void spine_array_unsigned_short_dispose(spine_array_unsigned_short array);
SPINE_C_EXPORT unsigned short spine_array_unsigned_short_get(spine_array_unsigned_short array, int index);
SPINE_C_EXPORT void spine_array_unsigned_short_set(spine_array_unsigned_short array, int index, unsigned short value);
SPINE_C_EXPORT void spine_array_unsigned_short_clear(spine_array_unsigned_short array);
SPINE_C_EXPORT size_t spine_array_unsigned_short_get_capacity(spine_array_unsigned_short array);
SPINE_C_EXPORT size_t spine_array_unsigned_short_size(spine_array_unsigned_short array);
SPINE_C_EXPORT void spine_array_unsigned_short_ensure_capacity(spine_array_unsigned_short array, size_t newCapacity);
SPINE_C_EXPORT void spine_array_unsigned_short_add(spine_array_unsigned_short array, unsigned short inValue);
SPINE_C_EXPORT void spine_array_unsigned_short_remove_at(spine_array_unsigned_short array, size_t inIndex);
SPINE_C_EXPORT unsigned short *spine_array_unsigned_short_buffer(spine_array_unsigned_short array);
// Array<Update *>
SPINE_OPAQUE_TYPE(spine_array_update)
SPINE_C_EXPORT spine_array_update spine_array_update_create();
SPINE_C_EXPORT void spine_array_update_dispose(spine_array_update array);
SPINE_C_EXPORT spine_update spine_array_update_get(spine_array_update array, int index);
SPINE_C_EXPORT void spine_array_update_set(spine_array_update array, int index, spine_update value);
SPINE_C_EXPORT void spine_array_update_clear(spine_array_update array);
SPINE_C_EXPORT size_t spine_array_update_get_capacity(spine_array_update array);
SPINE_C_EXPORT size_t spine_array_update_size(spine_array_update array);
SPINE_C_EXPORT void spine_array_update_ensure_capacity(spine_array_update array, size_t newCapacity);
SPINE_C_EXPORT void spine_array_update_add(spine_array_update array, spine_update inValue);
SPINE_C_EXPORT void spine_array_update_remove_at(spine_array_update array, size_t inIndex);
SPINE_C_EXPORT bool spine_array_update_contains(spine_array_update array, spine_update inValue);
SPINE_C_EXPORT int spine_array_update_index_of(spine_array_update array, spine_update inValue);
SPINE_C_EXPORT spine_update spine_array_update_buffer(spine_array_update array);
#ifdef __cplusplus
}
#endif
#endif // SPINE_C_ARRAYS_H

View File

@ -32,12 +32,12 @@
using namespace spine;
spine_atlas spine_atlas_create(const utf8 * path, spine_texture_loader textureLoader, spine_bool createTexture) {
spine_atlas spine_atlas_create(const char* path, spine_texture_loader textureLoader, bool createTexture) {
Atlas *obj = new (__FILE__, __LINE__) Atlas(String(path), (TextureLoader *) textureLoader, createTexture);
return (spine_atlas) obj;
}
spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const utf8 * data, int32_t length, const utf8 * dir, spine_texture_loader textureLoader, spine_bool createTexture) {
spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const char * data, int length, const char * dir, spine_texture_loader textureLoader, bool createTexture) {
Atlas *obj = new (__FILE__, __LINE__) Atlas((const char *) data, length, (const char *) dir, (TextureLoader *) textureLoader, createTexture);
return (spine_atlas) obj;
}
@ -53,18 +53,12 @@ void spine_atlas_flip_v(spine_atlas obj) {
_obj->flipV();
}
spine_atlas_region spine_atlas_find_region(spine_atlas obj, const utf8 * name) {
if (!obj) return nullptr;
spine_atlas_region spine_atlas_find_region(spine_atlas obj, const char* name) {
if (!obj) return (spine_atlas_region) 0;
Atlas *_obj = (Atlas *) obj;
return (spine_atlas_region) _obj->findRegion(String(name));
}
void * spine_atlas_get_pages(spine_atlas obj) {
if (!obj) return nullptr;
Atlas *_obj = (Atlas *) obj;
return (void *) _obj->getPages();
}
int32_t spine_atlas_get_num_pages(spine_atlas obj) {
if (!obj) return 0;
Atlas *_obj = (Atlas *) obj;
@ -77,12 +71,6 @@ spine_atlas_page *spine_atlas_get_pages(spine_atlas obj) {
return (spine_atlas_page *) _obj->getPages().buffer();
}
void * spine_atlas_get_regions(spine_atlas obj) {
if (!obj) return nullptr;
Atlas *_obj = (Atlas *) obj;
return (void *) _obj->getRegions();
}
int32_t spine_atlas_get_num_regions(spine_atlas obj) {
if (!obj) return 0;
Atlas *_obj = (Atlas *) obj;

View File

@ -34,19 +34,16 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
#include "../extensions.h"
SPINE_OPAQUE_TYPE(spine_atlas)
SPINE_C_EXPORT spine_atlas spine_atlas_create(const utf8 * path, spine_texture_loader textureLoader, spine_bool createTexture);
SPINE_C_EXPORT spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const utf8 * data, int32_t length, const utf8 * dir, spine_texture_loader textureLoader, spine_bool createTexture);
SPINE_C_EXPORT spine_atlas spine_atlas_create(const char* path, spine_texture_loader textureLoader, bool createTexture);
SPINE_C_EXPORT spine_atlas spine_atlas_create_with_string_int_string_texture_loader_bool(const char * data, int length, const char * dir, spine_texture_loader textureLoader, bool createTexture);
SPINE_C_EXPORT void spine_atlas_dispose(spine_atlas obj);
SPINE_C_EXPORT void spine_atlas_flip_v(spine_atlas obj);
SPINE_C_EXPORT spine_atlas_region spine_atlas_find_region(spine_atlas obj, const utf8 * name);
SPINE_C_EXPORT void * spine_atlas_get_pages(spine_atlas obj);
SPINE_C_EXPORT spine_atlas_region spine_atlas_find_region(spine_atlas obj, const char* name);
SPINE_C_EXPORT int32_t spine_atlas_get_num_pages(spine_atlas obj);
SPINE_C_EXPORT spine_atlas_page *spine_atlas_get_pages(spine_atlas obj);
SPINE_C_EXPORT void * spine_atlas_get_regions(spine_atlas obj);
SPINE_C_EXPORT int32_t spine_atlas_get_num_regions(spine_atlas obj);
SPINE_C_EXPORT spine_atlas_region *spine_atlas_get_regions(spine_atlas obj);

View File

@ -42,44 +42,44 @@ void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader obj) {
delete (AtlasAttachmentLoader *) obj;
}
spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) {
if (!obj) return nullptr;
spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) {
if (!obj) return (spine_region_attachment) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_region_attachment) _obj->newRegionAttachment(skin, String(name), String(path), (Sequence *) sequence);
return (spine_region_attachment) _obj->newRegionAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence);
}
spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) {
if (!obj) return nullptr;
spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) {
if (!obj) return (spine_mesh_attachment) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_mesh_attachment) _obj->newMeshAttachment(skin, String(name), String(path), (Sequence *) sequence);
return (spine_mesh_attachment) _obj->newMeshAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence);
}
spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_bounding_box_attachment) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(skin, String(name));
return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(*(Skin*) skin, String(name));
}
spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_path_attachment) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_path_attachment) _obj->newPathAttachment(skin, String(name));
return (spine_path_attachment) _obj->newPathAttachment(*(Skin*) skin, String(name));
}
spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) {
spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_point_attachment) _obj->newPointAttachment(skin, String(name));
return (spine_point_attachment) _obj->newPointAttachment(*(Skin*) skin, String(name));
}
spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_clipping_attachment) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_clipping_attachment) _obj->newClippingAttachment(skin, String(name));
return (spine_clipping_attachment) _obj->newClippingAttachment(*(Skin*) skin, String(name));
}
spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const utf8 * name) {
if (!obj) return nullptr;
spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const char* name) {
if (!obj) return (spine_atlas_region) 0;
AtlasAttachmentLoader *_obj = (AtlasAttachmentLoader *) obj;
return (spine_atlas_region) _obj->findRegion(String(name));
}

View File

@ -34,19 +34,17 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_atlas_attachment_loader)
#include "types.h"
SPINE_C_EXPORT spine_atlas_attachment_loader spine_atlas_attachment_loader_create(spine_atlas atlas);
SPINE_C_EXPORT void spine_atlas_attachment_loader_dispose(spine_atlas_attachment_loader obj);
SPINE_C_EXPORT spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence);
SPINE_C_EXPORT spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence);
SPINE_C_EXPORT spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const utf8 * name);
SPINE_C_EXPORT spine_region_attachment spine_atlas_attachment_loader_new_region_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence);
SPINE_C_EXPORT spine_mesh_attachment spine_atlas_attachment_loader_new_mesh_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence);
SPINE_C_EXPORT spine_bounding_box_attachment spine_atlas_attachment_loader_new_bounding_box_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_path_attachment spine_atlas_attachment_loader_new_path_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_point_attachment spine_atlas_attachment_loader_new_point_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_clipping_attachment spine_atlas_attachment_loader_new_clipping_attachment(spine_atlas_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_atlas_region spine_atlas_attachment_loader_find_region(spine_atlas_attachment_loader obj, const char* name);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_atlas_page spine_atlas_page_create(const utf8 * inName) {
spine_atlas_page spine_atlas_page_create(const char* inName) {
AtlasPage *obj = new (__FILE__, __LINE__) AtlasPage(String(inName));
return (spine_atlas_page) obj;
}

View File

@ -34,11 +34,9 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_atlas_page)
SPINE_C_EXPORT spine_atlas_page spine_atlas_page_create(const utf8 * inName);
SPINE_C_EXPORT spine_atlas_page spine_atlas_page_create(const char* inName);
SPINE_C_EXPORT void spine_atlas_page_dispose(spine_atlas_page obj);
#ifdef __cplusplus

View File

@ -34,9 +34,7 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_atlas_region)
#include "types.h"
SPINE_C_EXPORT void spine_atlas_region_dispose(spine_atlas_region obj);

View File

@ -32,35 +32,28 @@
using namespace spine;
spine_attachment spine_attachment_create(const utf8 * name) {
Attachment *obj = new (__FILE__, __LINE__) Attachment(String(name));
return (spine_attachment) obj;
}
void spine_attachment_dispose(spine_attachment obj) {
if (!obj) return;
delete (Attachment *) obj;
}
spine_rtti spine_attachment_get_rtti(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_attachment_get_rtti() {
return (spine_rtti) &Attachment::rtti;
}
const utf8 * spine_attachment_get_name(spine_attachment obj) {
const char* spine_attachment_get_name(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
return (const utf8 *) _obj->getName().buffer();
return (const char *) _obj->getName().buffer();
}
spine_attachment spine_attachment_copy(spine_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_attachment) 0;
Attachment *_obj = (Attachment *) obj;
return (spine_attachment) _obj->copy();
}
int32_t spine_attachment_get_ref_count(spine_attachment obj) {
int spine_attachment_get_ref_count(spine_attachment obj) {
if (!obj) return 0;
Attachment *_obj = (Attachment *) obj;
return _obj->getRefCount();
@ -77,66 +70,3 @@ void spine_attachment_dereference(spine_attachment obj) {
Attachment *_obj = (Attachment *) obj;
_obj->dereference();
}
spine_bool spine_attachment_is_type(spine_attachment obj, spine_attachment_type type) {
if (!obj) return 0;
Attachment *_obj = (Attachment *) obj;
switch (type) {
case SPINE_TYPE_ATTACHMENT_POINT_ATTACHMENT:
return _obj->getRTTI().instanceOf(PointAttachment::rtti);
case SPINE_TYPE_ATTACHMENT_REGION_ATTACHMENT:
return _obj->getRTTI().instanceOf(RegionAttachment::rtti);
case SPINE_TYPE_ATTACHMENT_BOUNDING_BOX_ATTACHMENT:
return _obj->getRTTI().instanceOf(BoundingBoxAttachment::rtti);
case SPINE_TYPE_ATTACHMENT_CLIPPING_ATTACHMENT:
return _obj->getRTTI().instanceOf(ClippingAttachment::rtti);
case SPINE_TYPE_ATTACHMENT_MESH_ATTACHMENT:
return _obj->getRTTI().instanceOf(MeshAttachment::rtti);
case SPINE_TYPE_ATTACHMENT_PATH_ATTACHMENT:
return _obj->getRTTI().instanceOf(PathAttachment::rtti);
}
return 0;
}
spine_point_attachment spine_attachment_as_point_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(PointAttachment::rtti)) return nullptr;
return (spine_point_attachment) obj;
}
spine_region_attachment spine_attachment_as_region_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(RegionAttachment::rtti)) return nullptr;
return (spine_region_attachment) obj;
}
spine_bounding_box_attachment spine_attachment_as_bounding_box_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(BoundingBoxAttachment::rtti)) return nullptr;
return (spine_bounding_box_attachment) obj;
}
spine_clipping_attachment spine_attachment_as_clipping_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(ClippingAttachment::rtti)) return nullptr;
return (spine_clipping_attachment) obj;
}
spine_mesh_attachment spine_attachment_as_mesh_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(MeshAttachment::rtti)) return nullptr;
return (spine_mesh_attachment) obj;
}
spine_path_attachment spine_attachment_as_path_attachment(spine_attachment obj) {
if (!obj) return nullptr;
Attachment *_obj = (Attachment *) obj;
if (!_obj->getRTTI().instanceOf(PathAttachment::rtti)) return nullptr;
return (spine_path_attachment) obj;
}

View File

@ -34,47 +34,15 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_attachment)
SPINE_C_EXPORT spine_attachment spine_attachment_create(const utf8 * name);
SPINE_C_EXPORT void spine_attachment_dispose(spine_attachment obj);
SPINE_C_EXPORT spine_rtti spine_attachment_get_rtti(spine_attachment obj);
SPINE_C_EXPORT const utf8 * spine_attachment_get_name(spine_attachment obj);
SPINE_C_EXPORT spine_rtti spine_attachment_get_rtti();
SPINE_C_EXPORT const char* spine_attachment_get_name(spine_attachment obj);
SPINE_C_EXPORT spine_attachment spine_attachment_copy(spine_attachment obj);
SPINE_C_EXPORT int32_t spine_attachment_get_ref_count(spine_attachment obj);
SPINE_C_EXPORT int spine_attachment_get_ref_count(spine_attachment obj);
SPINE_C_EXPORT void spine_attachment_reference(spine_attachment obj);
SPINE_C_EXPORT void spine_attachment_dereference(spine_attachment obj);
struct spine_point_attachment_wrapper;
typedef struct spine_point_attachment_wrapper *spine_point_attachment;
struct spine_region_attachment_wrapper;
typedef struct spine_region_attachment_wrapper *spine_region_attachment;
struct spine_bounding_box_attachment_wrapper;
typedef struct spine_bounding_box_attachment_wrapper *spine_bounding_box_attachment;
struct spine_clipping_attachment_wrapper;
typedef struct spine_clipping_attachment_wrapper *spine_clipping_attachment;
struct spine_mesh_attachment_wrapper;
typedef struct spine_mesh_attachment_wrapper *spine_mesh_attachment;
struct spine_path_attachment_wrapper;
typedef struct spine_path_attachment_wrapper *spine_path_attachment;
typedef enum spine_attachment_type {
SPINE_TYPE_ATTACHMENT_POINT_ATTACHMENT = 0,
SPINE_TYPE_ATTACHMENT_REGION_ATTACHMENT = 1,
SPINE_TYPE_ATTACHMENT_BOUNDING_BOX_ATTACHMENT = 2,
SPINE_TYPE_ATTACHMENT_CLIPPING_ATTACHMENT = 3,
SPINE_TYPE_ATTACHMENT_MESH_ATTACHMENT = 4,
SPINE_TYPE_ATTACHMENT_PATH_ATTACHMENT = 5
} spine_attachment_type;
SPINE_C_EXPORT spine_bool spine_attachment_is_type(spine_attachment obj, spine_attachment_type type);
SPINE_C_EXPORT spine_point_attachment spine_attachment_as_point_attachment(spine_attachment obj);
SPINE_C_EXPORT spine_region_attachment spine_attachment_as_region_attachment(spine_attachment obj);
SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_as_bounding_box_attachment(spine_attachment obj);
SPINE_C_EXPORT spine_clipping_attachment spine_attachment_as_clipping_attachment(spine_attachment obj);
SPINE_C_EXPORT spine_mesh_attachment spine_attachment_as_mesh_attachment(spine_attachment obj);
SPINE_C_EXPORT spine_path_attachment spine_attachment_as_path_attachment(spine_attachment obj);
#ifdef __cplusplus
}

View File

@ -32,48 +32,43 @@
using namespace spine;
spine_attachment_loader spine_attachment_loader_create(void) {
AttachmentLoader *obj = new (__FILE__, __LINE__) AttachmentLoader();
return (spine_attachment_loader) obj;
}
void spine_attachment_loader_dispose(spine_attachment_loader obj) {
if (!obj) return;
delete (AttachmentLoader *) obj;
}
spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) {
if (!obj) return nullptr;
spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) {
if (!obj) return (spine_region_attachment) 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_region_attachment) _obj->newRegionAttachment(skin, String(name), String(path), (Sequence *) sequence);
return (spine_region_attachment) _obj->newRegionAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence);
}
spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence) {
if (!obj) return nullptr;
spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence) {
if (!obj) return (spine_mesh_attachment) 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_mesh_attachment) _obj->newMeshAttachment(skin, String(name), String(path), (Sequence *) sequence);
return (spine_mesh_attachment) _obj->newMeshAttachment(*(Skin*) skin, String(name), String(path), (Sequence *) sequence);
}
spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_bounding_box_attachment) 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(skin, String(name));
return (spine_bounding_box_attachment) _obj->newBoundingBoxAttachment(*(Skin*) skin, String(name));
}
spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_path_attachment) 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_path_attachment) _obj->newPathAttachment(skin, String(name));
return (spine_path_attachment) _obj->newPathAttachment(*(Skin*) skin, String(name));
}
spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) {
spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_point_attachment) _obj->newPointAttachment(skin, String(name));
return (spine_point_attachment) _obj->newPointAttachment(*(Skin*) skin, String(name));
}
spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name) {
if (!obj) return nullptr;
spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const char* name) {
if (!obj) return (spine_clipping_attachment) 0;
AttachmentLoader *_obj = (AttachmentLoader *) obj;
return (spine_clipping_attachment) _obj->newClippingAttachment(skin, String(name));
return (spine_clipping_attachment) _obj->newClippingAttachment(*(Skin*) skin, String(name));
}

View File

@ -34,18 +34,15 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_attachment_loader)
SPINE_C_EXPORT spine_attachment_loader spine_attachment_loader_create(void);
SPINE_C_EXPORT void spine_attachment_loader_dispose(spine_attachment_loader obj);
SPINE_C_EXPORT spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence);
SPINE_C_EXPORT spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name, const utf8 * path, spine_sequence sequence);
SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const utf8 * name);
SPINE_C_EXPORT spine_region_attachment spine_attachment_loader_new_region_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence);
SPINE_C_EXPORT spine_mesh_attachment spine_attachment_loader_new_mesh_attachment(spine_attachment_loader obj, spine_skin skin, const char* name, const char* path, spine_sequence sequence);
SPINE_C_EXPORT spine_bounding_box_attachment spine_attachment_loader_new_bounding_box_attachment(spine_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_path_attachment spine_attachment_loader_new_path_attachment(spine_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_point_attachment spine_attachment_loader_new_point_attachment(spine_attachment_loader obj, spine_skin skin, const char* name);
SPINE_C_EXPORT spine_clipping_attachment spine_attachment_loader_new_clipping_attachment(spine_attachment_loader obj, spine_skin skin, const char* name);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_attachment_timeline spine_attachment_timeline_create(spine_size_t frameCount, int32_t slotIndex) {
spine_attachment_timeline spine_attachment_timeline_create(size_t frameCount, int slotIndex) {
AttachmentTimeline *obj = new (__FILE__, __LINE__) AttachmentTimeline(frameCount, slotIndex);
return (spine_attachment_timeline) obj;
}
@ -42,70 +42,56 @@ void spine_attachment_timeline_dispose(spine_attachment_timeline obj) {
delete (AttachmentTimeline *) obj;
}
spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_attachment_timeline_get_rtti() {
return (spine_rtti) &AttachmentTimeline::rtti;
}
void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int32_t frame, float time, const utf8 * attachmentName) {
void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int frame, float time, const char* attachmentName) {
if (!obj) return ;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
_obj->setFrame(frame, time, String(attachmentName));
}
void * spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getAttachmentNames();
}
int32_t spine_attachment_timeline_get_num_attachment_names(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (int32_t) _obj->getAttachmentNames().size();
}
spine_string *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) {
const char * *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (spine_string *) _obj->getAttachmentNames().buffer();
return (const char * *) _obj->getAttachmentNames().buffer();
}
spine_size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj) {
if (!obj) return nullptr;
size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getFrameEntries();
}
spine_size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj) {
if (!obj) return nullptr;
size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getFrameCount();
}
void * spine_attachment_timeline_get_frames(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getFrames();
}
int32_t spine_attachment_timeline_get_num_frames(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj) {
float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_attachment_timeline_get_duration(spine_attachment_timeline obj) {
@ -114,31 +100,25 @@ float spine_attachment_timeline_get_duration(spine_attachment_timeline obj) {
return _obj->getDuration();
}
void * spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getPropertyIds();
}
int32_t spine_attachment_timeline_get_num_property_ids(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) {
int64_t *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj) {
if (!obj) return nullptr;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}
int32_t spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj) {
int spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj) {
if (!obj) return 0;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
return _obj->getSlotIndex();
}
void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int32_t value) {
void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int value) {
if (!obj) return;
AttachmentTimeline *_obj = (AttachmentTimeline *) obj;
_obj->setSlotIndex(value);

View File

@ -34,29 +34,24 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_attachment_timeline)
SPINE_C_EXPORT spine_attachment_timeline spine_attachment_timeline_create(spine_size_t frameCount, int32_t slotIndex);
SPINE_C_EXPORT spine_attachment_timeline spine_attachment_timeline_create(size_t frameCount, int slotIndex);
SPINE_C_EXPORT void spine_attachment_timeline_dispose(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_rtti spine_attachment_timeline_get_rtti(spine_attachment_timeline obj);
SPINE_C_EXPORT void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int32_t frame, float time, const utf8 * attachmentName);
SPINE_C_EXPORT void * spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_rtti spine_attachment_timeline_get_rtti();
SPINE_C_EXPORT void spine_attachment_timeline_apply(spine_attachment_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT void spine_attachment_timeline_set_frame(spine_attachment_timeline obj, int frame, float time, const char* attachmentName);
SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_attachment_names(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_string *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj);
SPINE_C_EXPORT void * spine_attachment_timeline_get_frames(spine_attachment_timeline obj);
SPINE_C_EXPORT const char * *spine_attachment_timeline_get_attachment_names(spine_attachment_timeline obj);
SPINE_C_EXPORT size_t spine_attachment_timeline_get_frame_entries(spine_attachment_timeline obj);
SPINE_C_EXPORT size_t spine_attachment_timeline_get_frame_count(spine_attachment_timeline obj);
SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_frames(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj);
SPINE_C_EXPORT float *spine_attachment_timeline_get_frames(spine_attachment_timeline obj);
SPINE_C_EXPORT float spine_attachment_timeline_get_duration(spine_attachment_timeline obj);
SPINE_C_EXPORT void * spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj);
SPINE_C_EXPORT int32_t spine_attachment_timeline_get_num_property_ids(spine_attachment_timeline obj);
SPINE_C_EXPORT spine_property_id *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj);
SPINE_C_EXPORT int32_t spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj);
SPINE_C_EXPORT void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int32_t value);
SPINE_C_EXPORT int64_t *spine_attachment_timeline_get_property_ids(spine_attachment_timeline obj);
SPINE_C_EXPORT int spine_attachment_timeline_get_slot_index(spine_attachment_timeline obj);
SPINE_C_EXPORT void spine_attachment_timeline_set_slot_index(spine_attachment_timeline obj, int value);
#ifdef __cplusplus
}

View File

@ -30,20 +30,20 @@
#ifndef SPINE_C_ATTACHMENTTYPE_H
#define SPINE_C_ATTACHMENTTYPE_H
#include "../../custom.h"
#include "../base.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum spine_attachment_type {
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_REGION,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_BOUNDINGBOX,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_MESH,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_LINKEDMESH,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_PATH,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_POINT,
SPINE_ATTACHMENT_TYPE_ATTACHMENT_TYPE_CLIPPING
SPINE_ATTACHMENT_TYPE_REGION,
SPINE_ATTACHMENT_TYPE_BOUNDINGBOX,
SPINE_ATTACHMENT_TYPE_MESH,
SPINE_ATTACHMENT_TYPE_LINKEDMESH,
SPINE_ATTACHMENT_TYPE_PATH,
SPINE_ATTACHMENT_TYPE_POINT,
SPINE_ATTACHMENT_TYPE_CLIPPING
} spine_attachment_type;
#ifdef __cplusplus

View File

@ -30,17 +30,17 @@
#ifndef SPINE_C_BLENDMODE_H
#define SPINE_C_BLENDMODE_H
#include "../../custom.h"
#include "../base.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum spine_blend_mode {
SPINE_BLEND_MODE_BLEND_MODE_NORMAL = 0,
SPINE_BLEND_MODE_BLEND_MODE_ADDITIVE,
SPINE_BLEND_MODE_BLEND_MODE_MULTIPLY,
SPINE_BLEND_MODE_BLEND_MODE_SCREEN
SPINE_BLEND_MODE_NORMAL = 0,
SPINE_BLEND_MODE_ADDITIVE,
SPINE_BLEND_MODE_MULTIPLY,
SPINE_BLEND_MODE_SCREEN
} spine_blend_mode;
#ifdef __cplusplus

View File

@ -37,20 +37,20 @@ void spine_block_dispose(spine_block obj) {
delete (Block *) obj;
}
int32_t spine_block_free(spine_block obj) {
int spine_block_free(spine_block obj) {
if (!obj) return 0;
Block *_obj = (Block *) obj;
return _obj->free();
}
spine_bool spine_block_can_fit(spine_block obj, int32_t numBytes) {
if (!obj) return 0;
bool spine_block_can_fit(spine_block obj, int numBytes) {
if (!obj) return false;
Block *_obj = (Block *) obj;
return _obj->canFit(numBytes);
}
spine_uint8_t spine_block_allocate(spine_block obj, int32_t numBytes) {
uint8_t * spine_block_allocate(spine_block obj, int numBytes) {
if (!obj) return 0;
Block *_obj = (Block *) obj;
return (spine_uint8_t) _obj->allocate(numBytes);
return (uint8_t *) _obj->allocate(numBytes);
}

View File

@ -34,14 +34,12 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_block)
#include "types.h"
SPINE_C_EXPORT void spine_block_dispose(spine_block obj);
SPINE_C_EXPORT int32_t spine_block_free(spine_block obj);
SPINE_C_EXPORT spine_bool spine_block_can_fit(spine_block obj, int32_t numBytes);
SPINE_C_EXPORT spine_uint8_t spine_block_allocate(spine_block obj, int32_t numBytes);
SPINE_C_EXPORT int spine_block_free(spine_block obj);
SPINE_C_EXPORT bool spine_block_can_fit(spine_block obj, int numBytes);
SPINE_C_EXPORT uint8_t * spine_block_allocate(spine_block obj, int numBytes);
#ifdef __cplusplus
}

View File

@ -33,12 +33,12 @@
using namespace spine;
spine_bone spine_bone_create(spine_bone_data data, spine_bone parent) {
Bone *obj = new (__FILE__, __LINE__) Bone(data, (Bone *) parent);
Bone *obj = new (__FILE__, __LINE__) Bone(*(BoneData*) data, (Bone *) parent);
return (spine_bone) obj;
}
spine_bone spine_bone_create_with_bone_bone(spine_bone bone, spine_bone parent) {
Bone *obj = new (__FILE__, __LINE__) Bone(bone, (Bone *) parent);
Bone *obj = new (__FILE__, __LINE__) Bone(*(Bone*) bone, (Bone *) parent);
return (spine_bone) obj;
}
@ -47,24 +47,16 @@ void spine_bone_dispose(spine_bone obj) {
delete (Bone *) obj;
}
spine_rtti spine_bone_get_rtti(spine_bone obj) {
if (!obj) return nullptr;
Bone *_obj = (Bone *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bone_get_rtti() {
return (spine_rtti) &Bone::rtti;
}
spine_bone spine_bone_get_parent(spine_bone obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone) 0;
Bone *_obj = (Bone *) obj;
return (spine_bone) _obj->getParent();
}
void * spine_bone_get_children(spine_bone obj) {
if (!obj) return nullptr;
Bone *_obj = (Bone *) obj;
return (void *) _obj->getChildren();
}
int32_t spine_bone_get_num_children(spine_bone obj) {
if (!obj) return 0;
Bone *_obj = (Bone *) obj;
@ -84,21 +76,21 @@ void spine_bone_setup_pose(spine_bone obj) {
}
spine_bone_data spine_bone_get_data(spine_bone obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone_data) 0;
Bone *_obj = (Bone *) obj;
return _obj->getData();
return (spine_bone_data) &_obj->getData();
}
spine_bone_local spine_bone_get_pose(spine_bone obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone_local) 0;
Bone *_obj = (Bone *) obj;
return _obj->getPose();
return (spine_bone_local) &_obj->getPose();
}
spine_bone_pose spine_bone_get_applied_pose(spine_bone obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone_pose) 0;
Bone *_obj = (Bone *) obj;
return _obj->getAppliedPose();
return (spine_bone_pose) &_obj->getAppliedPose();
}
void spine_bone_reset_constrained(spine_bone obj) {
@ -107,7 +99,7 @@ void spine_bone_reset_constrained(spine_bone obj) {
_obj->resetConstrained();
}
void spine_bone_pose(spine_bone obj) {
void spine_bone_update_pose(spine_bone obj) {
if (!obj) return ;
Bone *_obj = (Bone *) obj;
_obj->pose();
@ -119,19 +111,19 @@ void spine_bone_constrained(spine_bone obj) {
_obj->constrained();
}
spine_bool spine_bone_is_pose_equal_to_applied(spine_bone obj) {
if (!obj) return 0;
bool spine_bone_is_pose_equal_to_applied(spine_bone obj) {
if (!obj) return false;
Bone *_obj = (Bone *) obj;
return _obj->isPoseEqualToApplied();
}
spine_bool spine_bone_is_active(spine_bone obj) {
if (!obj) return 0;
bool spine_bone_is_active(spine_bone obj) {
if (!obj) return false;
Bone *_obj = (Bone *) obj;
return _obj->isActive();
}
void spine_bone_set_active(spine_bone obj, spine_bool value) {
void spine_bone_set_active(spine_bone obj, bool value) {
if (!obj) return;
Bone *_obj = (Bone *) obj;
_obj->setActive(value);

View File

@ -34,16 +34,13 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_bone)
#include "types.h"
SPINE_C_EXPORT spine_bone spine_bone_create(spine_bone_data data, spine_bone parent);
SPINE_C_EXPORT spine_bone spine_bone_create_with_bone_bone(spine_bone bone, spine_bone parent);
SPINE_C_EXPORT void spine_bone_dispose(spine_bone obj);
SPINE_C_EXPORT spine_rtti spine_bone_get_rtti(spine_bone obj);
SPINE_C_EXPORT spine_rtti spine_bone_get_rtti();
SPINE_C_EXPORT spine_bone spine_bone_get_parent(spine_bone obj);
SPINE_C_EXPORT void * spine_bone_get_children(spine_bone obj);
SPINE_C_EXPORT int32_t spine_bone_get_num_children(spine_bone obj);
SPINE_C_EXPORT spine_bone *spine_bone_get_children(spine_bone obj);
SPINE_C_EXPORT void spine_bone_setup_pose(spine_bone obj);
@ -51,11 +48,11 @@ SPINE_C_EXPORT spine_bone_data spine_bone_get_data(spine_bone obj);
SPINE_C_EXPORT spine_bone_local spine_bone_get_pose(spine_bone obj);
SPINE_C_EXPORT spine_bone_pose spine_bone_get_applied_pose(spine_bone obj);
SPINE_C_EXPORT void spine_bone_reset_constrained(spine_bone obj);
SPINE_C_EXPORT void spine_bone_pose(spine_bone obj);
SPINE_C_EXPORT void spine_bone_update_pose(spine_bone obj);
SPINE_C_EXPORT void spine_bone_constrained(spine_bone obj);
SPINE_C_EXPORT spine_bool spine_bone_is_pose_equal_to_applied(spine_bone obj);
SPINE_C_EXPORT spine_bool spine_bone_is_active(spine_bone obj);
SPINE_C_EXPORT void spine_bone_set_active(spine_bone obj, spine_bool value);
SPINE_C_EXPORT bool spine_bone_is_pose_equal_to_applied(spine_bone obj);
SPINE_C_EXPORT bool spine_bone_is_active(spine_bone obj);
SPINE_C_EXPORT void spine_bone_set_active(spine_bone obj, bool value);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_bone_data spine_bone_data_create(int32_t index, const utf8 * name, spine_bone_data parent) {
spine_bone_data spine_bone_data_create(int index, const char* name, spine_bone_data parent) {
BoneData *obj = new (__FILE__, __LINE__) BoneData(index, String(name), (BoneData *) parent);
return (spine_bone_data) obj;
}
@ -42,14 +42,14 @@ void spine_bone_data_dispose(spine_bone_data obj) {
delete (BoneData *) obj;
}
int32_t spine_bone_data_get_index(spine_bone_data obj) {
int spine_bone_data_get_index(spine_bone_data obj) {
if (!obj) return 0;
BoneData *_obj = (BoneData *) obj;
return _obj->getIndex();
}
spine_bone_data spine_bone_data_get_parent(spine_bone_data obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone_data) 0;
BoneData *_obj = (BoneData *) obj;
return (spine_bone_data) _obj->getParent();
}
@ -67,43 +67,37 @@ void spine_bone_data_set_length(spine_bone_data obj, float value) {
}
spine_color spine_bone_data_get_color(spine_bone_data obj) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
BoneData *_obj = (BoneData *) obj;
return (spine_color) &_obj->getColor();
}
const utf8 * spine_bone_data_get_icon(spine_bone_data obj) {
const char* spine_bone_data_get_icon(spine_bone_data obj) {
if (!obj) return nullptr;
BoneData *_obj = (BoneData *) obj;
return (const utf8 *) _obj->getIcon().buffer();
return (const char *) _obj->getIcon().buffer();
}
void spine_bone_data_set_icon(spine_bone_data obj, const utf8 * value) {
void spine_bone_data_set_icon(spine_bone_data obj, const char* value) {
if (!obj) return;
BoneData *_obj = (BoneData *) obj;
_obj->setIcon(String(value));
}
spine_bool spine_bone_data_get_visible(spine_bone_data obj) {
if (!obj) return 0;
bool spine_bone_data_get_visible(spine_bone_data obj) {
if (!obj) return false;
BoneData *_obj = (BoneData *) obj;
return _obj->getVisible();
}
void spine_bone_data_set_visible(spine_bone_data obj, spine_bool value) {
void spine_bone_data_set_visible(spine_bone_data obj, bool value) {
if (!obj) return;
BoneData *_obj = (BoneData *) obj;
_obj->setVisible(value);
}
spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj) {
if (!obj) return nullptr;
if (!obj) return (spine_bone_local) 0;
BoneData *_obj = (BoneData *) obj;
return _obj->getSetupPose();
}
spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj) {
if (!obj) return nullptr;
BoneData *_obj = (BoneData *) obj;
return _obj->getSetupPose();
return (spine_bone_local) &_obj->getSetupPose();
}

View File

@ -34,22 +34,19 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_bone_data)
SPINE_C_EXPORT spine_bone_data spine_bone_data_create(int32_t index, const utf8 * name, spine_bone_data parent);
SPINE_C_EXPORT spine_bone_data spine_bone_data_create(int index, const char* name, spine_bone_data parent);
SPINE_C_EXPORT void spine_bone_data_dispose(spine_bone_data obj);
SPINE_C_EXPORT int32_t spine_bone_data_get_index(spine_bone_data obj);
SPINE_C_EXPORT int spine_bone_data_get_index(spine_bone_data obj);
SPINE_C_EXPORT spine_bone_data spine_bone_data_get_parent(spine_bone_data obj);
SPINE_C_EXPORT float spine_bone_data_get_length(spine_bone_data obj);
SPINE_C_EXPORT void spine_bone_data_set_length(spine_bone_data obj, float value);
SPINE_C_EXPORT spine_color spine_bone_data_get_color(spine_bone_data obj);
SPINE_C_EXPORT const utf8 * spine_bone_data_get_icon(spine_bone_data obj);
SPINE_C_EXPORT void spine_bone_data_set_icon(spine_bone_data obj, const utf8 * value);
SPINE_C_EXPORT spine_bool spine_bone_data_get_visible(spine_bone_data obj);
SPINE_C_EXPORT void spine_bone_data_set_visible(spine_bone_data obj, spine_bool value);
SPINE_C_EXPORT spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj);
SPINE_C_EXPORT const char* spine_bone_data_get_icon(spine_bone_data obj);
SPINE_C_EXPORT void spine_bone_data_set_icon(spine_bone_data obj, const char* value);
SPINE_C_EXPORT bool spine_bone_data_get_visible(spine_bone_data obj);
SPINE_C_EXPORT void spine_bone_data_set_visible(spine_bone_data obj, bool value);
SPINE_C_EXPORT spine_bone_local spine_bone_data_get_setup_pose(spine_bone_data obj);
#ifdef __cplusplus

View File

@ -45,7 +45,7 @@ void spine_bone_local_dispose(spine_bone_local obj) {
void spine_bone_local_set(spine_bone_local obj, spine_bone_local value) {
if (!obj) return;
BoneLocal *_obj = (BoneLocal *) obj;
_obj->set(value);
_obj->set(*((BoneLocal*) value));
}
float spine_bone_local_get_x(spine_bone_local obj) {
@ -151,13 +151,13 @@ void spine_bone_local_set_shear_y(spine_bone_local obj, float value) {
}
spine_inherit spine_bone_local_get_inherit(spine_bone_local obj) {
if (!obj) return nullptr;
if (!obj) return (spine_inherit) 0;
BoneLocal *_obj = (BoneLocal *) obj;
return _obj->getInherit();
return (spine_inherit) _obj->getInherit();
}
void spine_bone_local_set_inherit(spine_bone_local obj, spine_inherit value) {
if (!obj) return;
BoneLocal *_obj = (BoneLocal *) obj;
_obj->setInherit(value);
_obj->setInherit((Inherit) value);
}

View File

@ -34,9 +34,7 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_bone_local)
#include "types.h"
SPINE_C_EXPORT spine_bone_local spine_bone_local_create(void);
SPINE_C_EXPORT void spine_bone_local_dispose(spine_bone_local obj);

View File

@ -45,40 +45,40 @@ void spine_bone_pose_dispose(spine_bone_pose obj) {
void spine_bone_pose_update(spine_bone_pose obj, spine_skeleton skeleton, spine_physics physics) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->update(skeleton, physics);
_obj->update(*(Skeleton*) skeleton, (Physics) physics);
}
void spine_bone_pose_update_world_transform(spine_bone_pose obj, spine_skeleton skeleton) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->updateWorldTransform(skeleton);
_obj->updateWorldTransform(*(Skeleton*) skeleton);
}
void spine_bone_pose_update_local_transform(spine_bone_pose obj, spine_skeleton skeleton) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->updateLocalTransform(skeleton);
_obj->updateLocalTransform(*(Skeleton*) skeleton);
}
void spine_bone_pose_validate_local_transform(spine_bone_pose obj, spine_skeleton skeleton) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->validateLocalTransform(skeleton);
_obj->validateLocalTransform(*(Skeleton*) skeleton);
}
void spine_bone_pose_modify_local(spine_bone_pose obj, spine_skeleton skeleton) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->modifyLocal(skeleton);
_obj->modifyLocal(*(Skeleton*) skeleton);
}
void spine_bone_pose_modify_world(spine_bone_pose obj, int32_t update) {
void spine_bone_pose_modify_world(spine_bone_pose obj, int update) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->modifyWorld(update);
}
void spine_bone_pose_reset_world(spine_bone_pose obj, int32_t update) {
void spine_bone_pose_reset_world(spine_bone_pose obj, int update) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->resetWorld(update);
@ -180,28 +180,28 @@ float spine_bone_pose_get_world_scale_y(spine_bone_pose obj) {
return _obj->getWorldScaleY();
}
void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float outLocalX, float outLocalY) {
void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float* outLocalX, float* outLocalY) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->worldToLocal(worldX, worldY, outLocalX, outLocalY);
_obj->worldToLocal(worldX, worldY, *outLocalX, *outLocalY);
}
void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float outWorldX, float outWorldY) {
void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float* outWorldX, float* outWorldY) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->localToWorld(localX, localY, outWorldX, outWorldY);
_obj->localToWorld(localX, localY, *outWorldX, *outWorldY);
}
void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float outParentX, float outParentY) {
void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float* outParentX, float* outParentY) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->worldToParent(worldX, worldY, outParentX, outParentY);
_obj->worldToParent(worldX, worldY, *outParentX, *outParentY);
}
void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float outWorldX, float outWorldY) {
void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float* outWorldX, float* outWorldY) {
if (!obj) return ;
BonePose *_obj = (BonePose *) obj;
_obj->parentToWorld(parentX, parentY, outWorldX, outWorldY);
_obj->parentToWorld(parentX, parentY, *outWorldX, *outWorldY);
}
float spine_bone_pose_world_to_local_rotation(spine_bone_pose obj, float worldRotation) {
@ -225,7 +225,7 @@ void spine_bone_pose_rotate_world(spine_bone_pose obj, float degrees) {
void spine_bone_pose_set(spine_bone_pose obj, spine_bone_local value) {
if (!obj) return;
BonePose *_obj = (BonePose *) obj;
_obj->set(value);
_obj->set(*((BoneLocal*) value));
}
float spine_bone_pose_get_x(spine_bone_pose obj) {
@ -331,19 +331,17 @@ void spine_bone_pose_set_shear_y(spine_bone_pose obj, float value) {
}
spine_inherit spine_bone_pose_get_inherit(spine_bone_pose obj) {
if (!obj) return nullptr;
if (!obj) return (spine_inherit) 0;
BonePose *_obj = (BonePose *) obj;
return _obj->getInherit();
return (spine_inherit) _obj->getInherit();
}
void spine_bone_pose_set_inherit(spine_bone_pose obj, spine_inherit value) {
if (!obj) return;
BonePose *_obj = (BonePose *) obj;
_obj->setInherit(value);
_obj->setInherit((Inherit) value);
}
spine_rtti spine_bone_pose_get_rtti(spine_bone_pose obj) {
if (!obj) return nullptr;
BonePose *_obj = (BonePose *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bone_pose_get_rtti() {
return (spine_rtti) &BonePose::rtti;
}

View File

@ -34,9 +34,7 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_bone_pose)
#include "types.h"
SPINE_C_EXPORT spine_bone_pose spine_bone_pose_create(void);
SPINE_C_EXPORT void spine_bone_pose_dispose(spine_bone_pose obj);
@ -45,8 +43,8 @@ SPINE_C_EXPORT void spine_bone_pose_update_world_transform(spine_bone_pose obj,
SPINE_C_EXPORT void spine_bone_pose_update_local_transform(spine_bone_pose obj, spine_skeleton skeleton);
SPINE_C_EXPORT void spine_bone_pose_validate_local_transform(spine_bone_pose obj, spine_skeleton skeleton);
SPINE_C_EXPORT void spine_bone_pose_modify_local(spine_bone_pose obj, spine_skeleton skeleton);
SPINE_C_EXPORT void spine_bone_pose_modify_world(spine_bone_pose obj, int32_t update);
SPINE_C_EXPORT void spine_bone_pose_reset_world(spine_bone_pose obj, int32_t update);
SPINE_C_EXPORT void spine_bone_pose_modify_world(spine_bone_pose obj, int update);
SPINE_C_EXPORT void spine_bone_pose_reset_world(spine_bone_pose obj, int update);
SPINE_C_EXPORT float spine_bone_pose_get_a(spine_bone_pose obj);
SPINE_C_EXPORT void spine_bone_pose_set_a(spine_bone_pose obj, float value);
SPINE_C_EXPORT float spine_bone_pose_get_b(spine_bone_pose obj);
@ -63,10 +61,10 @@ SPINE_C_EXPORT float spine_bone_pose_get_world_rotation_x(spine_bone_pose obj);
SPINE_C_EXPORT float spine_bone_pose_get_world_rotation_y(spine_bone_pose obj);
SPINE_C_EXPORT float spine_bone_pose_get_world_scale_x(spine_bone_pose obj);
SPINE_C_EXPORT float spine_bone_pose_get_world_scale_y(spine_bone_pose obj);
SPINE_C_EXPORT void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float outLocalX, float outLocalY);
SPINE_C_EXPORT void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float outWorldX, float outWorldY);
SPINE_C_EXPORT void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float outParentX, float outParentY);
SPINE_C_EXPORT void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float outWorldX, float outWorldY);
SPINE_C_EXPORT void spine_bone_pose_world_to_local(spine_bone_pose obj, float worldX, float worldY, float* outLocalX, float* outLocalY);
SPINE_C_EXPORT void spine_bone_pose_local_to_world(spine_bone_pose obj, float localX, float localY, float* outWorldX, float* outWorldY);
SPINE_C_EXPORT void spine_bone_pose_world_to_parent(spine_bone_pose obj, float worldX, float worldY, float* outParentX, float* outParentY);
SPINE_C_EXPORT void spine_bone_pose_parent_to_world(spine_bone_pose obj, float parentX, float parentY, float* outWorldX, float* outWorldY);
SPINE_C_EXPORT float spine_bone_pose_world_to_local_rotation(spine_bone_pose obj, float worldRotation);
SPINE_C_EXPORT float spine_bone_pose_local_to_world_rotation(spine_bone_pose obj, float localRotation);
SPINE_C_EXPORT void spine_bone_pose_rotate_world(spine_bone_pose obj, float degrees);
@ -90,7 +88,7 @@ SPINE_C_EXPORT float spine_bone_pose_get_shear_y(spine_bone_pose obj);
SPINE_C_EXPORT void spine_bone_pose_set_shear_y(spine_bone_pose obj, float value);
SPINE_C_EXPORT spine_inherit spine_bone_pose_get_inherit(spine_bone_pose obj);
SPINE_C_EXPORT void spine_bone_pose_set_inherit(spine_bone_pose obj, spine_inherit value);
SPINE_C_EXPORT spine_rtti spine_bone_pose_get_rtti(spine_bone_pose obj);
SPINE_C_EXPORT spine_rtti spine_bone_pose_get_rtti();
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_bone_timeline spine_bone_timeline_create(int32_t boneIndex) {
spine_bone_timeline spine_bone_timeline_create(int boneIndex) {
BoneTimeline *obj = new (__FILE__, __LINE__) BoneTimeline(boneIndex);
return (spine_bone_timeline) obj;
}
@ -42,19 +42,17 @@ void spine_bone_timeline_dispose(spine_bone_timeline obj) {
delete (BoneTimeline *) obj;
}
spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline obj) {
if (!obj) return nullptr;
BoneTimeline *_obj = (BoneTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bone_timeline_get_rtti() {
return (spine_rtti) &BoneTimeline::rtti;
}
int32_t spine_bone_timeline_get_bone_index(spine_bone_timeline obj) {
int spine_bone_timeline_get_bone_index(spine_bone_timeline obj) {
if (!obj) return 0;
BoneTimeline *_obj = (BoneTimeline *) obj;
return _obj->getBoneIndex();
}
void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int32_t value) {
void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int value) {
if (!obj) return;
BoneTimeline *_obj = (BoneTimeline *) obj;
_obj->setBoneIndex(value);

View File

@ -34,15 +34,13 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_bone_timeline)
SPINE_C_EXPORT spine_bone_timeline spine_bone_timeline_create(int32_t boneIndex);
SPINE_C_EXPORT spine_bone_timeline spine_bone_timeline_create(int boneIndex);
SPINE_C_EXPORT void spine_bone_timeline_dispose(spine_bone_timeline obj);
SPINE_C_EXPORT spine_rtti spine_bone_timeline_get_rtti(spine_bone_timeline obj);
SPINE_C_EXPORT int32_t spine_bone_timeline_get_bone_index(spine_bone_timeline obj);
SPINE_C_EXPORT void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int32_t value);
SPINE_C_EXPORT spine_rtti spine_bone_timeline_get_rtti();
SPINE_C_EXPORT int spine_bone_timeline_get_bone_index(spine_bone_timeline obj);
SPINE_C_EXPORT void spine_bone_timeline_set_bone_index(spine_bone_timeline obj, int value);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_bone_timeline1 spine_bone_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property) {
spine_bone_timeline1 spine_bone_timeline1_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property) {
BoneTimeline1 *obj = new (__FILE__, __LINE__) BoneTimeline1(frameCount, bezierCount, boneIndex, property);
return (spine_bone_timeline1) obj;
}
@ -42,19 +42,17 @@ void spine_bone_timeline1_dispose(spine_bone_timeline1 obj) {
delete (BoneTimeline1 *) obj;
}
spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 obj) {
if (!obj) return nullptr;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bone_timeline1_get_rtti() {
return (spine_rtti) &BoneTimeline1::rtti;
}
void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, spine_size_t frame, float time, float value) {
void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, size_t frame, float time, float value) {
if (!obj) return ;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
_obj->setFrame(frame, time, value);
@ -69,34 +67,34 @@ float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 obj, float time)
float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return _obj->getRelativeValue(time, alpha, blend, current, setup);
return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
float spine_bone_timeline1_get_absolute_value_6(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
if (!obj) return 0;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value);
}
float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) {
if (!obj) return 0;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return _obj->getScaleValue(time, alpha, blend, direction, current, setup);
return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup);
}
int32_t spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj) {
int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj) {
if (!obj) return 0;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
return _obj->getBoneIndex();
}
void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int32_t value) {
void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int value) {
if (!obj) return;
BoneTimeline1 *_obj = (BoneTimeline1 *) obj;
_obj->setBoneIndex(value);

View File

@ -34,22 +34,20 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_bone_timeline1)
SPINE_C_EXPORT spine_bone_timeline1 spine_bone_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property);
SPINE_C_EXPORT spine_bone_timeline1 spine_bone_timeline1_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property);
SPINE_C_EXPORT void spine_bone_timeline1_dispose(spine_bone_timeline1 obj);
SPINE_C_EXPORT spine_rtti spine_bone_timeline1_get_rtti(spine_bone_timeline1 obj);
SPINE_C_EXPORT void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, spine_size_t frame, float time, float value);
SPINE_C_EXPORT spine_rtti spine_bone_timeline1_get_rtti();
SPINE_C_EXPORT void spine_bone_timeline1_apply(spine_bone_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT void spine_bone_timeline1_set_frame(spine_bone_timeline1 obj, size_t frame, float time, float value);
SPINE_C_EXPORT float spine_bone_timeline1_get_curve_value(spine_bone_timeline1 obj, float time);
SPINE_C_EXPORT float spine_bone_timeline1_get_relative_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_bone_timeline1_get_absolute_value_6(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_bone_timeline1_get_scale_value(spine_bone_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup);
SPINE_C_EXPORT int32_t spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj);
SPINE_C_EXPORT void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int32_t value);
SPINE_C_EXPORT int spine_bone_timeline1_get_bone_index(spine_bone_timeline1 obj);
SPINE_C_EXPORT void spine_bone_timeline1_set_bone_index(spine_bone_timeline1 obj, int value);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_bone_timeline2 spine_bone_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property1, spine_property property2) {
spine_bone_timeline2 spine_bone_timeline2_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property1, spine_property property2) {
BoneTimeline2 *obj = new (__FILE__, __LINE__) BoneTimeline2(frameCount, bezierCount, boneIndex, property1, property2);
return (spine_bone_timeline2) obj;
}
@ -42,19 +42,17 @@ void spine_bone_timeline2_dispose(spine_bone_timeline2 obj) {
delete (BoneTimeline2 *) obj;
}
spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 obj) {
if (!obj) return nullptr;
BoneTimeline2 *_obj = (BoneTimeline2 *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bone_timeline2_get_rtti() {
return (spine_rtti) &BoneTimeline2::rtti;
}
void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
BoneTimeline2 *_obj = (BoneTimeline2 *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, spine_size_t frame, float time, float value1, float value2) {
void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, size_t frame, float time, float value1, float value2) {
if (!obj) return ;
BoneTimeline2 *_obj = (BoneTimeline2 *) obj;
_obj->setFrame(frame, time, value1, value2);
@ -66,13 +64,13 @@ float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 obj, float time)
return _obj->getCurveValue(time);
}
int32_t spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj) {
int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj) {
if (!obj) return 0;
BoneTimeline2 *_obj = (BoneTimeline2 *) obj;
return _obj->getBoneIndex();
}
void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int32_t value) {
void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int value) {
if (!obj) return;
BoneTimeline2 *_obj = (BoneTimeline2 *) obj;
_obj->setBoneIndex(value);

View File

@ -34,18 +34,16 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_bone_timeline2)
SPINE_C_EXPORT spine_bone_timeline2 spine_bone_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t boneIndex, spine_property property1, spine_property property2);
SPINE_C_EXPORT spine_bone_timeline2 spine_bone_timeline2_create(size_t frameCount, size_t bezierCount, int boneIndex, spine_property property1, spine_property property2);
SPINE_C_EXPORT void spine_bone_timeline2_dispose(spine_bone_timeline2 obj);
SPINE_C_EXPORT spine_rtti spine_bone_timeline2_get_rtti(spine_bone_timeline2 obj);
SPINE_C_EXPORT void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, spine_size_t frame, float time, float value1, float value2);
SPINE_C_EXPORT spine_rtti spine_bone_timeline2_get_rtti();
SPINE_C_EXPORT void spine_bone_timeline2_apply(spine_bone_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT void spine_bone_timeline2_set_frame(spine_bone_timeline2 obj, size_t frame, float time, float value1, float value2);
SPINE_C_EXPORT float spine_bone_timeline2_get_curve_value(spine_bone_timeline2 obj, float time);
SPINE_C_EXPORT int32_t spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj);
SPINE_C_EXPORT void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int32_t value);
SPINE_C_EXPORT int spine_bone_timeline2_get_bone_index(spine_bone_timeline2 obj);
SPINE_C_EXPORT void spine_bone_timeline2_set_bone_index(spine_bone_timeline2 obj, int value);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_bounding_box_attachment spine_bounding_box_attachment_create(const utf8 * name) {
spine_bounding_box_attachment spine_bounding_box_attachment_create(const char* name) {
BoundingBoxAttachment *obj = new (__FILE__, __LINE__) BoundingBoxAttachment(String(name));
return (spine_bounding_box_attachment) obj;
}
@ -42,70 +42,56 @@ void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment obj) {
delete (BoundingBoxAttachment *) obj;
}
spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_bounding_box_attachment_get_rtti() {
return (spine_rtti) &BoundingBoxAttachment::rtti;
}
spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (spine_color) &_obj->getColor();
}
spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_attachment) 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (spine_attachment) _obj->copy();
}
void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) {
void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) {
if (!obj) return ;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
_obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride);
_obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride);
}
void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) {
void spine_bounding_box_attachment_compute_world_vertices_7(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) {
if (!obj) return ;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
_obj->computeWorldVertices(skeleton, slot, start, count, (Vector<float> &) worldVertices, offset, stride);
_obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array<float> &) worldVertices, offset, stride);
}
int32_t spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj) {
int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj) {
if (!obj) return 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return _obj->getId();
}
int32_t * spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) {
if (!obj) return 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return _obj->getBones();
}
int32_t spine_bounding_box_attachment_get_num_bones(spine_bounding_box_attachment obj) {
if (!obj) return 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (int32_t) _obj->getBones().size();
}
int32_t *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) {
int *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (int32_t *) _obj->getBones().buffer();
return (int *) _obj->getBones().buffer();
}
void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, int32_t * value) {
void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, spine_array_int value) {
if (!obj) return;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
_obj->setBones((Vector<int> &) value);
}
void * spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return _obj->getVertices();
_obj->setBones((Array<int> &) value);
}
int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attachment obj) {
@ -114,32 +100,32 @@ int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attach
return (int32_t) _obj->getVertices().size();
}
spine_float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) {
float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (spine_float *) _obj->getVertices().buffer();
return (float *) _obj->getVertices().buffer();
}
void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, void * value) {
void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, spine_array_float value) {
if (!obj) return;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
_obj->setVertices((Vector<float> &) value);
_obj->setVertices((Array<float> &) value);
}
spine_size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj) {
if (!obj) return 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return _obj->getWorldVerticesLength();
}
void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, spine_size_t value) {
void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, size_t value) {
if (!obj) return;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
_obj->setWorldVerticesLength(value);
}
spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_attachment) 0;
BoundingBoxAttachment *_obj = (BoundingBoxAttachment *) obj;
return (spine_attachment) _obj->getTimelineAttachment();
}

View File

@ -34,28 +34,24 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_bounding_box_attachment)
SPINE_C_EXPORT spine_bounding_box_attachment spine_bounding_box_attachment_create(const utf8 * name);
SPINE_C_EXPORT spine_bounding_box_attachment spine_bounding_box_attachment_create(const char* name);
SPINE_C_EXPORT void spine_bounding_box_attachment_dispose(spine_bounding_box_attachment obj);
SPINE_C_EXPORT spine_rtti spine_bounding_box_attachment_get_rtti(spine_bounding_box_attachment obj);
SPINE_C_EXPORT spine_rtti spine_bounding_box_attachment_get_rtti();
SPINE_C_EXPORT spine_color spine_bounding_box_attachment_get_color(spine_bounding_box_attachment obj);
SPINE_C_EXPORT spine_attachment spine_bounding_box_attachment_copy(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride);
SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride);
SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj);
SPINE_C_EXPORT int32_t * spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride);
SPINE_C_EXPORT void spine_bounding_box_attachment_compute_world_vertices_7(spine_bounding_box_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride);
SPINE_C_EXPORT int spine_bounding_box_attachment_get_id(spine_bounding_box_attachment obj);
SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_num_bones(spine_bounding_box_attachment obj);
SPINE_C_EXPORT int32_t *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, int32_t * value);
SPINE_C_EXPORT void * spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj);
SPINE_C_EXPORT int *spine_bounding_box_attachment_get_bones(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_bones(spine_bounding_box_attachment obj, spine_array_int value);
SPINE_C_EXPORT int32_t spine_bounding_box_attachment_get_num_vertices(spine_bounding_box_attachment obj);
SPINE_C_EXPORT spine_float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, void * value);
SPINE_C_EXPORT spine_size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, spine_size_t value);
SPINE_C_EXPORT float *spine_bounding_box_attachment_get_vertices(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_vertices(spine_bounding_box_attachment obj, spine_array_float value);
SPINE_C_EXPORT size_t spine_bounding_box_attachment_get_world_vertices_length(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_world_vertices_length(spine_bounding_box_attachment obj, size_t value);
SPINE_C_EXPORT spine_attachment spine_bounding_box_attachment_get_timeline_attachment(spine_bounding_box_attachment obj);
SPINE_C_EXPORT void spine_bounding_box_attachment_set_timeline_attachment(spine_bounding_box_attachment obj, spine_attachment value);
SPINE_C_EXPORT void spine_bounding_box_attachment_copy_to(spine_bounding_box_attachment obj, spine_vertex_attachment other);

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_clipping_attachment spine_clipping_attachment_create(const utf8 * name) {
spine_clipping_attachment spine_clipping_attachment_create(const char* name) {
ClippingAttachment *obj = new (__FILE__, __LINE__) ClippingAttachment(String(name));
return (spine_clipping_attachment) obj;
}
@ -42,14 +42,12 @@ void spine_clipping_attachment_dispose(spine_clipping_attachment obj) {
delete (ClippingAttachment *) obj;
}
spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment obj) {
if (!obj) return nullptr;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_clipping_attachment_get_rtti() {
return (spine_rtti) &ClippingAttachment::rtti;
}
spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_slot_data) 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_slot_data) _obj->getEndSlot();
}
@ -61,63 +59,51 @@ void spine_clipping_attachment_set_end_slot(spine_clipping_attachment obj, spine
}
spine_color spine_clipping_attachment_get_color(spine_clipping_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_color) &_obj->getColor();
}
spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_attachment) 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_attachment) _obj->copy();
}
void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride) {
void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride) {
if (!obj) return ;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
_obj->computeWorldVertices(skeleton, slot, start, count, (float *) worldVertices, offset, stride);
_obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (float *) worldVertices, offset, stride);
}
void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride) {
void spine_clipping_attachment_compute_world_vertices_7(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride) {
if (!obj) return ;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
_obj->computeWorldVertices(skeleton, slot, start, count, (Vector<float> &) worldVertices, offset, stride);
_obj->computeWorldVertices(*(Skeleton*) skeleton, *(Slot*) slot, start, count, (Array<float> &) worldVertices, offset, stride);
}
int32_t spine_clipping_attachment_get_id(spine_clipping_attachment obj) {
int spine_clipping_attachment_get_id(spine_clipping_attachment obj) {
if (!obj) return 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return _obj->getId();
}
int32_t * spine_clipping_attachment_get_bones(spine_clipping_attachment obj) {
if (!obj) return 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return _obj->getBones();
}
int32_t spine_clipping_attachment_get_num_bones(spine_clipping_attachment obj) {
if (!obj) return 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (int32_t) _obj->getBones().size();
}
int32_t *spine_clipping_attachment_get_bones(spine_clipping_attachment obj) {
int *spine_clipping_attachment_get_bones(spine_clipping_attachment obj) {
if (!obj) return nullptr;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (int32_t *) _obj->getBones().buffer();
return (int *) _obj->getBones().buffer();
}
void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, int32_t * value) {
void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, spine_array_int value) {
if (!obj) return;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
_obj->setBones((Vector<int> &) value);
}
void * spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) {
if (!obj) return nullptr;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return _obj->getVertices();
_obj->setBones((Array<int> &) value);
}
int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj) {
@ -126,32 +112,32 @@ int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj
return (int32_t) _obj->getVertices().size();
}
spine_float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) {
float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj) {
if (!obj) return nullptr;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_float *) _obj->getVertices().buffer();
return (float *) _obj->getVertices().buffer();
}
void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, void * value) {
void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, spine_array_float value) {
if (!obj) return;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
_obj->setVertices((Vector<float> &) value);
_obj->setVertices((Array<float> &) value);
}
spine_size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj) {
if (!obj) return nullptr;
size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj) {
if (!obj) return 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return _obj->getWorldVerticesLength();
}
void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, spine_size_t value) {
void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, size_t value) {
if (!obj) return;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
_obj->setWorldVerticesLength(value);
}
spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment obj) {
if (!obj) return nullptr;
if (!obj) return (spine_attachment) 0;
ClippingAttachment *_obj = (ClippingAttachment *) obj;
return (spine_attachment) _obj->getTimelineAttachment();
}

View File

@ -34,30 +34,26 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_clipping_attachment)
SPINE_C_EXPORT spine_clipping_attachment spine_clipping_attachment_create(const utf8 * name);
SPINE_C_EXPORT spine_clipping_attachment spine_clipping_attachment_create(const char* name);
SPINE_C_EXPORT void spine_clipping_attachment_dispose(spine_clipping_attachment obj);
SPINE_C_EXPORT spine_rtti spine_clipping_attachment_get_rtti(spine_clipping_attachment obj);
SPINE_C_EXPORT spine_rtti spine_clipping_attachment_get_rtti();
SPINE_C_EXPORT spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_end_slot(spine_clipping_attachment obj, spine_slot_data value);
SPINE_C_EXPORT spine_color spine_clipping_attachment_get_color(spine_clipping_attachment obj);
SPINE_C_EXPORT spine_attachment spine_clipping_attachment_copy(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, spine_float worldVertices, spine_size_t offset, spine_size_t stride);
SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, spine_size_t start, spine_size_t count, void * worldVertices, spine_size_t offset, spine_size_t stride);
SPINE_C_EXPORT int32_t spine_clipping_attachment_get_id(spine_clipping_attachment obj);
SPINE_C_EXPORT int32_t * spine_clipping_attachment_get_bones(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, float * worldVertices, size_t offset, size_t stride);
SPINE_C_EXPORT void spine_clipping_attachment_compute_world_vertices_7(spine_clipping_attachment obj, spine_skeleton skeleton, spine_slot slot, size_t start, size_t count, spine_array_float worldVertices, size_t offset, size_t stride);
SPINE_C_EXPORT int spine_clipping_attachment_get_id(spine_clipping_attachment obj);
SPINE_C_EXPORT int32_t spine_clipping_attachment_get_num_bones(spine_clipping_attachment obj);
SPINE_C_EXPORT int32_t *spine_clipping_attachment_get_bones(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, int32_t * value);
SPINE_C_EXPORT void * spine_clipping_attachment_get_vertices(spine_clipping_attachment obj);
SPINE_C_EXPORT int *spine_clipping_attachment_get_bones(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_bones(spine_clipping_attachment obj, spine_array_int value);
SPINE_C_EXPORT int32_t spine_clipping_attachment_get_num_vertices(spine_clipping_attachment obj);
SPINE_C_EXPORT spine_float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, void * value);
SPINE_C_EXPORT spine_size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, spine_size_t value);
SPINE_C_EXPORT float *spine_clipping_attachment_get_vertices(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_vertices(spine_clipping_attachment obj, spine_array_float value);
SPINE_C_EXPORT size_t spine_clipping_attachment_get_world_vertices_length(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_world_vertices_length(spine_clipping_attachment obj, size_t value);
SPINE_C_EXPORT spine_attachment spine_clipping_attachment_get_timeline_attachment(spine_clipping_attachment obj);
SPINE_C_EXPORT void spine_clipping_attachment_set_timeline_attachment(spine_clipping_attachment obj, spine_attachment value);
SPINE_C_EXPORT void spine_clipping_attachment_copy_to(spine_clipping_attachment obj, spine_vertex_attachment other);

View File

@ -48,13 +48,13 @@ void spine_color_dispose(spine_color obj) {
}
spine_color spine_color_set(spine_color obj, float _r, float _g, float _b, float _a) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->set(_r, _g, _b, _a);
}
spine_color spine_color_set(spine_color obj, float _r, float _g, float _b) {
if (!obj) return nullptr;
spine_color spine_color_set_3(spine_color obj, float _r, float _g, float _b) {
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->set(_r, _g, _b);
}
@ -66,25 +66,25 @@ void spine_color_set(spine_color obj, spine_color value) {
}
spine_color spine_color_add(spine_color obj, float _r, float _g, float _b, float _a) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->add(_r, _g, _b, _a);
}
spine_color spine_color_add(spine_color obj, float _r, float _g, float _b) {
if (!obj) return nullptr;
spine_color spine_color_add_3(spine_color obj, float _r, float _g, float _b) {
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->add(_r, _g, _b);
}
spine_color spine_color_add(spine_color obj, spine_color other) {
if (!obj) return nullptr;
spine_color spine_color_add_1(spine_color obj, spine_color other) {
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->add(other);
return (spine_color) &_obj->add(*(Color*) other);
}
spine_color spine_color_clamp(spine_color obj) {
if (!obj) return nullptr;
if (!obj) return (spine_color) 0;
Color *_obj = (Color *) obj;
return (spine_color) &_obj->clamp();
}

View File

@ -34,19 +34,17 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_color)
#include "types.h"
SPINE_C_EXPORT spine_color spine_color_create(void);
SPINE_C_EXPORT spine_color spine_color_create_with_float_float_float_float(float r, float g, float b, float a);
SPINE_C_EXPORT void spine_color_dispose(spine_color obj);
SPINE_C_EXPORT spine_color spine_color_set(spine_color obj, float _r, float _g, float _b, float _a);
SPINE_C_EXPORT spine_color spine_color_set(spine_color obj, float _r, float _g, float _b);
SPINE_C_EXPORT spine_color spine_color_set_3(spine_color obj, float _r, float _g, float _b);
SPINE_C_EXPORT void spine_color_set(spine_color obj, spine_color value);
SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, float _r, float _g, float _b, float _a);
SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, float _r, float _g, float _b);
SPINE_C_EXPORT spine_color spine_color_add(spine_color obj, spine_color other);
SPINE_C_EXPORT spine_color spine_color_add_3(spine_color obj, float _r, float _g, float _b);
SPINE_C_EXPORT spine_color spine_color_add_1(spine_color obj, spine_color other);
SPINE_C_EXPORT spine_color spine_color_clamp(spine_color obj);
#ifdef __cplusplus

View File

@ -32,36 +32,29 @@
using namespace spine;
spine_constraint spine_constraint_create(void) {
Constraint *obj = new (__FILE__, __LINE__) Constraint();
return (spine_constraint) obj;
}
void spine_constraint_dispose(spine_constraint obj) {
if (!obj) return;
delete (Constraint *) obj;
}
spine_rtti spine_constraint_get_rtti(spine_constraint obj) {
if (!obj) return nullptr;
Constraint *_obj = (Constraint *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_constraint_get_rtti() {
return (spine_rtti) &Constraint::rtti;
}
spine_constraint_data spine_constraint_get_data(spine_constraint obj) {
if (!obj) return 0;
Constraint *_obj = (Constraint *) obj;
return _obj->getData();
return (spine_constraint_data) &_obj->getData();
}
void spine_constraint_sort(spine_constraint obj, spine_skeleton skeleton) {
if (!obj) return ;
Constraint *_obj = (Constraint *) obj;
_obj->sort(skeleton);
_obj->sort(*(Skeleton*) skeleton);
}
spine_bool spine_constraint_is_source_active(spine_constraint obj) {
if (!obj) return 0;
bool spine_constraint_is_source_active(spine_constraint obj) {
if (!obj) return false;
Constraint *_obj = (Constraint *) obj;
return _obj->isSourceActive();
}
@ -81,23 +74,5 @@ void spine_constraint_setup_pose(spine_constraint obj) {
void spine_constraint_update(spine_constraint obj, spine_skeleton skeleton, spine_physics physics) {
if (!obj) return ;
Constraint *_obj = (Constraint *) obj;
_obj->update(skeleton, physics);
}
spine_bool spine_constraint_is_type(spine_constraint obj, spine_constraint_type type) {
if (!obj) return 0;
Constraint *_obj = (Constraint *) obj;
switch (type) {
case SPINE_TYPE_CONSTRAINT_CONSTRAINT_GENERIC:
return _obj->getRTTI().instanceOf(ConstraintGeneric::rtti);
}
return 0;
}
spine_constraint_generic spine_constraint_as_constraint_generic(spine_constraint obj) {
if (!obj) return nullptr;
Constraint *_obj = (Constraint *) obj;
if (!_obj->getRTTI().instanceOf(ConstraintGeneric::rtti)) return nullptr;
return (spine_constraint_generic) obj;
_obj->update(*(Skeleton*) skeleton, (Physics) physics);
}

View File

@ -34,28 +34,16 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_constraint)
SPINE_C_EXPORT spine_constraint spine_constraint_create(void);
SPINE_C_EXPORT void spine_constraint_dispose(spine_constraint obj);
SPINE_C_EXPORT spine_rtti spine_constraint_get_rtti(spine_constraint obj);
SPINE_C_EXPORT spine_rtti spine_constraint_get_rtti();
SPINE_C_EXPORT spine_constraint_data spine_constraint_get_data(spine_constraint obj);
SPINE_C_EXPORT void spine_constraint_sort(spine_constraint obj, spine_skeleton skeleton);
SPINE_C_EXPORT spine_bool spine_constraint_is_source_active(spine_constraint obj);
SPINE_C_EXPORT bool spine_constraint_is_source_active(spine_constraint obj);
SPINE_C_EXPORT void spine_constraint_pose(spine_constraint obj);
SPINE_C_EXPORT void spine_constraint_setup_pose(spine_constraint obj);
SPINE_C_EXPORT void spine_constraint_update(spine_constraint obj, spine_skeleton skeleton, spine_physics physics);
struct spine_constraint_generic_wrapper;
typedef struct spine_constraint_generic_wrapper *spine_constraint_generic;
typedef enum spine_constraint_type {
SPINE_TYPE_CONSTRAINT_CONSTRAINT_GENERIC = 0
} spine_constraint_type;
SPINE_C_EXPORT spine_bool spine_constraint_is_type(spine_constraint obj, spine_constraint_type type);
SPINE_C_EXPORT spine_constraint_generic spine_constraint_as_constraint_generic(spine_constraint obj);
#ifdef __cplusplus
}

View File

@ -32,45 +32,29 @@
using namespace spine;
spine_constraint_data spine_constraint_data_create(const utf8 * name) {
ConstraintData *obj = new (__FILE__, __LINE__) ConstraintData(String(name));
return (spine_constraint_data) obj;
}
void spine_constraint_data_dispose(spine_constraint_data obj) {
if (!obj) return;
delete (ConstraintData *) obj;
}
spine_rtti spine_constraint_data_get_rtti(spine_constraint_data obj) {
if (!obj) return nullptr;
ConstraintData *_obj = (ConstraintData *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_constraint_data_get_rtti() {
return (spine_rtti) &ConstraintData::rtti;
}
spine_constraint spine_constraint_data_create(spine_constraint_data obj, spine_skeleton skeleton) {
if (!obj) return 0;
ConstraintData *_obj = (ConstraintData *) obj;
return (spine_constraint) _obj->create(skeleton);
return (spine_constraint) _obj->create(*(Skeleton*) skeleton);
}
const utf8 * spine_constraint_data_get_name(spine_constraint_data obj) {
const char* spine_constraint_data_get_name(spine_constraint_data obj) {
if (!obj) return nullptr;
ConstraintData *_obj = (ConstraintData *) obj;
return (const utf8 *) _obj->getName().buffer();
return (const char *) _obj->getName().buffer();
}
spine_bool spine_constraint_data_is_skin_required(spine_constraint_data obj) {
if (!obj) return 0;
bool spine_constraint_data_is_skin_required(spine_constraint_data obj) {
if (!obj) return false;
ConstraintData *_obj = (ConstraintData *) obj;
return _obj->isSkinRequired();
}
spine_bool spine_constraint_data_is_type(spine_constraint_data obj, spine_constraint_data_type type) {
if (!obj) return 0;
ConstraintData *_obj = (ConstraintData *) obj;
switch (type) {
}
return 0;
}

View File

@ -34,21 +34,13 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_constraint_data)
SPINE_C_EXPORT spine_constraint_data spine_constraint_data_create(const utf8 * name);
SPINE_C_EXPORT void spine_constraint_data_dispose(spine_constraint_data obj);
SPINE_C_EXPORT spine_rtti spine_constraint_data_get_rtti(spine_constraint_data obj);
SPINE_C_EXPORT spine_rtti spine_constraint_data_get_rtti();
SPINE_C_EXPORT spine_constraint spine_constraint_data_create(spine_constraint_data obj, spine_skeleton skeleton);
SPINE_C_EXPORT const utf8 * spine_constraint_data_get_name(spine_constraint_data obj);
SPINE_C_EXPORT spine_bool spine_constraint_data_is_skin_required(spine_constraint_data obj);
typedef enum spine_constraint_data_type {
} spine_constraint_data_type;
SPINE_C_EXPORT spine_bool spine_constraint_data_is_type(spine_constraint_data obj, spine_constraint_data_type type);
SPINE_C_EXPORT const char* spine_constraint_data_get_name(spine_constraint_data obj);
SPINE_C_EXPORT bool spine_constraint_data_is_skin_required(spine_constraint_data obj);
#ifdef __cplusplus
}

View File

@ -1,79 +0,0 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include "constraint_data_generic.h"
#include <spine/spine.h>
using namespace spine;
spine_constraint_data_generic spine_constraint_data_generic_create(const utf8 * name) {
ConstraintDataGeneric *obj = new (__FILE__, __LINE__) ConstraintDataGeneric(String(name));
return (spine_constraint_data_generic) obj;
}
void spine_constraint_data_generic_dispose(spine_constraint_data_generic obj) {
if (!obj) return;
delete (ConstraintDataGeneric *) obj;
}
spine_constraint spine_constraint_data_generic_create(spine_constraint_data_generic obj, spine_skeleton skeleton) {
if (!obj) return 0;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return (spine_constraint) _obj->create(skeleton);
}
const utf8 * spine_constraint_data_generic_get_name(spine_constraint_data_generic obj) {
if (!obj) return nullptr;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return (const utf8 *) _obj->getName().buffer();
}
spine_bool spine_constraint_data_generic_is_skin_required(spine_constraint_data_generic obj) {
if (!obj) return 0;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return _obj->isSkinRequired();
}
spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj) {
if (!obj) return nullptr;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return _obj->getSetupPose();
}
spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj) {
if (!obj) return nullptr;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return _obj->getSetupPose();
}
spine_rtti spine_constraint_data_generic_get_rtti(spine_constraint_data_generic obj) {
if (!obj) return nullptr;
ConstraintDataGeneric *_obj = (ConstraintDataGeneric *) obj;
return (spine_rtti) &_obj->getRTTI();
}

View File

@ -1,54 +0,0 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef SPINE_C_CONSTRAINTDATAGENERIC_H
#define SPINE_C_CONSTRAINTDATAGENERIC_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_constraint_data_generic)
SPINE_C_EXPORT spine_constraint_data_generic spine_constraint_data_generic_create(const utf8 * name);
SPINE_C_EXPORT void spine_constraint_data_generic_dispose(spine_constraint_data_generic obj);
SPINE_C_EXPORT spine_constraint spine_constraint_data_generic_create(spine_constraint_data_generic obj, spine_skeleton skeleton);
SPINE_C_EXPORT const utf8 * spine_constraint_data_generic_get_name(spine_constraint_data_generic obj);
SPINE_C_EXPORT spine_bool spine_constraint_data_generic_is_skin_required(spine_constraint_data_generic obj);
SPINE_C_EXPORT spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj);
SPINE_C_EXPORT spine_p spine_constraint_data_generic_get_setup_pose(spine_constraint_data_generic obj);
SPINE_C_EXPORT spine_rtti spine_constraint_data_generic_get_rtti(spine_constraint_data_generic obj);
#ifdef __cplusplus
}
#endif
#endif // SPINE_C_CONSTRAINTDATAGENERIC_H

View File

@ -1,127 +0,0 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include "constraint_generic.h"
#include <spine/spine.h>
using namespace spine;
spine_constraint_generic spine_constraint_generic_create(spine_d data) {
ConstraintGeneric *obj = new (__FILE__, __LINE__) ConstraintGeneric(data);
return (spine_constraint_generic) obj;
}
void spine_constraint_generic_dispose(spine_constraint_generic obj) {
if (!obj) return;
delete (ConstraintGeneric *) obj;
}
spine_constraint_data spine_constraint_generic_get_data(spine_constraint_generic obj) {
if (!obj) return 0;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->getData();
}
void spine_constraint_generic_pose(spine_constraint_generic obj) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->pose();
}
void spine_constraint_generic_setup_pose(spine_constraint_generic obj) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->setupPose();
}
spine_p spine_constraint_generic_get_pose(spine_constraint_generic obj) {
if (!obj) return nullptr;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->getPose();
}
spine_p spine_constraint_generic_get_applied_pose(spine_constraint_generic obj) {
if (!obj) return nullptr;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->getAppliedPose();
}
void spine_constraint_generic_reset_constrained(spine_constraint_generic obj) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->resetConstrained();
}
void spine_constraint_generic_constrained(spine_constraint_generic obj) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->constrained();
}
spine_bool spine_constraint_generic_is_pose_equal_to_applied(spine_constraint_generic obj) {
if (!obj) return 0;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->isPoseEqualToApplied();
}
spine_bool spine_constraint_generic_is_active(spine_constraint_generic obj) {
if (!obj) return 0;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->isActive();
}
void spine_constraint_generic_set_active(spine_constraint_generic obj, spine_bool value) {
if (!obj) return;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->setActive(value);
}
spine_rtti spine_constraint_generic_get_rtti(spine_constraint_generic obj) {
if (!obj) return nullptr;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return (spine_rtti) &_obj->getRTTI();
}
void spine_constraint_generic_sort(spine_constraint_generic obj, spine_skeleton skeleton) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->sort(skeleton);
}
spine_bool spine_constraint_generic_is_source_active(spine_constraint_generic obj) {
if (!obj) return 0;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
return _obj->isSourceActive();
}
void spine_constraint_generic_update(spine_constraint_generic obj, spine_skeleton skeleton, spine_physics physics) {
if (!obj) return ;
ConstraintGeneric *_obj = (ConstraintGeneric *) obj;
_obj->update(skeleton, physics);
}

View File

@ -1,62 +0,0 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated April 5, 2025. Replaces all prior versions.
*
* Copyright (c) 2013-2025, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef SPINE_C_CONSTRAINTGENERIC_H
#define SPINE_C_CONSTRAINTGENERIC_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_constraint_generic)
SPINE_C_EXPORT spine_constraint_generic spine_constraint_generic_create(spine_d data);
SPINE_C_EXPORT void spine_constraint_generic_dispose(spine_constraint_generic obj);
SPINE_C_EXPORT spine_constraint_data spine_constraint_generic_get_data(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_pose(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_setup_pose(spine_constraint_generic obj);
SPINE_C_EXPORT spine_p spine_constraint_generic_get_pose(spine_constraint_generic obj);
SPINE_C_EXPORT spine_p spine_constraint_generic_get_applied_pose(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_reset_constrained(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_constrained(spine_constraint_generic obj);
SPINE_C_EXPORT spine_bool spine_constraint_generic_is_pose_equal_to_applied(spine_constraint_generic obj);
SPINE_C_EXPORT spine_bool spine_constraint_generic_is_active(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_set_active(spine_constraint_generic obj, spine_bool value);
SPINE_C_EXPORT spine_rtti spine_constraint_generic_get_rtti(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_sort(spine_constraint_generic obj, spine_skeleton skeleton);
SPINE_C_EXPORT spine_bool spine_constraint_generic_is_source_active(spine_constraint_generic obj);
SPINE_C_EXPORT void spine_constraint_generic_update(spine_constraint_generic obj, spine_skeleton skeleton, spine_physics physics);
#ifdef __cplusplus
}
#endif
#endif // SPINE_C_CONSTRAINTGENERIC_H

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_constraint_timeline spine_constraint_timeline_create(int32_t constraintIndex) {
spine_constraint_timeline spine_constraint_timeline_create(int constraintIndex) {
ConstraintTimeline *obj = new (__FILE__, __LINE__) ConstraintTimeline(constraintIndex);
return (spine_constraint_timeline) obj;
}
@ -42,19 +42,17 @@ void spine_constraint_timeline_dispose(spine_constraint_timeline obj) {
delete (ConstraintTimeline *) obj;
}
spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline obj) {
if (!obj) return nullptr;
ConstraintTimeline *_obj = (ConstraintTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_constraint_timeline_get_rtti() {
return (spine_rtti) &ConstraintTimeline::rtti;
}
int32_t spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj) {
int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj) {
if (!obj) return 0;
ConstraintTimeline *_obj = (ConstraintTimeline *) obj;
return _obj->getConstraintIndex();
}
void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int32_t value) {
void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int value) {
if (!obj) return;
ConstraintTimeline *_obj = (ConstraintTimeline *) obj;
_obj->setConstraintIndex(value);

View File

@ -34,15 +34,13 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_constraint_timeline)
SPINE_C_EXPORT spine_constraint_timeline spine_constraint_timeline_create(int32_t constraintIndex);
SPINE_C_EXPORT spine_constraint_timeline spine_constraint_timeline_create(int constraintIndex);
SPINE_C_EXPORT void spine_constraint_timeline_dispose(spine_constraint_timeline obj);
SPINE_C_EXPORT spine_rtti spine_constraint_timeline_get_rtti(spine_constraint_timeline obj);
SPINE_C_EXPORT int32_t spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj);
SPINE_C_EXPORT void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int32_t value);
SPINE_C_EXPORT spine_rtti spine_constraint_timeline_get_rtti();
SPINE_C_EXPORT int spine_constraint_timeline_get_constraint_index(spine_constraint_timeline obj);
SPINE_C_EXPORT void spine_constraint_timeline_set_constraint_index(spine_constraint_timeline obj, int value);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_constraint_timeline1 spine_constraint_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property) {
spine_constraint_timeline1 spine_constraint_timeline1_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property) {
ConstraintTimeline1 *obj = new (__FILE__, __LINE__) ConstraintTimeline1(frameCount, bezierCount, constraintIndex, property);
return (spine_constraint_timeline1) obj;
}
@ -42,13 +42,11 @@ void spine_constraint_timeline1_dispose(spine_constraint_timeline1 obj) {
delete (ConstraintTimeline1 *) obj;
}
spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 obj) {
if (!obj) return nullptr;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_constraint_timeline1_get_rtti() {
return (spine_rtti) &ConstraintTimeline1::rtti;
}
void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, spine_size_t frame, float time, float value) {
void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, size_t frame, float time, float value) {
if (!obj) return ;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
_obj->setFrame(frame, time, value);
@ -63,34 +61,34 @@ float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 obj,
float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return _obj->getRelativeValue(time, alpha, blend, current, setup);
return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
float spine_constraint_timeline1_get_absolute_value_6(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
if (!obj) return 0;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value);
}
float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) {
if (!obj) return 0;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return _obj->getScaleValue(time, alpha, blend, direction, current, setup);
return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup);
}
int32_t spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj) {
int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj) {
if (!obj) return 0;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
return _obj->getConstraintIndex();
}
void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int32_t value) {
void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int value) {
if (!obj) return;
ConstraintTimeline1 *_obj = (ConstraintTimeline1 *) obj;
_obj->setConstraintIndex(value);

View File

@ -34,21 +34,19 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_constraint_timeline1)
SPINE_C_EXPORT spine_constraint_timeline1 spine_constraint_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t constraintIndex, spine_property property);
SPINE_C_EXPORT spine_constraint_timeline1 spine_constraint_timeline1_create(size_t frameCount, size_t bezierCount, int constraintIndex, spine_property property);
SPINE_C_EXPORT void spine_constraint_timeline1_dispose(spine_constraint_timeline1 obj);
SPINE_C_EXPORT spine_rtti spine_constraint_timeline1_get_rtti(spine_constraint_timeline1 obj);
SPINE_C_EXPORT void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, spine_size_t frame, float time, float value);
SPINE_C_EXPORT spine_rtti spine_constraint_timeline1_get_rtti();
SPINE_C_EXPORT void spine_constraint_timeline1_set_frame(spine_constraint_timeline1 obj, size_t frame, float time, float value);
SPINE_C_EXPORT float spine_constraint_timeline1_get_curve_value(spine_constraint_timeline1 obj, float time);
SPINE_C_EXPORT float spine_constraint_timeline1_get_relative_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_constraint_timeline1_get_absolute_value_6(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_constraint_timeline1_get_scale_value(spine_constraint_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup);
SPINE_C_EXPORT int32_t spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj);
SPINE_C_EXPORT void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int32_t value);
SPINE_C_EXPORT int spine_constraint_timeline1_get_constraint_index(spine_constraint_timeline1 obj);
SPINE_C_EXPORT void spine_constraint_timeline1_set_constraint_index(spine_constraint_timeline1 obj, int value);
#ifdef __cplusplus
}

View File

@ -32,98 +32,79 @@
using namespace spine;
spine_curve_timeline spine_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount) {
CurveTimeline *obj = new (__FILE__, __LINE__) CurveTimeline(frameCount, frameEntries, bezierCount);
return (spine_curve_timeline) obj;
}
void spine_curve_timeline_dispose(spine_curve_timeline obj) {
if (!obj) return;
delete (CurveTimeline *) obj;
}
spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_curve_timeline_get_rtti() {
return (spine_rtti) &CurveTimeline::rtti;
}
void spine_curve_timeline_set_linear(spine_curve_timeline obj, spine_size_t value) {
void spine_curve_timeline_set_linear(spine_curve_timeline obj, size_t value) {
if (!obj) return;
CurveTimeline *_obj = (CurveTimeline *) obj;
_obj->setLinear(value);
}
void spine_curve_timeline_set_stepped(spine_curve_timeline obj, spine_size_t value) {
void spine_curve_timeline_set_stepped(spine_curve_timeline obj, size_t value) {
if (!obj) return;
CurveTimeline *_obj = (CurveTimeline *) obj;
_obj->setStepped(value);
}
void spine_curve_timeline_set_bezier(spine_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
void spine_curve_timeline_set_bezier(spine_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
if (!obj) return ;
CurveTimeline *_obj = (CurveTimeline *) obj;
_obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);
}
float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) {
float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getBezierValue(time, frame, valueOffset, i);
}
void * spine_curve_timeline_get_curves(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getCurves();
}
int32_t spine_curve_timeline_get_num_curves(spine_curve_timeline obj) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (int32_t) _obj->getCurves().size();
}
spine_float *spine_curve_timeline_get_curves(spine_curve_timeline obj) {
float *spine_curve_timeline_get_curves(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (spine_float *) _obj->getCurves().buffer();
return (float *) _obj->getCurves().buffer();
}
void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
CurveTimeline *_obj = (CurveTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
spine_size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getFrameEntries();
}
spine_size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getFrameCount();
}
void * spine_curve_timeline_get_frames(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getFrames();
}
int32_t spine_curve_timeline_get_num_frames(spine_curve_timeline obj) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_curve_timeline_get_frames(spine_curve_timeline obj) {
float *spine_curve_timeline_get_frames(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_curve_timeline_get_duration(spine_curve_timeline obj) {
@ -132,20 +113,14 @@ float spine_curve_timeline_get_duration(spine_curve_timeline obj) {
return _obj->getDuration();
}
void * spine_curve_timeline_get_property_ids(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return _obj->getPropertyIds();
}
int32_t spine_curve_timeline_get_num_property_ids(spine_curve_timeline obj) {
if (!obj) return 0;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_curve_timeline_get_property_ids(spine_curve_timeline obj) {
int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj) {
if (!obj) return nullptr;
CurveTimeline *_obj = (CurveTimeline *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}

View File

@ -34,30 +34,24 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_curve_timeline)
SPINE_C_EXPORT spine_curve_timeline spine_curve_timeline_create(spine_size_t frameCount, spine_size_t frameEntries, spine_size_t bezierCount);
SPINE_C_EXPORT void spine_curve_timeline_dispose(spine_curve_timeline obj);
SPINE_C_EXPORT spine_rtti spine_curve_timeline_get_rtti(spine_curve_timeline obj);
SPINE_C_EXPORT void spine_curve_timeline_set_linear(spine_curve_timeline obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline_set_stepped(spine_curve_timeline obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline_set_bezier(spine_curve_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i);
SPINE_C_EXPORT void * spine_curve_timeline_get_curves(spine_curve_timeline obj);
SPINE_C_EXPORT spine_rtti spine_curve_timeline_get_rtti();
SPINE_C_EXPORT void spine_curve_timeline_set_linear(spine_curve_timeline obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline_set_stepped(spine_curve_timeline obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline_set_bezier(spine_curve_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline_get_bezier_value(spine_curve_timeline obj, float time, size_t frame, size_t valueOffset, size_t i);
SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_curves(spine_curve_timeline obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline_get_curves(spine_curve_timeline obj);
SPINE_C_EXPORT void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT spine_size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj);
SPINE_C_EXPORT spine_size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj);
SPINE_C_EXPORT void * spine_curve_timeline_get_frames(spine_curve_timeline obj);
SPINE_C_EXPORT float *spine_curve_timeline_get_curves(spine_curve_timeline obj);
SPINE_C_EXPORT void spine_curve_timeline_apply(spine_curve_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT size_t spine_curve_timeline_get_frame_entries(spine_curve_timeline obj);
SPINE_C_EXPORT size_t spine_curve_timeline_get_frame_count(spine_curve_timeline obj);
SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_frames(spine_curve_timeline obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline_get_frames(spine_curve_timeline obj);
SPINE_C_EXPORT float *spine_curve_timeline_get_frames(spine_curve_timeline obj);
SPINE_C_EXPORT float spine_curve_timeline_get_duration(spine_curve_timeline obj);
SPINE_C_EXPORT void * spine_curve_timeline_get_property_ids(spine_curve_timeline obj);
SPINE_C_EXPORT int32_t spine_curve_timeline_get_num_property_ids(spine_curve_timeline obj);
SPINE_C_EXPORT spine_property_id *spine_curve_timeline_get_property_ids(spine_curve_timeline obj);
SPINE_C_EXPORT int64_t *spine_curve_timeline_get_property_ids(spine_curve_timeline obj);
#ifdef __cplusplus
}

View File

@ -32,23 +32,16 @@
using namespace spine;
spine_curve_timeline1 spine_curve_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount) {
CurveTimeline1 *obj = new (__FILE__, __LINE__) CurveTimeline1(frameCount, bezierCount);
return (spine_curve_timeline1) obj;
}
void spine_curve_timeline1_dispose(spine_curve_timeline1 obj) {
if (!obj) return;
delete (CurveTimeline1 *) obj;
}
spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_curve_timeline1_get_rtti() {
return (spine_rtti) &CurveTimeline1::rtti;
}
void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, spine_size_t frame, float time, float value) {
void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, size_t frame, float time, float value) {
if (!obj) return ;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
_obj->setFrame(frame, time, value);
@ -63,103 +56,91 @@ float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 obj, float tim
float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getRelativeValue(time, alpha, blend, current, setup);
return _obj->getRelativeValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup);
}
float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
float spine_curve_timeline1_get_absolute_value_6(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getAbsoluteValue(time, alpha, blend, current, setup, value);
return _obj->getAbsoluteValue(time, alpha, (MixBlend) blend, current, setup, value);
}
float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getScaleValue(time, alpha, blend, direction, current, setup);
return _obj->getScaleValue(time, alpha, (MixBlend) blend, (MixDirection) direction, current, setup);
}
void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, spine_size_t value) {
void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, size_t value) {
if (!obj) return;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
_obj->setLinear(value);
}
void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, spine_size_t value) {
void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, size_t value) {
if (!obj) return;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
_obj->setStepped(value);
}
void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
if (!obj) return ;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
_obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);
}
float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) {
float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, size_t frame, size_t valueOffset, size_t i) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getBezierValue(time, frame, valueOffset, i);
}
void * spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getCurves();
}
int32_t spine_curve_timeline1_get_num_curves(spine_curve_timeline1 obj) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (int32_t) _obj->getCurves().size();
}
spine_float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) {
float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (spine_float *) _obj->getCurves().buffer();
return (float *) _obj->getCurves().buffer();
}
void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
spine_size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getFrameEntries();
}
spine_size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getFrameCount();
}
void * spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getFrames();
}
int32_t spine_curve_timeline1_get_num_frames(spine_curve_timeline1 obj) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) {
float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj) {
@ -168,20 +149,14 @@ float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj) {
return _obj->getDuration();
}
void * spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return _obj->getPropertyIds();
}
int32_t spine_curve_timeline1_get_num_property_ids(spine_curve_timeline1 obj) {
if (!obj) return 0;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) {
int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj) {
if (!obj) return nullptr;
CurveTimeline1 *_obj = (CurveTimeline1 *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}

View File

@ -34,36 +34,30 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_curve_timeline1)
SPINE_C_EXPORT spine_curve_timeline1 spine_curve_timeline1_create(spine_size_t frameCount, spine_size_t bezierCount);
SPINE_C_EXPORT void spine_curve_timeline1_dispose(spine_curve_timeline1 obj);
SPINE_C_EXPORT spine_rtti spine_curve_timeline1_get_rtti(spine_curve_timeline1 obj);
SPINE_C_EXPORT void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, spine_size_t frame, float time, float value);
SPINE_C_EXPORT spine_rtti spine_curve_timeline1_get_rtti();
SPINE_C_EXPORT void spine_curve_timeline1_set_frame(spine_curve_timeline1 obj, size_t frame, float time, float value);
SPINE_C_EXPORT float spine_curve_timeline1_get_curve_value(spine_curve_timeline1 obj, float time);
SPINE_C_EXPORT float spine_curve_timeline1_get_relative_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup);
SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_curve_timeline1_get_absolute_value_6(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, float current, float setup, float value);
SPINE_C_EXPORT float spine_curve_timeline1_get_scale_value(spine_curve_timeline1 obj, float time, float alpha, spine_mix_blend blend, spine_mix_direction direction, float current, float setup);
SPINE_C_EXPORT void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i);
SPINE_C_EXPORT void * spine_curve_timeline1_get_curves(spine_curve_timeline1 obj);
SPINE_C_EXPORT void spine_curve_timeline1_set_linear(spine_curve_timeline1 obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline1_set_stepped(spine_curve_timeline1 obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline1_set_bezier(spine_curve_timeline1 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline1_get_bezier_value(spine_curve_timeline1 obj, float time, size_t frame, size_t valueOffset, size_t i);
SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_curves(spine_curve_timeline1 obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj);
SPINE_C_EXPORT void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT spine_size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj);
SPINE_C_EXPORT spine_size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj);
SPINE_C_EXPORT void * spine_curve_timeline1_get_frames(spine_curve_timeline1 obj);
SPINE_C_EXPORT float *spine_curve_timeline1_get_curves(spine_curve_timeline1 obj);
SPINE_C_EXPORT void spine_curve_timeline1_apply(spine_curve_timeline1 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT size_t spine_curve_timeline1_get_frame_entries(spine_curve_timeline1 obj);
SPINE_C_EXPORT size_t spine_curve_timeline1_get_frame_count(spine_curve_timeline1 obj);
SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_frames(spine_curve_timeline1 obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj);
SPINE_C_EXPORT float *spine_curve_timeline1_get_frames(spine_curve_timeline1 obj);
SPINE_C_EXPORT float spine_curve_timeline1_get_duration(spine_curve_timeline1 obj);
SPINE_C_EXPORT void * spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj);
SPINE_C_EXPORT int32_t spine_curve_timeline1_get_num_property_ids(spine_curve_timeline1 obj);
SPINE_C_EXPORT spine_property_id *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj);
SPINE_C_EXPORT int64_t *spine_curve_timeline1_get_property_ids(spine_curve_timeline1 obj);
#ifdef __cplusplus
}

View File

@ -32,23 +32,16 @@
using namespace spine;
spine_curve_timeline2 spine_curve_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount) {
CurveTimeline2 *obj = new (__FILE__, __LINE__) CurveTimeline2(frameCount, bezierCount);
return (spine_curve_timeline2) obj;
}
void spine_curve_timeline2_dispose(spine_curve_timeline2 obj) {
if (!obj) return;
delete (CurveTimeline2 *) obj;
}
spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_curve_timeline2_get_rtti() {
return (spine_rtti) &CurveTimeline2::rtti;
}
void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, spine_size_t frame, float time, float value1, float value2) {
void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, size_t frame, float time, float value1, float value2) {
if (!obj) return ;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
_obj->setFrame(frame, time, value1, value2);
@ -60,82 +53,70 @@ float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 obj, float tim
return _obj->getCurveValue(time);
}
void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, spine_size_t value) {
void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, size_t value) {
if (!obj) return;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
_obj->setLinear(value);
}
void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, spine_size_t value) {
void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, size_t value) {
if (!obj) return;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
_obj->setStepped(value);
}
void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
if (!obj) return ;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
_obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);
}
float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i) {
float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, size_t frame, size_t valueOffset, size_t i) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getBezierValue(time, frame, valueOffset, i);
}
void * spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getCurves();
}
int32_t spine_curve_timeline2_get_num_curves(spine_curve_timeline2 obj) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (int32_t) _obj->getCurves().size();
}
spine_float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) {
float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (spine_float *) _obj->getCurves().buffer();
return (float *) _obj->getCurves().buffer();
}
void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
spine_size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getFrameEntries();
}
spine_size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getFrameCount();
}
void * spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getFrames();
}
int32_t spine_curve_timeline2_get_num_frames(spine_curve_timeline2 obj) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) {
float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj) {
@ -144,20 +125,14 @@ float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj) {
return _obj->getDuration();
}
void * spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return _obj->getPropertyIds();
}
int32_t spine_curve_timeline2_get_num_property_ids(spine_curve_timeline2 obj) {
if (!obj) return 0;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) {
int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj) {
if (!obj) return nullptr;
CurveTimeline2 *_obj = (CurveTimeline2 *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}

View File

@ -34,32 +34,26 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_curve_timeline2)
SPINE_C_EXPORT spine_curve_timeline2 spine_curve_timeline2_create(spine_size_t frameCount, spine_size_t bezierCount);
SPINE_C_EXPORT void spine_curve_timeline2_dispose(spine_curve_timeline2 obj);
SPINE_C_EXPORT spine_rtti spine_curve_timeline2_get_rtti(spine_curve_timeline2 obj);
SPINE_C_EXPORT void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, spine_size_t frame, float time, float value1, float value2);
SPINE_C_EXPORT spine_rtti spine_curve_timeline2_get_rtti();
SPINE_C_EXPORT void spine_curve_timeline2_set_frame(spine_curve_timeline2 obj, size_t frame, float time, float value1, float value2);
SPINE_C_EXPORT float spine_curve_timeline2_get_curve_value(spine_curve_timeline2 obj, float time);
SPINE_C_EXPORT void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, spine_size_t value);
SPINE_C_EXPORT void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, spine_size_t frame, spine_size_t valueOffset, spine_size_t i);
SPINE_C_EXPORT void * spine_curve_timeline2_get_curves(spine_curve_timeline2 obj);
SPINE_C_EXPORT void spine_curve_timeline2_set_linear(spine_curve_timeline2 obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline2_set_stepped(spine_curve_timeline2 obj, size_t value);
SPINE_C_EXPORT void spine_curve_timeline2_set_bezier(spine_curve_timeline2 obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_curve_timeline2_get_bezier_value(spine_curve_timeline2 obj, float time, size_t frame, size_t valueOffset, size_t i);
SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_curves(spine_curve_timeline2 obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj);
SPINE_C_EXPORT void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT spine_size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj);
SPINE_C_EXPORT spine_size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj);
SPINE_C_EXPORT void * spine_curve_timeline2_get_frames(spine_curve_timeline2 obj);
SPINE_C_EXPORT float *spine_curve_timeline2_get_curves(spine_curve_timeline2 obj);
SPINE_C_EXPORT void spine_curve_timeline2_apply(spine_curve_timeline2 obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT size_t spine_curve_timeline2_get_frame_entries(spine_curve_timeline2 obj);
SPINE_C_EXPORT size_t spine_curve_timeline2_get_frame_count(spine_curve_timeline2 obj);
SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_frames(spine_curve_timeline2 obj);
SPINE_C_EXPORT spine_float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj);
SPINE_C_EXPORT float *spine_curve_timeline2_get_frames(spine_curve_timeline2 obj);
SPINE_C_EXPORT float spine_curve_timeline2_get_duration(spine_curve_timeline2 obj);
SPINE_C_EXPORT void * spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj);
SPINE_C_EXPORT int32_t spine_curve_timeline2_get_num_property_ids(spine_curve_timeline2 obj);
SPINE_C_EXPORT spine_property_id *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj);
SPINE_C_EXPORT int64_t *spine_curve_timeline2_get_property_ids(spine_curve_timeline2 obj);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_deform_timeline spine_deform_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex, spine_vertex_attachment attachment) {
spine_deform_timeline spine_deform_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex, spine_vertex_attachment attachment) {
DeformTimeline *obj = new (__FILE__, __LINE__) DeformTimeline(frameCount, bezierCount, slotIndex, (VertexAttachment *) attachment);
return (spine_deform_timeline) obj;
}
@ -42,22 +42,14 @@ void spine_deform_timeline_dispose(spine_deform_timeline obj) {
delete (DeformTimeline *) obj;
}
spine_rtti spine_deform_timeline_get_rtti(spine_deform_timeline obj) {
if (!obj) return nullptr;
DeformTimeline *_obj = (DeformTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_deform_timeline_get_rtti() {
return (spine_rtti) &DeformTimeline::rtti;
}
void spine_deform_timeline_set_frame(spine_deform_timeline obj, int32_t frameIndex, float time, void * vertices) {
void spine_deform_timeline_set_frame(spine_deform_timeline obj, int frameIndex, float time, spine_array_float vertices) {
if (!obj) return ;
DeformTimeline *_obj = (DeformTimeline *) obj;
_obj->setFrame(frameIndex, time, (Vector<float> &) vertices);
}
void * spine_deform_timeline_get_vertices(spine_deform_timeline obj) {
if (!obj) return nullptr;
DeformTimeline *_obj = (DeformTimeline *) obj;
return _obj->getVertices();
_obj->setFrame(frameIndex, time, (Array<float> &) vertices);
}
int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj) {
@ -66,14 +58,14 @@ int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj) {
return (int32_t) _obj->getVertices().size();
}
spine_vector<float *spine_deform_timeline_get_vertices(spine_deform_timeline obj) {
spine_array<float *spine_deform_timeline_get_vertices(spine_deform_timeline obj) {
if (!obj) return nullptr;
DeformTimeline *_obj = (DeformTimeline *) obj;
return (spine_vector<float *) _obj->getVertices().buffer();
return (spine_array<float *) _obj->getVertices().buffer();
}
spine_vertex_attachment spine_deform_timeline_get_attachment(spine_deform_timeline obj) {
if (!obj) return nullptr;
if (!obj) return (spine_vertex_attachment) 0;
DeformTimeline *_obj = (DeformTimeline *) obj;
return (spine_vertex_attachment) _obj->getAttachment();
}
@ -84,26 +76,26 @@ void spine_deform_timeline_set_attachment(spine_deform_timeline obj, spine_verte
_obj->setAttachment((VertexAttachment *) value);
}
void spine_deform_timeline_set_bezier(spine_deform_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
void spine_deform_timeline_set_bezier(spine_deform_timeline obj, size_t bezier, size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2) {
if (!obj) return ;
DeformTimeline *_obj = (DeformTimeline *) obj;
_obj->setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);
}
float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int32_t frame) {
float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int frame) {
if (!obj) return 0;
DeformTimeline *_obj = (DeformTimeline *) obj;
return _obj->getCurvePercent(time, frame);
}
spine_size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj) {
if (!obj) return nullptr;
size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj) {
if (!obj) return 0;
DeformTimeline *_obj = (DeformTimeline *) obj;
return _obj->getFrameCount();
}
void spine_deform_timeline_apply(spine_deform_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_deform_timeline_apply(spine_deform_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
DeformTimeline *_obj = (DeformTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}

View File

@ -34,23 +34,20 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_deform_timeline)
SPINE_C_EXPORT spine_deform_timeline spine_deform_timeline_create(spine_size_t frameCount, spine_size_t bezierCount, int32_t slotIndex, spine_vertex_attachment attachment);
SPINE_C_EXPORT spine_deform_timeline spine_deform_timeline_create(size_t frameCount, size_t bezierCount, int slotIndex, spine_vertex_attachment attachment);
SPINE_C_EXPORT void spine_deform_timeline_dispose(spine_deform_timeline obj);
SPINE_C_EXPORT spine_rtti spine_deform_timeline_get_rtti(spine_deform_timeline obj);
SPINE_C_EXPORT void spine_deform_timeline_set_frame(spine_deform_timeline obj, int32_t frameIndex, float time, void * vertices);
SPINE_C_EXPORT void * spine_deform_timeline_get_vertices(spine_deform_timeline obj);
SPINE_C_EXPORT spine_rtti spine_deform_timeline_get_rtti();
SPINE_C_EXPORT void spine_deform_timeline_set_frame(spine_deform_timeline obj, int frameIndex, float time, spine_array_float vertices);
SPINE_C_EXPORT int32_t spine_deform_timeline_get_num_vertices(spine_deform_timeline obj);
SPINE_C_EXPORT spine_vector<float *spine_deform_timeline_get_vertices(spine_deform_timeline obj);
SPINE_C_EXPORT spine_array<float *spine_deform_timeline_get_vertices(spine_deform_timeline obj);
SPINE_C_EXPORT spine_vertex_attachment spine_deform_timeline_get_attachment(spine_deform_timeline obj);
SPINE_C_EXPORT void spine_deform_timeline_set_attachment(spine_deform_timeline obj, spine_vertex_attachment value);
SPINE_C_EXPORT void spine_deform_timeline_set_bezier(spine_deform_timeline obj, spine_size_t bezier, spine_size_t frame, float value, float time1, float value1, float cx1, float cy1, float cx2, float cy2, float time2, float value2);
SPINE_C_EXPORT float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int32_t frame);
SPINE_C_EXPORT spine_size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj);
SPINE_C_EXPORT void spine_deform_timeline_apply(spine_deform_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT 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);
SPINE_C_EXPORT float spine_deform_timeline_get_curve_percent(spine_deform_timeline obj, float time, int frame);
SPINE_C_EXPORT size_t spine_deform_timeline_get_frame_count(spine_deform_timeline obj);
SPINE_C_EXPORT 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);
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_draw_order_timeline spine_draw_order_timeline_create(spine_size_t frameCount) {
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;
}
@ -42,70 +42,56 @@ void spine_draw_order_timeline_dispose(spine_draw_order_timeline obj) {
delete (DrawOrderTimeline *) obj;
}
spine_rtti spine_draw_order_timeline_get_rtti(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_draw_order_timeline_get_rtti() {
return (spine_rtti) &DrawOrderTimeline::rtti;
}
void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
spine_size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj) {
if (!obj) return 0;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return _obj->getFrameCount();
}
void * spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return _obj->getDrawOrders();
}
int32_t spine_draw_order_timeline_get_num_draw_orders(spine_draw_order_timeline obj) {
if (!obj) return 0;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (int32_t) _obj->getDrawOrders().size();
}
spine_vector<int *spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj) {
spine_array<int *spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (spine_vector<int *) _obj->getDrawOrders().buffer();
return (spine_array<int *) _obj->getDrawOrders().buffer();
}
void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, spine_size_t frame, float time, int32_t * drawOrder) {
void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, size_t frame, float time, spine_array_int drawOrder) {
if (!obj) return ;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
_obj->setFrame(frame, time, (Vector<int> *) drawOrder);
_obj->setFrame(frame, time, (Array<int> *) drawOrder);
}
spine_size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj) {
if (!obj) return 0;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return _obj->getFrameEntries();
}
void * spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return _obj->getFrames();
}
int32_t spine_draw_order_timeline_get_num_frames(spine_draw_order_timeline obj) {
if (!obj) return 0;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) {
float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj) {
@ -114,20 +100,14 @@ float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj) {
return _obj->getDuration();
}
void * spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return _obj->getPropertyIds();
}
int32_t spine_draw_order_timeline_get_num_property_ids(spine_draw_order_timeline obj) {
if (!obj) return 0;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) {
int64_t *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj) {
if (!obj) return nullptr;
DrawOrderTimeline *_obj = (DrawOrderTimeline *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}

View File

@ -34,27 +34,22 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_draw_order_timeline)
SPINE_C_EXPORT spine_draw_order_timeline spine_draw_order_timeline_create(spine_size_t frameCount);
SPINE_C_EXPORT spine_draw_order_timeline spine_draw_order_timeline_create(size_t frameCount);
SPINE_C_EXPORT void spine_draw_order_timeline_dispose(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_rtti spine_draw_order_timeline_get_rtti(spine_draw_order_timeline obj);
SPINE_C_EXPORT void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT spine_size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj);
SPINE_C_EXPORT void * spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_rtti spine_draw_order_timeline_get_rtti();
SPINE_C_EXPORT void spine_draw_order_timeline_apply(spine_draw_order_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT size_t spine_draw_order_timeline_get_frame_count(spine_draw_order_timeline obj);
SPINE_C_EXPORT int32_t spine_draw_order_timeline_get_num_draw_orders(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_vector<int *spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj);
SPINE_C_EXPORT void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, spine_size_t frame, float time, int32_t * drawOrder);
SPINE_C_EXPORT spine_size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj);
SPINE_C_EXPORT void * spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_array<int *spine_draw_order_timeline_get_draw_orders(spine_draw_order_timeline obj);
SPINE_C_EXPORT void spine_draw_order_timeline_set_frame(spine_draw_order_timeline obj, size_t frame, float time, spine_array_int drawOrder);
SPINE_C_EXPORT size_t spine_draw_order_timeline_get_frame_entries(spine_draw_order_timeline obj);
SPINE_C_EXPORT int32_t spine_draw_order_timeline_get_num_frames(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj);
SPINE_C_EXPORT float *spine_draw_order_timeline_get_frames(spine_draw_order_timeline obj);
SPINE_C_EXPORT float spine_draw_order_timeline_get_duration(spine_draw_order_timeline obj);
SPINE_C_EXPORT void * spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj);
SPINE_C_EXPORT int32_t spine_draw_order_timeline_get_num_property_ids(spine_draw_order_timeline obj);
SPINE_C_EXPORT spine_property_id *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj);
SPINE_C_EXPORT int64_t *spine_draw_order_timeline_get_property_ids(spine_draw_order_timeline obj);
#ifdef __cplusplus
}

View File

@ -33,7 +33,7 @@
using namespace spine;
spine_event spine_event_create(float time, spine_event_data data) {
Event *obj = new (__FILE__, __LINE__) Event(time, data);
Event *obj = new (__FILE__, __LINE__) Event(time, *(EventData*) data);
return (spine_event) obj;
}
@ -43,9 +43,9 @@ void spine_event_dispose(spine_event obj) {
}
spine_event_data spine_event_get_data(spine_event obj) {
if (!obj) return nullptr;
if (!obj) return (spine_event_data) 0;
Event *_obj = (Event *) obj;
return _obj->getData();
return (spine_event_data) &_obj->getData();
}
float spine_event_get_time(spine_event obj) {
@ -54,13 +54,13 @@ float spine_event_get_time(spine_event obj) {
return _obj->getTime();
}
int32_t spine_event_get_int(spine_event obj) {
int spine_event_get_int(spine_event obj) {
if (!obj) return 0;
Event *_obj = (Event *) obj;
return _obj->getInt();
}
void spine_event_set_int(spine_event obj, int32_t value) {
void spine_event_set_int(spine_event obj, int value) {
if (!obj) return;
Event *_obj = (Event *) obj;
_obj->setInt(value);
@ -78,13 +78,13 @@ void spine_event_set_float(spine_event obj, float value) {
_obj->setFloat(value);
}
const utf8 * spine_event_get_string(spine_event obj) {
const char* spine_event_get_string(spine_event obj) {
if (!obj) return nullptr;
Event *_obj = (Event *) obj;
return (const utf8 *) _obj->getString().buffer();
return (const char *) _obj->getString().buffer();
}
void spine_event_set_string(spine_event obj, const utf8 * value) {
void spine_event_set_string(spine_event obj, const char* value) {
if (!obj) return;
Event *_obj = (Event *) obj;
_obj->setString(String(value));

View File

@ -34,20 +34,18 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_event)
#include "types.h"
SPINE_C_EXPORT spine_event spine_event_create(float time, spine_event_data data);
SPINE_C_EXPORT void spine_event_dispose(spine_event obj);
SPINE_C_EXPORT spine_event_data spine_event_get_data(spine_event obj);
SPINE_C_EXPORT float spine_event_get_time(spine_event obj);
SPINE_C_EXPORT int32_t spine_event_get_int(spine_event obj);
SPINE_C_EXPORT void spine_event_set_int(spine_event obj, int32_t value);
SPINE_C_EXPORT int spine_event_get_int(spine_event obj);
SPINE_C_EXPORT void spine_event_set_int(spine_event obj, int value);
SPINE_C_EXPORT float spine_event_get_float(spine_event obj);
SPINE_C_EXPORT void spine_event_set_float(spine_event obj, float value);
SPINE_C_EXPORT const utf8 * spine_event_get_string(spine_event obj);
SPINE_C_EXPORT void spine_event_set_string(spine_event obj, const utf8 * value);
SPINE_C_EXPORT const char* spine_event_get_string(spine_event obj);
SPINE_C_EXPORT void spine_event_set_string(spine_event obj, const char* value);
SPINE_C_EXPORT float spine_event_get_volume(spine_event obj);
SPINE_C_EXPORT void spine_event_set_volume(spine_event obj, float value);
SPINE_C_EXPORT float spine_event_get_balance(spine_event obj);

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_event_data spine_event_data_create(const utf8 * name) {
spine_event_data spine_event_data_create(const char* name) {
EventData *obj = new (__FILE__, __LINE__) EventData(String(name));
return (spine_event_data) obj;
}
@ -42,34 +42,58 @@ void spine_event_data_dispose(spine_event_data obj) {
delete (EventData *) obj;
}
const utf8 * spine_event_data_get_name(spine_event_data obj) {
const char* spine_event_data_get_name(spine_event_data obj) {
if (!obj) return nullptr;
EventData *_obj = (EventData *) obj;
return (const utf8 *) _obj->getName().buffer();
return (const char *) _obj->getName().buffer();
}
int32_t spine_event_data_get_int_value(spine_event_data obj) {
int spine_event_data_get_int_value(spine_event_data obj) {
if (!obj) return 0;
EventData *_obj = (EventData *) obj;
return _obj->getIntValue();
}
void spine_event_data_set_int_value(spine_event_data obj, int value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
_obj->setIntValue(value);
}
float spine_event_data_get_float_value(spine_event_data obj) {
if (!obj) return 0;
EventData *_obj = (EventData *) obj;
return _obj->getFloatValue();
}
const utf8 * spine_event_data_get_string_value(spine_event_data obj) {
if (!obj) return nullptr;
void spine_event_data_set_float_value(spine_event_data obj, float value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
return (const utf8 *) _obj->getStringValue().buffer();
_obj->setFloatValue(value);
}
const utf8 * spine_event_data_get_audio_path(spine_event_data obj) {
const char* spine_event_data_get_string_value(spine_event_data obj) {
if (!obj) return nullptr;
EventData *_obj = (EventData *) obj;
return (const utf8 *) _obj->getAudioPath().buffer();
return (const char *) _obj->getStringValue().buffer();
}
void spine_event_data_set_string_value(spine_event_data obj, const char* value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
_obj->setStringValue(String(value));
}
const char* spine_event_data_get_audio_path(spine_event_data obj) {
if (!obj) return nullptr;
EventData *_obj = (EventData *) obj;
return (const char *) _obj->getAudioPath().buffer();
}
void spine_event_data_set_audio_path(spine_event_data obj, const char* value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
_obj->setAudioPath(String(value));
}
float spine_event_data_get_volume(spine_event_data obj) {
@ -78,8 +102,20 @@ float spine_event_data_get_volume(spine_event_data obj) {
return _obj->getVolume();
}
void spine_event_data_set_volume(spine_event_data obj, float value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
_obj->setVolume(value);
}
float spine_event_data_get_balance(spine_event_data obj) {
if (!obj) return 0;
EventData *_obj = (EventData *) obj;
return _obj->getBalance();
}
void spine_event_data_set_balance(spine_event_data obj, float value) {
if (!obj) return;
EventData *_obj = (EventData *) obj;
_obj->setBalance(value);
}

View File

@ -34,19 +34,23 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_event_data)
SPINE_C_EXPORT spine_event_data spine_event_data_create(const utf8 * name);
SPINE_C_EXPORT spine_event_data spine_event_data_create(const char* name);
SPINE_C_EXPORT void spine_event_data_dispose(spine_event_data obj);
SPINE_C_EXPORT const utf8 * spine_event_data_get_name(spine_event_data obj);
SPINE_C_EXPORT int32_t spine_event_data_get_int_value(spine_event_data obj);
SPINE_C_EXPORT const char* spine_event_data_get_name(spine_event_data obj);
SPINE_C_EXPORT int spine_event_data_get_int_value(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_int_value(spine_event_data obj, int value);
SPINE_C_EXPORT float spine_event_data_get_float_value(spine_event_data obj);
SPINE_C_EXPORT const utf8 * spine_event_data_get_string_value(spine_event_data obj);
SPINE_C_EXPORT const utf8 * spine_event_data_get_audio_path(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_float_value(spine_event_data obj, float value);
SPINE_C_EXPORT const char* spine_event_data_get_string_value(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_string_value(spine_event_data obj, const char* value);
SPINE_C_EXPORT const char* spine_event_data_get_audio_path(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_audio_path(spine_event_data obj, const char* value);
SPINE_C_EXPORT float spine_event_data_get_volume(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_volume(spine_event_data obj, float value);
SPINE_C_EXPORT float spine_event_data_get_balance(spine_event_data obj);
SPINE_C_EXPORT void spine_event_data_set_balance(spine_event_data obj, float value);
#ifdef __cplusplus
}

View File

@ -34,9 +34,7 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_event_queue_entry)
#include "types.h"
SPINE_C_EXPORT spine_event_queue_entry spine_event_queue_entry_create(spine_event_type eventType, spine_track_entry trackEntry, spine_event event);
SPINE_C_EXPORT void spine_event_queue_entry_dispose(spine_event_queue_entry obj);

View File

@ -32,7 +32,7 @@
using namespace spine;
spine_event_timeline spine_event_timeline_create(spine_size_t frameCount) {
spine_event_timeline spine_event_timeline_create(size_t frameCount) {
EventTimeline *obj = new (__FILE__, __LINE__) EventTimeline(frameCount);
return (spine_event_timeline) obj;
}
@ -42,30 +42,22 @@ void spine_event_timeline_dispose(spine_event_timeline obj) {
delete (EventTimeline *) obj;
}
spine_rtti spine_event_timeline_get_rtti(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return (spine_rtti) &_obj->getRTTI();
spine_rtti spine_event_timeline_get_rtti() {
return (spine_rtti) &EventTimeline::rtti;
}
void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose) {
void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose) {
if (!obj) return ;
EventTimeline *_obj = (EventTimeline *) obj;
_obj->apply(skeleton, lastTime, time, (Vector<Event *> *) pEvents, alpha, blend, direction, appliedPose);
_obj->apply(*(Skeleton*) skeleton, lastTime, time, (Array<Event *> *) pEvents, alpha, (MixBlend) blend, (MixDirection) direction, appliedPose);
}
spine_size_t spine_event_timeline_get_frame_count(spine_event_timeline obj) {
if (!obj) return nullptr;
size_t spine_event_timeline_get_frame_count(spine_event_timeline obj) {
if (!obj) return 0;
EventTimeline *_obj = (EventTimeline *) obj;
return _obj->getFrameCount();
}
void * spine_event_timeline_get_events(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return (void *) _obj->getEvents();
}
int32_t spine_event_timeline_get_num_events(spine_event_timeline obj) {
if (!obj) return 0;
EventTimeline *_obj = (EventTimeline *) obj;
@ -78,34 +70,28 @@ spine_event *spine_event_timeline_get_events(spine_event_timeline obj) {
return (spine_event *) _obj->getEvents().buffer();
}
void spine_event_timeline_set_frame(spine_event_timeline obj, spine_size_t frame, spine_event event) {
void spine_event_timeline_set_frame(spine_event_timeline obj, size_t frame, spine_event event) {
if (!obj) return ;
EventTimeline *_obj = (EventTimeline *) obj;
_obj->setFrame(frame, (Event *) event);
}
spine_size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj) {
if (!obj) return nullptr;
size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj) {
if (!obj) return 0;
EventTimeline *_obj = (EventTimeline *) obj;
return _obj->getFrameEntries();
}
void * spine_event_timeline_get_frames(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return _obj->getFrames();
}
int32_t spine_event_timeline_get_num_frames(spine_event_timeline obj) {
if (!obj) return 0;
EventTimeline *_obj = (EventTimeline *) obj;
return (int32_t) _obj->getFrames().size();
}
spine_float *spine_event_timeline_get_frames(spine_event_timeline obj) {
float *spine_event_timeline_get_frames(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return (spine_float *) _obj->getFrames().buffer();
return (float *) _obj->getFrames().buffer();
}
float spine_event_timeline_get_duration(spine_event_timeline obj) {
@ -114,20 +100,14 @@ float spine_event_timeline_get_duration(spine_event_timeline obj) {
return _obj->getDuration();
}
void * spine_event_timeline_get_property_ids(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return _obj->getPropertyIds();
}
int32_t spine_event_timeline_get_num_property_ids(spine_event_timeline obj) {
if (!obj) return 0;
EventTimeline *_obj = (EventTimeline *) obj;
return (int32_t) _obj->getPropertyIds().size();
}
spine_property_id *spine_event_timeline_get_property_ids(spine_event_timeline obj) {
int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj) {
if (!obj) return nullptr;
EventTimeline *_obj = (EventTimeline *) obj;
return (spine_property_id *) _obj->getPropertyIds().buffer();
return (int64_t *) _obj->getPropertyIds().buffer();
}

View File

@ -34,27 +34,22 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_event_timeline)
SPINE_C_EXPORT spine_event_timeline spine_event_timeline_create(spine_size_t frameCount);
SPINE_C_EXPORT spine_event_timeline spine_event_timeline_create(size_t frameCount);
SPINE_C_EXPORT void spine_event_timeline_dispose(spine_event_timeline obj);
SPINE_C_EXPORT spine_rtti spine_event_timeline_get_rtti(spine_event_timeline obj);
SPINE_C_EXPORT void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, void * pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, spine_bool appliedPose);
SPINE_C_EXPORT spine_size_t spine_event_timeline_get_frame_count(spine_event_timeline obj);
SPINE_C_EXPORT void * spine_event_timeline_get_events(spine_event_timeline obj);
SPINE_C_EXPORT spine_rtti spine_event_timeline_get_rtti();
SPINE_C_EXPORT void spine_event_timeline_apply(spine_event_timeline obj, spine_skeleton skeleton, float lastTime, float time, spine_array_event pEvents, float alpha, spine_mix_blend blend, spine_mix_direction direction, bool appliedPose);
SPINE_C_EXPORT size_t spine_event_timeline_get_frame_count(spine_event_timeline obj);
SPINE_C_EXPORT int32_t spine_event_timeline_get_num_events(spine_event_timeline obj);
SPINE_C_EXPORT spine_event *spine_event_timeline_get_events(spine_event_timeline obj);
SPINE_C_EXPORT void spine_event_timeline_set_frame(spine_event_timeline obj, spine_size_t frame, spine_event event);
SPINE_C_EXPORT spine_size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj);
SPINE_C_EXPORT void * spine_event_timeline_get_frames(spine_event_timeline obj);
SPINE_C_EXPORT void spine_event_timeline_set_frame(spine_event_timeline obj, size_t frame, spine_event event);
SPINE_C_EXPORT size_t spine_event_timeline_get_frame_entries(spine_event_timeline obj);
SPINE_C_EXPORT int32_t spine_event_timeline_get_num_frames(spine_event_timeline obj);
SPINE_C_EXPORT spine_float *spine_event_timeline_get_frames(spine_event_timeline obj);
SPINE_C_EXPORT float *spine_event_timeline_get_frames(spine_event_timeline obj);
SPINE_C_EXPORT float spine_event_timeline_get_duration(spine_event_timeline obj);
SPINE_C_EXPORT void * spine_event_timeline_get_property_ids(spine_event_timeline obj);
SPINE_C_EXPORT int32_t spine_event_timeline_get_num_property_ids(spine_event_timeline obj);
SPINE_C_EXPORT spine_property_id *spine_event_timeline_get_property_ids(spine_event_timeline obj);
SPINE_C_EXPORT int64_t *spine_event_timeline_get_property_ids(spine_event_timeline obj);
#ifdef __cplusplus
}

View File

@ -30,19 +30,19 @@
#ifndef SPINE_C_EVENTTYPE_H
#define SPINE_C_EVENTTYPE_H
#include "../../custom.h"
#include "../base.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum spine_event_type {
SPINE_EVENT_TYPE_EVENT_TYPE_START = 0,
SPINE_EVENT_TYPE_EVENT_TYPE_INTERRUPT,
SPINE_EVENT_TYPE_EVENT_TYPE_END,
SPINE_EVENT_TYPE_EVENT_TYPE_DISPOSE,
SPINE_EVENT_TYPE_EVENT_TYPE_COMPLETE,
SPINE_EVENT_TYPE_EVENT_TYPE_EVENT
SPINE_EVENT_TYPE_START = 0,
SPINE_EVENT_TYPE_INTERRUPT,
SPINE_EVENT_TYPE_END,
SPINE_EVENT_TYPE_DISPOSE,
SPINE_EVENT_TYPE_COMPLETE,
SPINE_EVENT_TYPE_EVENT
} spine_event_type;
#ifdef __cplusplus

View File

@ -30,20 +30,20 @@
#ifndef SPINE_C_FORMAT_H
#define SPINE_C_FORMAT_H
#include "../../custom.h"
#include "../base.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum spine_format {
SPINE_FORMAT_FORMAT_ALPHA,
SPINE_FORMAT_FORMAT_INTENSITY,
SPINE_FORMAT_FORMAT_LUMINANCE_ALPHA,
SPINE_FORMAT_FORMAT_RGB565,
SPINE_FORMAT_FORMAT_RGBA4444,
SPINE_FORMAT_FORMAT_RGB888,
SPINE_FORMAT_FORMAT_RGBA8888
SPINE_FORMAT_ALPHA,
SPINE_FORMAT_INTENSITY,
SPINE_FORMAT_LUMINANCE_ALPHA,
SPINE_FORMAT_RGB565,
SPINE_FORMAT_RGBA4444,
SPINE_FORMAT_RGB888,
SPINE_FORMAT_RGBA8888
} spine_format;
#ifdef __cplusplus

View File

@ -32,18 +32,13 @@
using namespace spine;
spine_from_property spine_from_property_create(void) {
FromProperty *obj = new (__FILE__, __LINE__) FromProperty();
return (spine_from_property) obj;
}
void spine_from_property_dispose(spine_from_property obj) {
if (!obj) return;
delete (FromProperty *) obj;
}
float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromProperty *_obj = (FromProperty *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,13 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
#include "types.h"
SPINE_OPAQUE_TYPE(spine_from_property)
SPINE_C_EXPORT spine_from_property spine_from_property_create(void);
SPINE_C_EXPORT void spine_from_property_dispose(spine_from_property obj);
SPINE_C_EXPORT float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_property_value(spine_from_property obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_rotate_dispose(spine_from_rotate obj) {
delete (FromRotate *) obj;
}
float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromRotate *_obj = (FromRotate *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_rotate)
#include "types.h"
SPINE_C_EXPORT void spine_from_rotate_dispose(spine_from_rotate obj);
SPINE_C_EXPORT float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_rotate_value(spine_from_rotate obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_scale_x_dispose(spine_from_scale_x obj) {
delete (FromScaleX *) obj;
}
float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromScaleX *_obj = (FromScaleX *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_scale_x)
#include "types.h"
SPINE_C_EXPORT void spine_from_scale_x_dispose(spine_from_scale_x obj);
SPINE_C_EXPORT float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_scale_x_value(spine_from_scale_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_scale_y_dispose(spine_from_scale_y obj) {
delete (FromScaleY *) obj;
}
float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromScaleY *_obj = (FromScaleY *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_scale_y)
#include "types.h"
SPINE_C_EXPORT void spine_from_scale_y_dispose(spine_from_scale_y obj);
SPINE_C_EXPORT float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_scale_y_value(spine_from_scale_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_shear_y_dispose(spine_from_shear_y obj) {
delete (FromShearY *) obj;
}
float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromShearY *_obj = (FromShearY *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_shear_y)
#include "types.h"
SPINE_C_EXPORT void spine_from_shear_y_dispose(spine_from_shear_y obj);
SPINE_C_EXPORT float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_shear_y_value(spine_from_shear_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_x_dispose(spine_from_x obj) {
delete (FromX *) obj;
}
float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromX *_obj = (FromX *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_x)
#include "types.h"
SPINE_C_EXPORT void spine_from_x_dispose(spine_from_x obj);
SPINE_C_EXPORT float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_x_value(spine_from_x obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

View File

@ -37,8 +37,8 @@ void spine_from_y_dispose(spine_from_y obj) {
delete (FromY *) obj;
}
float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets) {
float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets) {
if (!obj) return 0;
FromY *_obj = (FromY *) obj;
return _obj->value(skeleton, source, local, (float *) offsets);
return _obj->value(*(Skeleton*) skeleton, *(BonePose*) source, local, (float *) offsets);
}

View File

@ -34,12 +34,10 @@
extern "C" {
#endif
#include "../custom.h"
SPINE_OPAQUE_TYPE(spine_from_y)
#include "types.h"
SPINE_C_EXPORT void spine_from_y_dispose(spine_from_y obj);
SPINE_C_EXPORT float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, spine_bool local, spine_float offsets);
SPINE_C_EXPORT float spine_from_y_value(spine_from_y obj, spine_skeleton skeleton, spine_bone_pose source, bool local, float * offsets);
#ifdef __cplusplus
}

Some files were not shown because too many files have changed in this diff Show More