Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

feat(native): every Spine release in one native host, each skeleton read by its own

yhh5eda1ed79a17
diff --git a/build-tools/cli.js b/build-tools/cli.js
index e75136412..3e84f4b4b 100644
--- a/build-tools/cli.js
+++ b/build-tools/cli.js
@@ -168,7 +168,7 @@ program
.option('--quickjs <dir>', 'QuickJS-ng source dir (default: the pinned checkout; or ESTELLA_QUICKJS_DIR)')
.option('--js-engine <engine>', 'JS engine the host embeds: v8 (default where pinned: Windows, Android) or quickjs (iOS always; or ESTELLA_JS_ENGINE)')
.option('--v8 <dir>', 'A prebuilt V8 (include/ + libraries) instead of the pinned one (or ESTELLA_V8_DIR)')
- .option('--spine <version>', 'Spine runtime the host links (4.3, 4.2, 4.1, 3.8 or 2.1; default 4.2). A host links ONE: a project whose skeletons are another version needs a template built with this')
+ .option('--spine <versions>', 'Spine releases the host carries, comma-separated (default: every vendored one: 2.1, 3.8, 4.1, 4.2, 4.3)')
.option('--sdl <dir>', 'Desktop: SDL3 source dir or install prefix (default: the pinned checkout; or ESTELLA_SDL_DIR)')
.option('--steam-sdk <dir>', 'Desktop: a Steamworks SDK on this machine; its redistributable ships in the package (and in a template built with --template-out)')
.option('--macos-archs <archs>', 'Desktop: CMAKE_OSX_ARCHITECTURES (arm64, or "arm64;x86_64" for a universal build)')
diff --git a/build-tools/tasks/native.js b/build-tools/tasks/native.js
index f80c5f86b..f4013da78 100644
--- a/build-tools/tasks/native.js
+++ b/build-tools/tasks/native.js
@@ -76,10 +76,29 @@ export const MODULE_BINDING_HEADERS = [
'modules/physics/PhysicsBindings.hpp',
'modules/physics3d/Physics3DBindings.hpp',
'modules/video/VideoBindings.hpp',
- 'modules/spine/SpineBindings.hpp',
'modules/dragonbones/DragonBonesBindings.hpp',
];
+// Spine is not in the list above: a host carries every vendored release, each
+// answering the one spine_* surface under its own prefix (spine38_, spine42_, …),
+// so its wrappers are only ever the renamed copies (SPINE_ALIAS, one per release).
+export const SPINE_BINDING_HEADER = 'modules/spine/SpineBindings.hpp';
+
+/** Every Spine release vendored under third_party/, oldest first. */
+export function vendoredSpineVersions(rootDir) {
+ return readdirSync(path.join(rootDir, 'third_party'))
+ .filter((d) => d.startsWith('spine-runtimes-'))
+ .map((d) => d.slice('spine-runtimes-'.length))
+ .sort();
+}
+
+/** One release's copy of the spine_* surface — what native/CMakeLists.txt links
+ * as estella_spine_<tag> and the SDK asks for as es_spine<tag>_* (nativeSpinePrefix). */
+export const spineAlias = (version) => {
+ const tag = version.replace('.', '');
+ return `spine_=spine${tag}_:ES_SPINE${tag}`;
+};
+
export const NATIVE_BINDING_HEADERS = [...ENGINE_BINDING_HEADERS, ...MODULE_BINDING_HEADERS];
// The PhysX backend's copy of the 3D physics surface: `physics3d_*` as `physx3d_*`,
@@ -112,6 +131,21 @@ async function generateNativeFunctionBindings(rootDir, genDir, python) {
'--native-functions-alias-output', path.join(genDir, 'PhysX3DFunctionBindings.generated.cpp'),
'--native-functions-alias-header', path.join(genDir, 'PhysX3DRename.generated.hpp'),
], { cwd: rootDir });
+ // Every vendored Spine release, each its own TU and rename header: they are
+ // linked side by side (or, on Android, each into a library of its own), so one
+ // header holding them all would rename one name four ways. The build compiles
+ // the ones ESTELLA_SPINE_VERSIONS names.
+ for (const version of vendoredSpineVersions(rootDir)) {
+ const tag = version.replace('.', '');
+ await runCommand(python, [
+ eht,
+ '--native-functions', abs(SPINE_BINDING_HEADER),
+ '--native-shim', 'esn_shim.hpp',
+ '--native-functions-alias', spineAlias(version),
+ '--native-functions-alias-output', path.join(genDir, `SpineFunctionBindings${tag}.generated.cpp`),
+ '--native-functions-alias-header', path.join(genDir, `SpineRename${tag}.generated.hpp`),
+ ], { cwd: rootDir });
+ }
// The TS engine surface: the CORE headers only. It is committed (the SDK compiles
// without running EHT), so it is refreshed here rather than updated by hand —
// after a native build, a surface that moved shows up as a diff instead of as a
@@ -439,6 +473,7 @@ async function buildDesktopHost(options) {
logger.step('Building desktop host...');
await runCommand('cmake', ['--build', buildDir, '-j', String(getCpuCount())], { cwd: rootDir });
+ await verifySpineSymbols(buildDir);
const exe = path.join(buildDir, target === 'windows' ? 'estella_desktop.exe' : 'estella_desktop');
logger.success(`Desktop host: ${path.relative(rootDir, exe)}`);
@@ -455,26 +490,49 @@ async function buildDesktopHost(options) {
}
/**
- * `--spine <version>` as a CMake flag. A host links ONE Spine runtime — every
- * vendored one exports the same symbols — so a project whose skeletons are 3.8
- * needs a template built for 3.8; the default is native/CMakeLists.txt's (4.2).
- * Absent, the build keeps whatever its cache already says, and the template
- * manifest records that (see builtSpineVersion), so it never claims a default.
+ * The Spine releases a host carries, as a CMake flag: every vendored one unless
+ * `--spine 3.8,4.2` narrows it (a size experiment). Always passed, so a narrowed
+ * build does not linger in the cache; the template manifest records the set the
+ * build linked (see builtSpineVersions), and an export names any skeleton outside it.
+ */
+/**
+ * Every Spine release linked side by side must keep its names to itself: one left
+ * unprefixed links silently and binds a call to another release's code. Read off
+ * the built libraries where an llvm-nm is at hand (the Android NDK's, or NM);
+ * otherwise say it was not checked rather than pass.
*/
+async function verifySpineSymbols(buildDir) {
+ const { verifyBuild } = await import('../../tools/spine-c-rename.mjs');
+ let result;
+ try {
+ result = verifyBuild(buildDir);
+ } catch (err) {
+ logger.warn(`Spine symbol check skipped: ${err.message}`);
+ return;
+ }
+ if (result.escaped.length) {
+ throw new Error(`Spine names outside their release's prefix (run node tools/spine-c-rename.mjs):\n ${result.escaped.join('\n ')}`);
+ }
+ logger.info(`Spine symbols: ${result.libs.length} libraries, every name prefixed by its release`);
+}
+
function spineFlags(rootDir, options) {
- const version = options.spine;
- if (!version) return [];
- checkSpineVendored(rootDir, version);
- logger.info(`Linking Spine ${version}`);
- return [`-DESTELLA_SPINE_VERSION=${version}`];
+ const versions = spineSelection(rootDir, options);
+ if (options.spine) logger.info(`Linking Spine ${versions.join(', ')}`);
+ return [`-DESTELLA_SPINE_VERSIONS=${versions.join(';')}`];
}
-/** Refuses a --spine no runtime is vendored for — before any dependency builds. */
-function checkSpineVendored(rootDir, version) {
- if (existsSync(path.join(rootDir, 'third_party', `spine-runtimes-${version}`))) return;
- const vendored = readdirSync(path.join(rootDir, 'third_party'))
- .filter((d) => d.startsWith('spine-runtimes-')).map((d) => d.slice('spine-runtimes-'.length));
- throw new Error(`--spine ${version}: no such Spine runtime is vendored (have ${vendored.join(', ')}).`);
+/** `--spine` as a list, refused before any dependency builds if it names a release
+ * nothing is vendored for. */
+function spineSelection(rootDir, options) {
+ const vendored = vendoredSpineVersions(rootDir);
+ if (!options.spine) return vendored;
+ const wanted = String(options.spine).split(',').map((v) => v.trim()).filter(Boolean);
+ const unknown = wanted.filter((v) => !vendored.includes(v));
+ if (unknown.length || wanted.length === 0) {
+ throw new Error(`--spine ${options.spine}: no such Spine runtime is vendored (have ${vendored.join(', ')}).`);
+ }
+ return wanted;
}
// CMake parses backslashes in -D string values as escapes (F:\estella -> \e), so
@@ -540,6 +598,7 @@ async function buildAndroidHost(options) {
logger.step('Building native host...');
await runCommand(cmake, ['--build', buildDir, '-j', String(getCpuCount())], { cwd: rootDir });
+ await verifySpineSymbols(buildDir);
logger.success(`Host: ${path.join('build/cmake/native', abi, 'libestella_js_host.so')}`);
@@ -718,6 +777,7 @@ async function buildIosHost(options) {
logger.step(`Building iOS host (${slice.label})...`);
await runCommand('cmake', ['--build', buildDir, '-j', String(getCpuCount())], { cwd: rootDir, env });
+ await verifySpineSymbols(buildDir);
logger.success(`iOS host: ${path.join(slice.dir, 'libestella_ios.a')}`);
await assembleXcframework(rootDir, env, genDir);
@@ -920,7 +980,7 @@ async function buildNativeDeps(options) {
}
export async function buildNative(options = {}) {
- if (options.spine) checkSpineVendored(config.paths.root, options.spine);
+ if (options.spine) spineSelection(config.paths.root, options);
// Before anything that needs a toolchain: this only reads the manifest, and CI
// asks for it on a runner that has not set one up yet.
if (options.depsCacheKey) {
diff --git a/build-tools/tasks/nativeTemplateEmit.js b/build-tools/tasks/nativeTemplateEmit.js
index 748539c4f..9915c6ac5 100644
--- a/build-tools/tasks/nativeTemplateEmit.js
+++ b/build-tools/tasks/nativeTemplateEmit.js
@@ -21,7 +21,7 @@ import { makeZip, zipTree } from '../utils/zip.js';
import {
templateLayout, templateId, ANDROID_ABIS, templateAbis, writeTemplateManifest,
missingTemplateFiles, installedTemplateDir, templateZipName, TEMPLATE_INDEX, TEMPLATE_FORMAT, templateJsEngine,
- BYTECODE_FILE, builtSpineVersion, DEFAULT_TEMPLATE_SPINE,
+ BYTECODE_FILE, builtSpineVersions, LEGACY_TEMPLATE_SPINE,
} from '../utils/nativeTemplate.js';
/** The Java shim's sources — the IME's own side of an editable field, which has to
@@ -231,10 +231,10 @@ export async function emitNativeTemplate(options) {
const manifest = writeTemplateManifest(dir, {
platform,
engineVersion,
- // What the host build linked, from its CMake cache: an export refuses to
- // pair this template with skeletons of another version (#115).
- spineVersion: builtSpineVersion(root, platform, platform === 'android' ? templateAbis(dir) : undefined)
- ?? DEFAULT_TEMPLATE_SPINE,
+ // The Spine releases the host build carries, from its CMake cache: an
+ // export names any skeleton of a release outside them (#115).
+ spineVersions: builtSpineVersions(root, platform, platform === 'android' ? templateAbis(dir) : undefined)
+ ?? [LEGACY_TEMPLATE_SPINE],
// What runs the game's JS, so the editor (and a person) can tell a JIT
// template from an interpreter one without opening the binary.
jsEngine: templateJsEngine(dir, platform),
diff --git a/build-tools/utils/nativeTemplate.d.ts b/build-tools/utils/nativeTemplate.d.ts
index f206e3775..ba65b29e4 100644
--- a/build-tools/utils/nativeTemplate.d.ts
+++ b/build-tools/utils/nativeTemplate.d.ts
@@ -25,9 +25,10 @@ export interface NativeTemplateManifest {
/** Matched EXACTLY against the editor's version: the SDK bundle is compiled
* into the host binary, so a near-miss fails on a device. */
engineVersion: string;
- /** The one Spine runtime the host links (read from its build, not assumed).
- * Absent on templates written before it was recorded: those are 4.2 —
- * read it through {@link templateSpineVersion}. */
+ /** The Spine releases the host carries, read from its build. Read it through
+ * {@link templateSpineVersions}: older templates carry one (`spineVersion`). */
+ spineVersions?: string[];
+ /** Templates before `spineVersions`: the one release the host linked. */
spineVersion?: string;
/** iOS only. */
deploymentTarget?: string;
@@ -101,9 +102,12 @@ export function writeTemplateManifest(
meta: { platform: TemplatePlatform; engineVersion: string; abi?: string } & Record<string, unknown>,
): NativeTemplateManifest;
export function readTemplateManifest(dir: string): NativeTemplateManifest | null;
-export const DEFAULT_TEMPLATE_SPINE: string;
-export function templateSpineVersion(manifest: Pick<NativeTemplateManifest, 'spineVersion'> | null | undefined): string;
-export function builtSpineVersion(root: string, platform: TemplatePlatform, abis?: readonly string[]): string | null;
+export const LEGACY_TEMPLATE_SPINE: string;
+export const SPINE_RELEASES: readonly string[];
+export function templateSpineVersions(manifest: Pick<NativeTemplateManifest, 'spineVersion' | 'spineVersions'> | null | undefined): string[];
+export function builtSpineVersions(root: string, platform: TemplatePlatform, abis?: readonly string[]): string[] | null;
+export function androidSpineLibrary(version: string): string;
+export function androidSpineLibs(dir: string, abis: readonly string[], versions: Iterable<string>): Record<string, string[]>;
export function templateMatches(manifest: NativeTemplateManifest | null, want: TemplateWant): boolean;
export function templateZipName(platform: TemplatePlatform, engineVersion: string): string;
export function estellaDataDir(): string;
diff --git a/build-tools/utils/nativeTemplate.js b/build-tools/utils/nativeTemplate.js
index b8b73ee47..e096cf7c1 100644
--- a/build-tools/utils/nativeTemplate.js
+++ b/build-tools/utils/nativeTemplate.js
@@ -287,6 +287,13 @@ export function templateLayout(platform, options = {}) {
rel: `plugins/${abi}/${ANDROID_PHYSX_LIBRARY}`, strip: true, abi, optional: true,
from: (ctx) => path.join(ctx.root, 'build/cmake/native', abi, ANDROID_PHYSX_LIBRARY),
},
+ // Each Spine release, outside lib/ for the same reason: a package carries
+ // the ones its skeletons were exported from (androidSpineLibs). Optional,
+ // since a build narrowed with --spine leaves the others out.
+ ...SPINE_RELEASES.map((version) => ({
+ rel: `plugins/${abi}/${androidSpineLibrary(version)}`, strip: true, abi, optional: true,
+ from: (ctx) => path.join(ctx.root, 'build/cmake/native', abi, androidSpineLibrary(version)),
+ })),
{
// Its startup snapshot, which this V8 keeps outside the library. An
// asset, read by the host before the engine starts (Runtime.cpp).
@@ -443,13 +450,18 @@ export function readTemplateManifest(dir) {
}
}
-/** What a host links when nobody chose: native/CMakeLists.txt's own default. */
-export const DEFAULT_TEMPLATE_SPINE = '4.2';
+/** What a template written before the manifest recorded Spine links: every one
+ * of those was built with native/CMakeLists.txt's single-release default. */
+export const LEGACY_TEMPLATE_SPINE = '4.2';
-/** The Spine runtime a template without the field was built with — every one
- * published before the manifest recorded it took the CMake default. */
-export function templateSpineVersion(manifest) {
- return manifest?.spineVersion || DEFAULT_TEMPLATE_SPINE;
+/**
+ * The Spine releases a template's host carries. Current templates carry every
+ * vendored release (`spineVersions`); one from before carried a single release
+ * (`spineVersion`), or did not say, which meant the 4.2 default.
+ */
+export function templateSpineVersions(manifest) {
+ if (Array.isArray(manifest?.spineVersions)) return manifest.spineVersions;
+ return [manifest?.spineVersion || LEGACY_TEMPLATE_SPINE];
}
/** The build directories a template for `platform` is packed from. */
@@ -460,26 +472,58 @@ function hostBuildDirs(root, platform, abis) {
}
/**
- * The Spine runtime the host builds behind a template actually linked, read from
- * their CMake caches. A host links exactly one (every vendored runtime exports the
- * same symbols), and the manifest is what an export checks a project against, so
- * it records what the build DID — a cache set by hand included — not a default.
- * Null when no build dir has a cache to read.
+ * The Spine releases the host builds behind a template linked, read from their
+ * CMake caches (ESTELLA_SPINE_VERSIONS). The manifest is what an export holds a
+ * package's skeletons to, so it records what the build DID, a narrowed --spine or
+ * a cache edited by hand included. Null when no build dir has a cache to read.
*/
-export function builtSpineVersion(root, platform, abis) {
+export function builtSpineVersions(root, platform, abis) {
const seen = new Map();
for (const dir of hostBuildDirs(root, platform, abis)) {
const cache = path.join(dir, 'CMakeCache.txt');
if (!existsSync(cache)) continue;
- const m = /^ESTELLA_SPINE_VERSION:[A-Z]+=(.*)$/m.exec(readFileSync(cache, 'utf8'));
- seen.set(dir, m ? m[1].trim() : DEFAULT_TEMPLATE_SPINE);
+ const text = readFileSync(cache, 'utf8');
+ const list = /^ESTELLA_SPINE_VERSIONS:[A-Z]+=(.*)$/m.exec(text);
+ const single = /^ESTELLA_SPINE_VERSION:[A-Z]+=(.*)$/m.exec(text);
+ const versions = list ? list[1].trim().split(';').filter(Boolean)
+ : [single ? single[1].trim() : LEGACY_TEMPLATE_SPINE];
+ seen.set(dir, versions.sort().join(';'));
}
- const versions = new Set(seen.values());
- if (versions.size > 1) {
- throw new Error(`The ${platform} builds link different Spine runtimes (${[...seen].map(([d, v]) => `${path.basename(d)}: ${v}`).join(', ')}): `
- + 'one template carries one. Rebuild them with the same --spine.');
+ const sets = new Set(seen.values());
+ if (sets.size > 1) {
+ throw new Error(`The ${platform} builds carry different Spine releases (${[...seen].map(([d, v]) => `${path.basename(d)}: ${v}`).join(', ')}): `
+ + 'one template carries one set. Rebuild them with the same --spine.');
+ }
+ return sets.size ? [...sets][0].split(';') : null;
+}
+
+/**
+ * The Spine releases a template can carry. Written out because the editor reads
+ * this file where no third_party/ exists; pipeline/tests/native-template.test.ts
+ * holds it to the vendored trees and to the SDK's SPINE_VERSIONS.
+ */
+export const SPINE_RELEASES = ['2.1', '3.8', '4.1', '4.2', '4.3'];
+
+/** One Spine release's library on Android, kept under plugins/<abi>/ in the template. */
+export const androidSpineLibrary = (version) => `libestella_spine${version.replace('.', '')}.so`;
+
+/**
+ * The Spine libraries for `versions` in each of `abis`, for a package's lib/<abi>/:
+ * the releases its skeletons were exported from, and no others.
+ *
+ * @param {string} dir An installed android template.
+ * @param {string[]} abis The ABIs the package carries.
+ * @param {Iterable<string>} versions The Spine releases the package's skeletons need.
+ * @returns {Record<string, string[]>}
+ */
+export function androidSpineLibs(dir, abis, versions) {
+ const out = {};
+ for (const abi of abis) {
+ const files = [...versions].map((v) => path.join(dir, 'plugins', abi, androidSpineLibrary(v)))
+ .filter((file) => existsSync(file));
+ if (files.length) out[abi] = files;
}
- return versions.size ? [...versions][0] : null;
+ return out;
}
export function writeTemplateManifest(dir, meta) {
diff --git a/desktop b/desktop
index ad3d34c9f..4b215f26e 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit ad3d34c9f3735a8593d411226f4e52a1b9cab28e
+Subproject commit 4b215f26eb806e79bf17dd2ad43561c352facaad
diff --git a/docs/astro/src/content/docs/publishing/android-ios.mdx b/docs/astro/src/content/docs/publishing/android-ios.mdx
index 51c2c5c60..55135524b 100644
--- a/docs/astro/src/content/docs/publishing/android-ios.mdx
+++ b/docs/astro/src/content/docs/publishing/android-ios.mdx
@@ -209,7 +209,7 @@ behaves exactly as it does in a browser.
| Sprites, tilemaps, particles, post-processing | Native (Dawn) |
| Text, bitmap text, rich text | Same atlas + layout as the web; glyphs rasterized from the OS font |
| Physics (Box2D) | Compiled in; solved across worker threads |
-| Spine | Compiled in — one runtime version per binary; see [Spine versions](#spine-versions) |
+| Spine | Compiled in — every version, each skeleton read by its own; see [Spine versions](#spine-versions) |
| DragonBones | Compiled in — one runtime, since the format is frozen |
| Video | Compiled in (cooked at build, decoded on device) |
| Audio | Native mixer ([miniaudio](https://miniaud.io/)) — CoreAudio / AAudio |
@@ -221,30 +221,20 @@ behaves exactly as it does in a browser.
### Spine versions
-A browser build carries a Spine runtime for each version its skeletons were
-exported from. A native app cannot: every vendored Spine runtime (2.1, 3.8, 4.1,
-4.2, 4.3) exports the same symbols, so a host binary links **one**. The official
-runtime templates link **4.2**.
+A native app reads every Spine version the editor does: 2.1, 3.8, 4.1, 4.2
+and 4.3. As in a browser build, each skeleton is read by the runtime of the
+version it was exported from, so a project can mix versions. The Spine version
+in Project Settings is only a preference.
-The Spine version in Project Settings is a preference; the skeleton files decide.
-When you package for Android, iOS or the desktop, the export reads the version
-of every skeleton it ships and compares it with the version the installed
-template links. The app is still assembled, since the rest of the game runs,
-but the export's warnings name every skeleton that will not play in it and the
-template build that would play it. Project Settings → Spine also shows which
-version each installed template links.
+The runtimes define the same C names, so the host compiles each one under its
+own prefix and links them side by side. On Android each version is a separate
+library (0.2 to 1 MB per ABI). The export reads the version of every skeleton
+it packages and includes only the libraries those skeletons need. On iOS and
+the desktop all versions are linked into the app, which adds about 1 MB.
-To ship skeletons of another version, build the template yourself with that
-runtime linked:
-
-```bash
-node build-tools/cli.js native --target android --spine 3.8
-```
-
-`--target` is `android`, `ios`, `windows`, `macos` or `linux`. The build
-installs the template for this editor version, and its `template.json` records
-the version the host linked. One project can only use one Spine version
-natively: skeletons from two versions have to be exported again from one.
+A runtime template from an older release carries a single Spine version. If
+you package with one, the export lists every skeleton the template cannot
+play. Install this editor version's template from Package Project to fix it.
If a future build ever *does* drop a subsystem, the export names it — with the
scenes that use it — instead of quietly shipping a package missing half a scene.
diff --git a/docs/astro/src/content/docs/zh-cn/publishing/android-ios.mdx b/docs/astro/src/content/docs/zh-cn/publishing/android-ios.mdx
index 1293d2dcd..d6ecbba19 100644
--- a/docs/astro/src/content/docs/zh-cn/publishing/android-ios.mdx
+++ b/docs/astro/src/content/docs/zh-cn/publishing/android-ios.mdx
@@ -171,7 +171,7 @@ Android 的下限是 29,因为引擎的字体路径调用 `AFontMatcher_create`,
| 精灵、瓦片地图、粒子、后处理 | 原生(Dawn) |
| 文本、位图字体、富文本 | 与网页端相同的图集与排版;字形从系统字体栅格化 |
| 物理(Box2D) | 编译进包;跨工作线程求解 |
-| Spine | 编译进包——每个二进制一个运行时版本;见 [Spine 版本](#spine-版本) |
+| Spine | 编译进包——全部版本,每个骨架由自己的版本读取;见 [Spine 版本](#spine-版本) |
| DragonBones | 编译进包——只有一个运行时,因为格式是固定的 |
| 视频 | 编译进包(构建时 cook,真机解码) |
| 音频 | 原生混音器([miniaudio](https://miniaud.io/))—— CoreAudio / AAudio |
@@ -183,23 +183,16 @@ Android 的下限是 29,因为引擎的字体路径调用 `AFontMatcher_create`,
### Spine 版本
-网页构建会为骨架导出时所用的每个 Spine 版本各带一个运行时。原生应用做不到:所有内置的
-Spine 运行时(2.1、3.8、4.1、4.2、4.3)导出的符号相同,所以一个宿主二进制只能链接**一个**。
-官方运行时模板链接的是 **4.2**。
+原生应用和编辑器一样能读取所有 Spine 版本:2.1、3.8、4.1、4.2 和 4.3。和网页构建一样,
+每个骨架都由它导出时所用版本的运行时来读取,所以一个项目里可以混用多个版本。
+项目设置里的 Spine 版本只是偏好。
-项目设置里的 Spine 版本只是偏好,真正起决定作用的是骨架文件。打 Android、iOS 或桌面包时,
-导出会读取每个要打包的骨架的版本,和已安装模板链接的版本比对。应用照常组装(游戏其余部分能正常运行),
-但导出警告会点名每个在这个包里播放不了的骨架,并说明需要哪种模板才能播放。项目设置 → Spine 也会显示每个已安装模板链接的版本。
+各版本运行时的 C 符号同名,所以宿主把每个版本加上各自的前缀分别编译,再链接到一起。
+Android 上每个版本是一个单独的库(每个 ABI 0.2 到 1 MB)。导出时会读取每个要打包的骨架的版本,
+只放入这些骨架需要的库。iOS 和桌面端把所有版本都链接进应用,大约增加 1 MB。
-要打包其他版本的骨架,用对应运行时自行编译模板:
-
-```bash
-node build-tools/cli.js native --target android --spine 3.8
-```
-
-`--target` 可以是 `android`、`ios`、`windows`、`macos` 或 `linux`。编译会为当前编辑器版本安装模板,
-模板的 `template.json` 记录宿主实际链接的版本。一个项目在原生端只能用一个 Spine 版本:
-来自两个版本的骨架需要用同一个版本重新导出。
+旧版本的运行时模板只编入一个 Spine 版本。如果用旧模板打包,导出会列出模板播放不了的每个骨架。
+在“打包项目”里安装当前编辑器版本的模板即可解决。
万一将来某个构建*真的*砍掉了某个子系统,导出会点名它——连同用到它的场景——
而不是悄悄发出一个缺了半个场景的包。
diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt
index da5307f34..f4d4e895a 100644
--- a/native/CMakeLists.txt
+++ b/native/CMakeLists.txt
@@ -143,46 +143,107 @@ target_compile_features(jolt PUBLIC cxx_std_17)
target_compile_definitions(jolt PUBLIC JPH_USE_CPU_COMPUTE)
es_silence_warnings(jolt)
-# The Spine runtime: the vendored release plus the module's entry points, compiled
-# into the host. Every runtime backend exports the same symbol names, so a binary
-# carries exactly ONE — which is why the web ships a module per version and a native
-# app picks at build time. `spine_runtimeVersion()` reports the choice, and the SDK's
-# acquirer answers only that version's id.
+# The Spine runtimes: every vendored release, each with the module's entry points,
+# side by side in one host — as the web carries a side module per version, so a
+# skeleton is read by the runtime it was exported from whatever the project
+# setting says (#115).
#
-# Which backend goes with which release is the tree's shape, exactly as the web build
-# reads it (es_add_spine_module in cmake/Emscripten.cmake): 3.8 - 4.2 vendor the pure-C
-# runtime nested a level deep, 2.1 the same runtime flat and in a dialect of its own,
-# and 4.3 replaced it with a generated wrapper so we bind spine-cpp instead.
-set(ESTELLA_SPINE_VERSION "4.2" CACHE STRING "Spine runtime to link (4.3 / 4.2 / 4.1 / 3.8 / 2.1)")
-set(SPINE_ROOT "${TP}/spine-runtimes-${ESTELLA_SPINE_VERSION}")
-if(EXISTS "${SPINE_ROOT}/spine-c/spine-c/include")
- set(SPINE_BACKEND "${SRC}/esengine/bindings/modules/spine/SpineRuntimeC.cpp")
- set(SPINE_INCLUDE "${SPINE_ROOT}/spine-c/spine-c/include")
- file(GLOB SPINE_SOURCES "${SPINE_ROOT}/spine-c/spine-c/src/spine/*.c")
-elseif(EXISTS "${SPINE_ROOT}/spine-cpp/include")
- set(SPINE_BACKEND "${SRC}/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp")
- set(SPINE_INCLUDE "${SPINE_ROOT}/spine-cpp/include")
- file(GLOB SPINE_SOURCES "${SPINE_ROOT}/spine-cpp/src/spine/*.cpp")
-elseif(EXISTS "${SPINE_ROOT}/spine-c/include/spine")
- set(SPINE_BACKEND "${SRC}/esengine/bindings/modules/spine/SpineRuntime21.cpp")
- set(SPINE_INCLUDE "${SPINE_ROOT}/spine-c/include")
- file(GLOB SPINE_SOURCES "${SPINE_ROOT}/spine-c/src/spine/*.c")
-else()
- message(FATAL_ERROR "Spine runtime ${ESTELLA_SPINE_VERSION} not vendored at ${SPINE_ROOT}. "
- "Pass -DESTELLA_SPINE_VERSION=<4.3|4.2|4.1|3.8|2.1>.")
+# The releases define the same names, so each is compiled apart:
+# - spine-c (2.1 / 3.8 / 4.1 / 4.2) with native/spine/SpineCRename<tag>.hpp
+# force-included, prefixing every C symbol it defines or expects from the
+# backend (tools/spine-c-rename.mjs reads them off the compiled objects);
+# spine-cpp (4.3) lives in namespace spine and needs none;
+# - the backend in namespace es::spine<tag> (ES_SPINE_NS);
+# - the spine_* entry points renamed spine<tag>_* by the header EHT writes
+# beside their wrappers (build-tools/tasks/native.js), which register them as
+# es_spine<tag>_*: the names sdk/src/ecs/bridge/nativeSideModules.ts asks for.
+#
+# ESTELLA_SPINE_VERSIONS narrows the set (a size experiment, a missing submodule);
+# the template records what was linked, and an export warns about a skeleton of a
+# release it does not carry.
+if(NOT ESTELLA_NATIVE_GEN_DIR)
+ set(ESTELLA_NATIVE_GEN_DIR "${CMAKE_BINARY_DIR}/gen")
endif()
-
-add_library(spine_runtime STATIC ${SPINE_SOURCES})
-target_include_directories(spine_runtime PUBLIC "${SPINE_INCLUDE}")
-es_silence_warnings(spine_runtime)
-
-string(REPLACE "." "" SPINE_TAG ${ESTELLA_SPINE_VERSION})
-add_library(estella_spine STATIC
- "${SRC}/esengine/bindings/modules/spine/SpineModuleEntry.cpp"
- "${SPINE_BACKEND}")
-target_include_directories(estella_spine PUBLIC "${SRC}")
-target_link_libraries(estella_spine PUBLIC spine_runtime)
-target_compile_definitions(estella_spine PRIVATE ES_SPINE_VERSION=${SPINE_TAG})
+file(GLOB _spine_trees LIST_DIRECTORIES true "${TP}/spine-runtimes-*")
+set(_spine_vendored "")
+foreach(_tree IN LISTS _spine_trees)
+ get_filename_component(_name "${_tree}" NAME)
+ string(REPLACE "spine-runtimes-" "" _v "${_name}")
+ list(APPEND _spine_vendored "${_v}")
+endforeach()
+set(ESTELLA_SPINE_VERSIONS "${_spine_vendored}" CACHE STRING
+ "Spine releases the host carries, ;-separated (default: every vendored one)")
+set(ESTELLA_SPINE_TARGETS "")
+set(ESTELLA_SPINE_RUNTIMES "")
+set(ESTELLA_SPINE_FN_BINDINGS "")
+foreach(_v IN LISTS ESTELLA_SPINE_VERSIONS)
+ set(_root "${TP}/spine-runtimes-${_v}")
+ string(REPLACE "." "" _tag "${_v}")
+ set(_c_rename "")
+ if(EXISTS "${_root}/spine-c/spine-c/include")
+ set(_backend "${SRC}/esengine/bindings/modules/spine/SpineRuntimeC.cpp")
+ set(_inc "${_root}/spine-c/spine-c/include")
+ file(GLOB _sources "${_root}/spine-c/spine-c/src/spine/*.c")
+ set(_c_rename "${CMAKE_CURRENT_SOURCE_DIR}/spine/SpineCRename${_tag}.hpp")
+ elseif(EXISTS "${_root}/spine-cpp/include")
+ set(_backend "${SRC}/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp")
+ set(_inc "${_root}/spine-cpp/include")
+ file(GLOB _sources "${_root}/spine-cpp/src/spine/*.cpp")
+ elseif(EXISTS "${_root}/spine-c/include/spine")
+ set(_backend "${SRC}/esengine/bindings/modules/spine/SpineRuntime21.cpp")
+ set(_inc "${_root}/spine-c/include")
+ file(GLOB _sources "${_root}/spine-c/src/spine/*.c")
+ set(_c_rename "${CMAKE_CURRENT_SOURCE_DIR}/spine/SpineCRename${_tag}.hpp")
+ else()
+ message(FATAL_ERROR "Spine runtime ${_v} not vendored at ${_root} "
+ "(ESTELLA_SPINE_VERSIONS=${ESTELLA_SPINE_VERSIONS}).")
+ endif()
+ if(_c_rename AND NOT EXISTS "${_c_rename}")
+ message(FATAL_ERROR "Missing ${_c_rename} — run `node tools/spine-c-rename.mjs`.")
+ endif()
+ set(_fn_rename "${ESTELLA_NATIVE_GEN_DIR}/SpineRename${_tag}.generated.hpp")
+
+ # PRIVATE includes throughout: every release has its own spine/spine.h.
+ add_library(spine_runtime_${_tag} STATIC ${_sources})
+ target_include_directories(spine_runtime_${_tag} PRIVATE "${_inc}")
+ es_silence_warnings(spine_runtime_${_tag})
+
+ add_library(estella_spine_${_tag} STATIC
+ "${SRC}/esengine/bindings/modules/spine/SpineModuleEntry.cpp" "${_backend}")
+ target_include_directories(estella_spine_${_tag} PUBLIC "${SRC}" PRIVATE "${_inc}")
+ target_link_libraries(estella_spine_${_tag} PUBLIC spine_runtime_${_tag})
+ target_compile_definitions(estella_spine_${_tag} PRIVATE
+ ES_SPINE_VERSION=${_tag} ES_SPINE_NS=spine${_tag})
+ foreach(_header IN ITEMS "${_c_rename}" "${_fn_rename}")
+ if(NOT _header)
+ continue()
+ endif()
+ if(MSVC)
+ set(_fi "/FI${_header}")
+ else()
+ set(_fi "SHELL:-include \"${_header}\"")
+ endif()
+ target_compile_options(estella_spine_${_tag} PRIVATE "${_fi}")
+ if(_header STREQUAL _c_rename)
+ target_compile_options(spine_runtime_${_tag} PRIVATE "${_fi}")
+ endif()
+ endforeach()
+
+ list(APPEND ESTELLA_SPINE_TARGETS estella_spine_${_tag})
+ list(APPEND ESTELLA_SPINE_RUNTIMES spine_runtime_${_tag})
+ list(APPEND ESTELLA_SPINE_FN_BINDINGS "${ESTELLA_NATIVE_GEN_DIR}/SpineFunctionBindings${_tag}.generated.cpp")
+ string(APPEND _spine_tag_list " X(${_tag})")
+endforeach()
+# The releases this host was built with, for host/Runtime.cpp to register (or, on
+# Android, to look for as libraries): ES_SPINE_TAGS(X) expands X(38) X(42) ….
+file(WRITE "${ESTELLA_NATIVE_GEN_DIR}/SpineTags.generated.hpp.in"
+ "// Generated by native/CMakeLists.txt — the Spine releases this host carries.
+"
+ "#pragma once
+#define ES_SPINE_TAGS(X)${_spine_tag_list}
+")
+configure_file("${ESTELLA_NATIVE_GEN_DIR}/SpineTags.generated.hpp.in"
+ "${ESTELLA_NATIVE_GEN_DIR}/SpineTags.generated.hpp" COPYONLY)
# DragonBones: the same two TUs the web links as the "dragonbones" side module,
# over the vendored core. One runtime, not one per version — the format is frozen,
@@ -481,12 +542,17 @@ if(ESTELLA_QUICKJS_DIR)
host/media/audio_spectrum.cpp PROPERTIES
COMPILE_OPTIONS "-x;objective-c++")
target_link_libraries(estella_js_host esengine estella_physics estella_physics3d
- estella_video estella_spine
+ estella_video ${ESTELLA_SPINE_TARGETS}
estella_dragonbones esjs_engine
"-framework UIKit" "-framework QuartzCore" "-framework Foundation"
"-framework CoreMotion" "-framework CoreHaptics"
"-framework AVFoundation" "-framework CoreAudio" "-framework AudioToolbox"
"-framework CoreText" "-framework CoreGraphics")
+ target_sources(estella_js_host PRIVATE ${ESTELLA_SPINE_FN_BINDINGS})
+ set(_spine_archives "")
+ foreach(_t IN LISTS ESTELLA_SPINE_TARGETS ESTELLA_SPINE_RUNTIMES)
+ list(APPEND _spine_archives "$<TARGET_FILE:${_t}>")
+ endforeach()
# Merge host + engine + deps + Dawn into ONE archive, so the Xcode app is a
# thin shell that links a single library at a fixed path (native/ios).
add_custom_command(TARGET estella_js_host POST_BUILD
@@ -495,7 +561,7 @@ if(ESTELLA_QUICKJS_DIR)
$<TARGET_FILE:estella_physics> $<TARGET_FILE:box2d>
$<TARGET_FILE:estella_physics3d> $<TARGET_FILE:jolt>
$<TARGET_FILE:estella_video>
- $<TARGET_FILE:estella_spine> $<TARGET_FILE:spine_runtime>
+ ${_spine_archives}
$<TARGET_FILE:estella_dragonbones> $<TARGET_FILE:dragonbones_runtime>
$<TARGET_FILE:qjs> $<TARGET_FILE:yogacore> "${ESTELLA_DAWN_LIB}"
COMMENT "Merging the iOS host, engine and Dawn into libestella_ios.a")
@@ -518,7 +584,8 @@ if(ESTELLA_QUICKJS_DIR)
set_target_properties(estella_js_host PROPERTIES OUTPUT_NAME estella_desktop)
target_compile_definitions(estella_js_host PRIVATE ESTELLA_DESKTOP)
target_link_libraries(estella_js_host esengine estella_physics estella_physics3d
- estella_video estella_spine estella_dragonbones esjs_engine SDL3::SDL3)
+ estella_video ${ESTELLA_SPINE_TARGETS} estella_dragonbones esjs_engine SDL3::SDL3)
+ target_sources(estella_js_host PRIVATE ${ESTELLA_SPINE_FN_BINDINGS})
if(TARGET estella_physics3d_physx)
# Linked in: a desktop app's size is not a download a player waits on
# the way a phone's is, and an executable cannot be linked against
@@ -574,8 +641,23 @@ if(ESTELLA_QUICKJS_DIR)
# link libs). native_audio.cpp's Obj-C paths are __APPLE__-guarded out.
add_library(estella_js_host SHARED ${HOST_SOURCES} host/platform/android.cpp host/platform/android_device.cpp)
target_link_libraries(estella_js_host esengine estella_physics estella_physics3d
- estella_video estella_spine
- estella_dragonbones esjs_engine native_app_glue android log)
+ estella_video estella_dragonbones esjs_engine native_app_glue android log)
+ # Each Spine release a library of its own, as PhysX is below: a package
+ # carries only the releases its skeletons were exported from (the export
+ # reads them), the template keeps them under plugins/, and the host dlopens
+ # whichever of libestella_spine<tag>.so the package has (host/Runtime.cpp).
+ foreach(_spine IN LISTS ESTELLA_SPINE_TARGETS)
+ string(REPLACE "estella_spine_" "" _tag "${_spine}")
+ add_library(estella_spine${_tag} SHARED
+ "${ESTELLA_NATIVE_GEN_DIR}/SpineFunctionBindings${_tag}.generated.cpp"
+ host/plugins/spine_plugin.cpp)
+ target_link_libraries(estella_spine${_tag} PRIVATE ${_spine} estella_js_host)
+ target_include_directories(estella_spine${_tag} PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/host" "${ESTELLA_NATIVE_GEN_DIR}"
+ $<TARGET_PROPERTY:esengine,INTERFACE_INCLUDE_DIRECTORIES>)
+ target_compile_definitions(estella_spine${_tag} PRIVATE ES_SPINE_TAG=${_tag}
+ $<TARGET_PROPERTY:esengine,INTERFACE_COMPILE_DEFINITIONS>)
+ endforeach()
if(TARGET estella_physics3d_physx)
# A library of its own, so a package carries it only when its project
# picked PhysX (4.9 MB per ABI): the template keeps it under plugins/,
diff --git a/native/README.md b/native/README.md
index 1d0c8a0e0..49d5ee6f6 100644
--- a/native/README.md
+++ b/native/README.md
@@ -92,14 +92,21 @@ their binding headers. `app.sideModules` still answers them, so the runtime's ow
gating installs physics or spine exactly as it does in a browser (see
`sdk/src/ecs/nativeSideModules.ts`).
-Spine is the one build-time choice: the vendored runtimes (2.1 / 3.8 / 4.1 / 4.2 / 4.3)
-export the same symbol names, so a binary carries exactly one.
-`node build-tools/cli.js native --spine 4.1` (or `-DESTELLA_SPINE_VERSION=4.1`) picks
-another, and the template's `template.json` records what the build linked, read from
-its CMake cache; an export names each skeleton of another version in its warnings.
-`spine_runtimeVersion()` reports what was linked at runtime, and content authored
-against a different release is told so by name
-instead of being decoded by the wrong parser. Which runtime backend a release uses
+Spine is the one subsystem with several releases (2.1 / 3.8 / 4.1 / 4.2 / 4.3), and
+the host carries them all, as the web carries a side module per release: a skeleton
+is read by the runtime it was exported from. The releases define the same names, so
+each is compiled apart: spine-c with `native/spine/SpineCRename<tag>.hpp`
+force-included (every C name it defines, prefixed `es<tag>_`, read off its compiled
+objects by `tools/spine-c-rename.mjs`), the backend in namespace `es::spine<tag>`,
+and the `spine_*` entry points renamed `spine<tag>_*` and wrapped as
+`es_spine<tag>_*`. Desktop and iOS link every release into the host. Android builds
+one `libestella_spine<tag>.so` per release, and a package carries only the ones its
+skeletons need. After a build, `node tools/spine-c-rename.mjs --verify <build dir>`
+reads the libraries and fails if any Spine name escaped its prefix, because such a
+name would bind one release's call to another's code without a link error.
+`--spine 3.8,4.2` narrows the set, and the template's `template.json` records what
+was linked.
+Which runtime backend a release uses
follows from its tree: 3.8 through 4.2 vendor the pure-C runtime, 2.1 vendors it flat
and in a dialect old enough to warrant its own backend, and 4.3 replaced it with a
generated wrapper, so that one binds spine-cpp (and picks up spine's own
diff --git a/native/host/Runtime.cpp b/native/host/Runtime.cpp
index 976879491..66cad2187 100644
--- a/native/host/Runtime.cpp
+++ b/native/host/Runtime.cpp
@@ -28,7 +28,9 @@
#include "esengine_bundle.h" // the real SDK, bundled: installs globalThis.ESEngine
#include "host_bootstrap.h" // bootstrap.js, embedded
-#if defined(__ANDROID__) && !defined(ES_ENABLE_PHYSX)
+#include "SpineTags.generated.hpp" // ES_SPINE_TAGS(X): the Spine releases this host carries
+
+#if defined(__ANDROID__)
#include <dlfcn.h>
#endif
@@ -46,6 +48,15 @@ using namespace esengine;
// only a PhysX project's package carries (see loadPhysXLibrary).
void esn_register_functions_physx3d(esjs::Val global);
+// Every Spine release this host was built with, each under its own prefix
+// (es_spine38_*, es_spine42_*; native/CMakeLists.txt). Linked in everywhere but
+// Android, where each is a library a package carries only if its skeletons need it.
+#if !defined(__ANDROID__)
+#define ES_SPINE_DECLARE(tag) void esn_register_functions_spine##tag(esjs::Val global);
+ES_SPINE_TAGS(ES_SPINE_DECLARE)
+#undef ES_SPINE_DECLARE
+#endif
+
namespace eshost {
// =============================================================================
@@ -136,6 +147,37 @@ void loadPhysXLibrary(esjs::Val global) {
}
#endif
+#if defined(__ANDROID__)
+/**
+ * The Spine releases this package carries. The export packs libestella_spine<tag>.so
+ * into lib/<abi>/ for each release the project's skeletons were exported from, and
+ * the app's linker namespace finds it by its bare name; a release no skeleton uses
+ * is simply not there, which is the normal case, not an error.
+ */
+void loadSpineLibrary(esjs::Val global, const char* file) {
+ void* lib = dlopen(file, RTLD_NOW | RTLD_LOCAL);
+ if (lib == nullptr) return;
+ using Register = void (*)(esjs::Val*);
+ auto reg = reinterpret_cast<Register>(dlsym(lib, "estella_spine_register"));
+ if (reg == nullptr) {
+ ESHOST_LOGE("%s has no estella_spine_register: %s", file, dlerror());
+ return;
+ }
+ reg(&global);
+ ESHOST_LOGI("Spine loaded (%s)", file);
+}
+#endif
+
+void registerSpine(esjs::Val global) {
+#if defined(__ANDROID__)
+#define ES_SPINE_REGISTER(tag) loadSpineLibrary(global, "libestella_spine" #tag ".so");
+#else
+#define ES_SPINE_REGISTER(tag) esn_register_functions_spine##tag(global);
+#endif
+ ES_SPINE_TAGS(ES_SPINE_REGISTER)
+#undef ES_SPINE_REGISTER
+}
+
esjs::Val consoleWrite(const esjs::Args& a, bool error) {
std::string line;
for (int i = 0; i < a.size(); ++i) {
@@ -403,6 +445,7 @@ void initRuntime(HostState& h) {
// from, so the SDK reaches the engine by the same names on either platform.
esn_register(global);
esn_register_functions(global);
+ registerSpine(global);
#if defined(ES_ENABLE_PHYSX)
esn_register_functions_physx3d(global);
#elif defined(__ANDROID__)
diff --git a/native/host/plugins/spine_plugin.cpp b/native/host/plugins/spine_plugin.cpp
new file mode 100644
index 000000000..f41b4225b
--- /dev/null
+++ b/native/host/plugins/spine_plugin.cpp
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
+/**
+ * @file spine_plugin.cpp
+ * @brief libestella_spine<tag>.so's one entry point: register one Spine release.
+ * @details On Android each vendored Spine release is a library of its own, and a
+ * package carries only the releases its skeletons were exported from
+ * (pipeline/src/export/exportGame.ts). The host dlopens every one the
+ * package has and calls this with the JS global object
+ * (native/host/Runtime.cpp, loadSpineLibraries). The wrappers it registers
+ * (es_spine<tag>_*) are generated from the same declarations as the web's
+ * spine_* exports, and reach the heap through the host library this one
+ * links against. Built once per release, with ES_SPINE_TAG naming it.
+ */
+#include "esn_shim.hpp"
+
+#define ES_SPINE_CAT_(a, b) a##b
+#define ES_SPINE_CAT(a, b) ES_SPINE_CAT_(a, b)
+#define ES_SPINE_REGISTER ES_SPINE_CAT(esn_register_functions_spine, ES_SPINE_TAG)
+
+void ES_SPINE_REGISTER(esjs::Val global);
+
+extern "C" __attribute__((visibility("default"))) void estella_spine_register(esjs::Val* global) {
+ ES_SPINE_REGISTER(*global);
+}
diff --git a/native/spine/SpineCRename21.hpp b/native/spine/SpineCRename21.hpp
new file mode 100644
index 000000000..a290dddde
--- /dev/null
+++ b/native/spine/SpineCRename21.hpp
@@ -0,0 +1,220 @@
+// Generated by tools/spine-c-rename.mjs from the compiled spine-c 2.1 objects — DO NOT EDIT.
+// Force-included into spine-c 2.1 and the engine's backend for it, so that
+// release links beside the others in one native host (native/CMakeLists.txt).
+#pragma once
+
+#define Json_create es21_Json_create
+#define Json_dispose es21_Json_dispose
+#define Json_getError es21_Json_getError
+#define Json_getFloat es21_Json_getFloat
+#define Json_getInt es21_Json_getInt
+#define Json_getItem es21_Json_getItem
+#define Json_getString es21_Json_getString
+#define _Entry_create es21__Entry_create
+#define _Entry_dispose es21__Entry_dispose
+#define _FromEntry_create es21__FromEntry_create
+#define _FromEntry_dispose es21__FromEntry_dispose
+#define _ToEntry_create es21__ToEntry_create
+#define _ToEntry_dispose es21__ToEntry_dispose
+#define _calloc es21__calloc
+#define _free es21__free
+#define _malloc es21__malloc
+#define _readFile es21__readFile
+#define _setDebugMalloc es21__setDebugMalloc
+#define _setFree es21__setFree
+#define _setMalloc es21__setMalloc
+#define _spAnimationState_createTrackEntry es21__spAnimationState_createTrackEntry
+#define _spAnimationState_disposeAllEntries es21__spAnimationState_disposeAllEntries
+#define _spAnimationState_disposeTrackEntry es21__spAnimationState_disposeTrackEntry
+#define _spAnimationState_expandToIndex es21__spAnimationState_expandToIndex
+#define _spAnimationState_setCurrent es21__spAnimationState_setCurrent
+#define _spAtlasAttachmentLoader_newAttachment es21__spAtlasAttachmentLoader_newAttachment
+#define _spAtlasPage_createTexture es21__spAtlasPage_createTexture
+#define _spAtlasPage_disposeTexture es21__spAtlasPage_disposeTexture
+#define _spAttachmentLoader_deinit es21__spAttachmentLoader_deinit
+#define _spAttachmentLoader_init es21__spAttachmentLoader_init
+#define _spAttachmentLoader_setError es21__spAttachmentLoader_setError
+#define _spAttachmentLoader_setUnknownTypeError es21__spAttachmentLoader_setUnknownTypeError
+#define _spAttachmentTimeline_apply es21__spAttachmentTimeline_apply
+#define _spAttachmentTimeline_dispose es21__spAttachmentTimeline_dispose
+#define _spAttachment_deinit es21__spAttachment_deinit
+#define _spAttachment_init es21__spAttachment_init
+#define _spBaseTimeline_create es21__spBaseTimeline_create
+#define _spBaseTimeline_dispose es21__spBaseTimeline_dispose
+#define _spBoundingBoxAttachment_dispose es21__spBoundingBoxAttachment_dispose
+#define _spColorTimeline_apply es21__spColorTimeline_apply
+#define _spCurveTimeline_deinit es21__spCurveTimeline_deinit
+#define _spCurveTimeline_init es21__spCurveTimeline_init
+#define _spDrawOrderTimeline_apply es21__spDrawOrderTimeline_apply
+#define _spDrawOrderTimeline_dispose es21__spDrawOrderTimeline_dispose
+#define _spEventTimeline_apply es21__spEventTimeline_apply
+#define _spEventTimeline_dispose es21__spEventTimeline_dispose
+#define _spFFDTimeline_apply es21__spFFDTimeline_apply
+#define _spFFDTimeline_dispose es21__spFFDTimeline_dispose
+#define _spFlipTimeline_apply es21__spFlipTimeline_apply
+#define _spFlipTimeline_dispose es21__spFlipTimeline_dispose
+#define _spIkConstraintTimeline_apply es21__spIkConstraintTimeline_apply
+#define _spMeshAttachment_dispose es21__spMeshAttachment_dispose
+#define _spRegionAttachment_dispose es21__spRegionAttachment_dispose
+#define _spRotateTimeline_apply es21__spRotateTimeline_apply
+#define _spScaleTimeline_apply es21__spScaleTimeline_apply
+#define _spSkeletonJson_setError es21__spSkeletonJson_setError
+#define _spSkinnedMeshAttachment_dispose es21__spSkinnedMeshAttachment_dispose
+#define _spTimeline_deinit es21__spTimeline_deinit
+#define _spTimeline_init es21__spTimeline_init
+#define _spTrackEntry_create es21__spTrackEntry_create
+#define _spTrackEntry_dispose es21__spTrackEntry_dispose
+#define _spTranslateTimeline_apply es21__spTranslateTimeline_apply
+#define _spUtil_readFile es21__spUtil_readFile
+#define spAnimationStateData_create es21_spAnimationStateData_create
+#define spAnimationStateData_dispose es21_spAnimationStateData_dispose
+#define spAnimationStateData_getMix es21_spAnimationStateData_getMix
+#define spAnimationStateData_setMix es21_spAnimationStateData_setMix
+#define spAnimationStateData_setMixByName es21_spAnimationStateData_setMixByName
+#define spAnimationState_addAnimation es21_spAnimationState_addAnimation
+#define spAnimationState_addAnimationByName es21_spAnimationState_addAnimationByName
+#define spAnimationState_apply es21_spAnimationState_apply
+#define spAnimationState_clearTrack es21_spAnimationState_clearTrack
+#define spAnimationState_clearTracks es21_spAnimationState_clearTracks
+#define spAnimationState_create es21_spAnimationState_create
+#define spAnimationState_dispose es21_spAnimationState_dispose
+#define spAnimationState_getCurrent es21_spAnimationState_getCurrent
+#define spAnimationState_setAnimation es21_spAnimationState_setAnimation
+#define spAnimationState_setAnimationByName es21_spAnimationState_setAnimationByName
+#define spAnimationState_update es21_spAnimationState_update
+#define spAnimation_apply es21_spAnimation_apply
+#define spAnimation_create es21_spAnimation_create
+#define spAnimation_dispose es21_spAnimation_dispose
+#define spAnimation_mix es21_spAnimation_mix
+#define spAtlasAttachmentLoader_create es21_spAtlasAttachmentLoader_create
+#define spAtlasPage_create es21_spAtlasPage_create
+#define spAtlasPage_dispose es21_spAtlasPage_dispose
+#define spAtlasRegion_create es21_spAtlasRegion_create
+#define spAtlasRegion_dispose es21_spAtlasRegion_dispose
+#define spAtlas_create es21_spAtlas_create
+#define spAtlas_createFromFile es21_spAtlas_createFromFile
+#define spAtlas_dispose es21_spAtlas_dispose
+#define spAtlas_findRegion es21_spAtlas_findRegion
+#define spAttachmentLoader_dispose es21_spAttachmentLoader_dispose
+#define spAttachmentLoader_newAttachment es21_spAttachmentLoader_newAttachment
+#define spAttachmentTimeline_create es21_spAttachmentTimeline_create
+#define spAttachmentTimeline_setFrame es21_spAttachmentTimeline_setFrame
+#define spAttachment_dispose es21_spAttachment_dispose
+#define spBoneData_create es21_spBoneData_create
+#define spBoneData_dispose es21_spBoneData_dispose
+#define spBone_create es21_spBone_create
+#define spBone_dispose es21_spBone_dispose
+#define spBone_isYDown es21_spBone_isYDown
+#define spBone_localToWorld es21_spBone_localToWorld
+#define spBone_setToSetupPose es21_spBone_setToSetupPose
+#define spBone_setYDown es21_spBone_setYDown
+#define spBone_updateWorldTransform es21_spBone_updateWorldTransform
+#define spBone_worldToLocal es21_spBone_worldToLocal
+#define spBoundingBoxAttachment_computeWorldVertices es21_spBoundingBoxAttachment_computeWorldVertices
+#define spBoundingBoxAttachment_create es21_spBoundingBoxAttachment_create
+#define spColorTimeline_create es21_spColorTimeline_create
+#define spColorTimeline_setFrame es21_spColorTimeline_setFrame
+#define spCurveTimeline_getCurvePercent es21_spCurveTimeline_getCurvePercent
+#define spCurveTimeline_setCurve es21_spCurveTimeline_setCurve
+#define spCurveTimeline_setLinear es21_spCurveTimeline_setLinear
+#define spCurveTimeline_setStepped es21_spCurveTimeline_setStepped
+#define spDrawOrderTimeline_create es21_spDrawOrderTimeline_create
+#define spDrawOrderTimeline_setFrame es21_spDrawOrderTimeline_setFrame
+#define spEventData_create es21_spEventData_create
+#define spEventData_dispose es21_spEventData_dispose
+#define spEventTimeline_create es21_spEventTimeline_create
+#define spEventTimeline_setFrame es21_spEventTimeline_setFrame
+#define spEvent_create es21_spEvent_create
+#define spEvent_dispose es21_spEvent_dispose
+#define spFFDTimeline_create es21_spFFDTimeline_create
+#define spFFDTimeline_setFrame es21_spFFDTimeline_setFrame
+#define spFlipTimeline_create es21_spFlipTimeline_create
+#define spFlipTimeline_setFrame es21_spFlipTimeline_setFrame
+#define spIkConstraintData_create es21_spIkConstraintData_create
+#define spIkConstraintData_dispose es21_spIkConstraintData_dispose
+#define spIkConstraintTimeline_create es21_spIkConstraintTimeline_create
+#define spIkConstraintTimeline_setFrame es21_spIkConstraintTimeline_setFrame
+#define spIkConstraint_apply es21_spIkConstraint_apply
+#define spIkConstraint_apply1 es21_spIkConstraint_apply1
+#define spIkConstraint_apply2 es21_spIkConstraint_apply2
+#define spIkConstraint_create es21_spIkConstraint_create
+#define spIkConstraint_dispose es21_spIkConstraint_dispose
+#define spMeshAttachment_computeWorldVertices es21_spMeshAttachment_computeWorldVertices
+#define spMeshAttachment_create es21_spMeshAttachment_create
+#define spMeshAttachment_updateUVs es21_spMeshAttachment_updateUVs
+#define spPolygon_containsPoint es21_spPolygon_containsPoint
+#define spPolygon_create es21_spPolygon_create
+#define spPolygon_dispose es21_spPolygon_dispose
+#define spPolygon_intersectsSegment es21_spPolygon_intersectsSegment
+#define spRegionAttachment_computeWorldVertices es21_spRegionAttachment_computeWorldVertices
+#define spRegionAttachment_create es21_spRegionAttachment_create
+#define spRegionAttachment_setUVs es21_spRegionAttachment_setUVs
+#define spRegionAttachment_updateOffset es21_spRegionAttachment_updateOffset
+#define spRotateTimeline_create es21_spRotateTimeline_create
+#define spRotateTimeline_setFrame es21_spRotateTimeline_setFrame
+#define spScaleTimeline_create es21_spScaleTimeline_create
+#define spScaleTimeline_setFrame es21_spScaleTimeline_setFrame
+#define spSkeletonBounds_aabbContainsPoint es21_spSkeletonBounds_aabbContainsPoint
+#define spSkeletonBounds_aabbIntersectsSegment es21_spSkeletonBounds_aabbIntersectsSegment
+#define spSkeletonBounds_aabbIntersectsSkeleton es21_spSkeletonBounds_aabbIntersectsSkeleton
+#define spSkeletonBounds_containsPoint es21_spSkeletonBounds_containsPoint
+#define spSkeletonBounds_create es21_spSkeletonBounds_create
+#define spSkeletonBounds_dispose es21_spSkeletonBounds_dispose
+#define spSkeletonBounds_getPolygon es21_spSkeletonBounds_getPolygon
+#define spSkeletonBounds_intersectsSegment es21_spSkeletonBounds_intersectsSegment
+#define spSkeletonBounds_update es21_spSkeletonBounds_update
+#define spSkeletonData_create es21_spSkeletonData_create
+#define spSkeletonData_dispose es21_spSkeletonData_dispose
+#define spSkeletonData_findAnimation es21_spSkeletonData_findAnimation
+#define spSkeletonData_findBone es21_spSkeletonData_findBone
+#define spSkeletonData_findBoneIndex es21_spSkeletonData_findBoneIndex
+#define spSkeletonData_findEvent es21_spSkeletonData_findEvent
+#define spSkeletonData_findIkConstraint es21_spSkeletonData_findIkConstraint
+#define spSkeletonData_findSkin es21_spSkeletonData_findSkin
+#define spSkeletonData_findSlot es21_spSkeletonData_findSlot
+#define spSkeletonData_findSlotIndex es21_spSkeletonData_findSlotIndex
+#define spSkeletonJson_create es21_spSkeletonJson_create
+#define spSkeletonJson_createWithLoader es21_spSkeletonJson_createWithLoader
+#define spSkeletonJson_dispose es21_spSkeletonJson_dispose
+#define spSkeletonJson_readSkeletonData es21_spSkeletonJson_readSkeletonData
+#define spSkeletonJson_readSkeletonDataFile es21_spSkeletonJson_readSkeletonDataFile
+#define spSkeleton_create es21_spSkeleton_create
+#define spSkeleton_dispose es21_spSkeleton_dispose
+#define spSkeleton_findBone es21_spSkeleton_findBone
+#define spSkeleton_findBoneIndex es21_spSkeleton_findBoneIndex
+#define spSkeleton_findIkConstraint es21_spSkeleton_findIkConstraint
+#define spSkeleton_findSlot es21_spSkeleton_findSlot
+#define spSkeleton_findSlotIndex es21_spSkeleton_findSlotIndex
+#define spSkeleton_getAttachmentForSlotIndex es21_spSkeleton_getAttachmentForSlotIndex
+#define spSkeleton_getAttachmentForSlotName es21_spSkeleton_getAttachmentForSlotName
+#define spSkeleton_setAttachment es21_spSkeleton_setAttachment
+#define spSkeleton_setBonesToSetupPose es21_spSkeleton_setBonesToSetupPose
+#define spSkeleton_setSkin es21_spSkeleton_setSkin
+#define spSkeleton_setSkinByName es21_spSkeleton_setSkinByName
+#define spSkeleton_setSlotsToSetupPose es21_spSkeleton_setSlotsToSetupPose
+#define spSkeleton_setToSetupPose es21_spSkeleton_setToSetupPose
+#define spSkeleton_update es21_spSkeleton_update
+#define spSkeleton_updateCache es21_spSkeleton_updateCache
+#define spSkeleton_updateWorldTransform es21_spSkeleton_updateWorldTransform
+#define spSkin_addAttachment es21_spSkin_addAttachment
+#define spSkin_attachAll es21_spSkin_attachAll
+#define spSkin_create es21_spSkin_create
+#define spSkin_dispose es21_spSkin_dispose
+#define spSkin_getAttachment es21_spSkin_getAttachment
+#define spSkin_getAttachmentName es21_spSkin_getAttachmentName
+#define spSkinnedMeshAttachment_computeWorldVertices es21_spSkinnedMeshAttachment_computeWorldVertices
+#define spSkinnedMeshAttachment_create es21_spSkinnedMeshAttachment_create
+#define spSkinnedMeshAttachment_updateUVs es21_spSkinnedMeshAttachment_updateUVs
+#define spSlotData_create es21_spSlotData_create
+#define spSlotData_dispose es21_spSlotData_dispose
+#define spSlotData_setAttachmentName es21_spSlotData_setAttachmentName
+#define spSlot_create es21_spSlot_create
+#define spSlot_dispose es21_spSlot_dispose
+#define spSlot_getAttachmentTime es21_spSlot_getAttachmentTime
+#define spSlot_setAttachment es21_spSlot_setAttachment
+#define spSlot_setAttachmentTime es21_spSlot_setAttachmentTime
+#define spSlot_setToSetupPose es21_spSlot_setToSetupPose
+#define spTimeline_apply es21_spTimeline_apply
+#define spTimeline_dispose es21_spTimeline_dispose
+#define spTranslateTimeline_create es21_spTranslateTimeline_create
+#define spTranslateTimeline_setFrame es21_spTranslateTimeline_setFrame
diff --git a/native/spine/SpineCRename38.hpp b/native/spine/SpineCRename38.hpp
new file mode 100644
index 000000000..b25365905
--- /dev/null
+++ b/native/spine/SpineCRename38.hpp
@@ -0,0 +1,525 @@
+// Generated by tools/spine-c-rename.mjs from the compiled spine-c 3.8 objects — DO NOT EDIT.
+// Force-included into spine-c 3.8 and the engine's backend for it, so that
+// release links beside the others in one native host (native/CMakeLists.txt).
+#pragma once
+
+#define Json_create es38_Json_create
+#define Json_dispose es38_Json_dispose
+#define Json_getError es38_Json_getError
+#define Json_getFloat es38_Json_getFloat
+#define Json_getInt es38_Json_getInt
+#define Json_getItem es38_Json_getItem
+#define Json_getString es38_Json_getString
+#define _Entry_create es38__Entry_create
+#define _Entry_dispose es38__Entry_dispose
+#define _FromEntry_create es38__FromEntry_create
+#define _FromEntry_dispose es38__FromEntry_dispose
+#define _ToEntry_create es38__ToEntry_create
+#define _ToEntry_dispose es38__ToEntry_dispose
+#define _clip es38__clip
+#define _spAnimationState_addPropertyID es38__spAnimationState_addPropertyID
+#define _spAnimationState_animationsChanged es38__spAnimationState_animationsChanged
+#define _spAnimationState_applyAttachmentTimeline es38__spAnimationState_applyAttachmentTimeline
+#define _spAnimationState_applyMixingFrom es38__spAnimationState_applyMixingFrom
+#define _spAnimationState_applyRotateTimeline es38__spAnimationState_applyRotateTimeline
+#define _spAnimationState_disableQueue es38__spAnimationState_disableQueue
+#define _spAnimationState_disposeNext es38__spAnimationState_disposeNext
+#define _spAnimationState_disposeTrackEntries es38__spAnimationState_disposeTrackEntries
+#define _spAnimationState_disposeTrackEntry es38__spAnimationState_disposeTrackEntry
+#define _spAnimationState_enableQueue es38__spAnimationState_enableQueue
+#define _spAnimationState_ensureCapacityPropertyIDs es38__spAnimationState_ensureCapacityPropertyIDs
+#define _spAnimationState_expandToIndex es38__spAnimationState_expandToIndex
+#define _spAnimationState_queueEvents es38__spAnimationState_queueEvents
+#define _spAnimationState_resizeTimelinesRotation es38__spAnimationState_resizeTimelinesRotation
+#define _spAnimationState_setCurrent es38__spAnimationState_setCurrent
+#define _spAnimationState_trackEntry es38__spAnimationState_trackEntry
+#define _spAnimationState_updateMixingFrom es38__spAnimationState_updateMixingFrom
+#define _spAtlasAttachmentLoader_createAttachment es38__spAtlasAttachmentLoader_createAttachment
+#define _spAtlasPage_createTexture es38__spAtlasPage_createTexture
+#define _spAtlasPage_disposeTexture es38__spAtlasPage_disposeTexture
+#define _spAttachmentLoader_deinit es38__spAttachmentLoader_deinit
+#define _spAttachmentLoader_init es38__spAttachmentLoader_init
+#define _spAttachmentLoader_setError es38__spAttachmentLoader_setError
+#define _spAttachmentLoader_setUnknownTypeError es38__spAttachmentLoader_setUnknownTypeError
+#define _spAttachmentTimeline_apply es38__spAttachmentTimeline_apply
+#define _spAttachmentTimeline_dispose es38__spAttachmentTimeline_dispose
+#define _spAttachmentTimeline_getPropertyId es38__spAttachmentTimeline_getPropertyId
+#define _spAttachment_deinit es38__spAttachment_deinit
+#define _spAttachment_init es38__spAttachment_init
+#define _spBaseTimeline_create es38__spBaseTimeline_create
+#define _spBaseTimeline_dispose es38__spBaseTimeline_dispose
+#define _spBoundingBoxAttachment_copy es38__spBoundingBoxAttachment_copy
+#define _spBoundingBoxAttachment_dispose es38__spBoundingBoxAttachment_dispose
+#define _spCalloc es38__spCalloc
+#define _spClippingAttachment_copy es38__spClippingAttachment_copy
+#define _spClippingAttachment_dispose es38__spClippingAttachment_dispose
+#define _spColorTimeline_apply es38__spColorTimeline_apply
+#define _spColorTimeline_getPropertyId es38__spColorTimeline_getPropertyId
+#define _spCurveTimeline_binarySearch es38__spCurveTimeline_binarySearch
+#define _spCurveTimeline_deinit es38__spCurveTimeline_deinit
+#define _spCurveTimeline_init es38__spCurveTimeline_init
+#define _spDeformTimeline_apply es38__spDeformTimeline_apply
+#define _spDeformTimeline_dispose es38__spDeformTimeline_dispose
+#define _spDeformTimeline_getPropertyId es38__spDeformTimeline_getPropertyId
+#define _spDrawOrderTimeline_apply es38__spDrawOrderTimeline_apply
+#define _spDrawOrderTimeline_dispose es38__spDrawOrderTimeline_dispose
+#define _spDrawOrderTimeline_getPropertyId es38__spDrawOrderTimeline_getPropertyId
+#define _spEventQueue_addEntry es38__spEventQueue_addEntry
+#define _spEventQueue_addEvent es38__spEventQueue_addEvent
+#define _spEventQueue_addType es38__spEventQueue_addType
+#define _spEventQueue_clear es38__spEventQueue_clear
+#define _spEventQueue_complete es38__spEventQueue_complete
+#define _spEventQueue_create es38__spEventQueue_create
+#define _spEventQueue_dispose es38__spEventQueue_dispose
+#define _spEventQueue_drain es38__spEventQueue_drain
+#define _spEventQueue_end es38__spEventQueue_end
+#define _spEventQueue_ensureCapacity es38__spEventQueue_ensureCapacity
+#define _spEventQueue_event es38__spEventQueue_event
+#define _spEventQueue_free es38__spEventQueue_free
+#define _spEventQueue_interrupt es38__spEventQueue_interrupt
+#define _spEventQueue_start es38__spEventQueue_start
+#define _spEventTimeline_apply es38__spEventTimeline_apply
+#define _spEventTimeline_dispose es38__spEventTimeline_dispose
+#define _spEventTimeline_getPropertyId es38__spEventTimeline_getPropertyId
+#define _spFree es38__spFree
+#define _spIkConstraintTimeline_apply es38__spIkConstraintTimeline_apply
+#define _spIkConstraintTimeline_getPropertyId es38__spIkConstraintTimeline_getPropertyId
+#define _spInternalRandom es38__spInternalRandom
+#define _spJitterVertexEffect_begin es38__spJitterVertexEffect_begin
+#define _spJitterVertexEffect_end es38__spJitterVertexEffect_end
+#define _spJitterVertexEffect_transform es38__spJitterVertexEffect_transform
+#define _spMalloc es38__spMalloc
+#define _spMath_interpolate es38__spMath_interpolate
+#define _spMath_pow2_apply es38__spMath_pow2_apply
+#define _spMath_pow2out_apply es38__spMath_pow2out_apply
+#define _spMath_random es38__spMath_random
+#define _spMath_randomTriangular es38__spMath_randomTriangular
+#define _spMath_randomTriangularWith es38__spMath_randomTriangularWith
+#define _spMeshAttachment_copy es38__spMeshAttachment_copy
+#define _spMeshAttachment_dispose es38__spMeshAttachment_dispose
+#define _spPathAttachment_copy es38__spPathAttachment_copy
+#define _spPathAttachment_dispose es38__spPathAttachment_dispose
+#define _spPathConstraintMixTimeline_apply es38__spPathConstraintMixTimeline_apply
+#define _spPathConstraintMixTimeline_getPropertyId es38__spPathConstraintMixTimeline_getPropertyId
+#define _spPathConstraintPositionTimeline_apply es38__spPathConstraintPositionTimeline_apply
+#define _spPathConstraintPositionTimeline_getPropertyId es38__spPathConstraintPositionTimeline_getPropertyId
+#define _spPathConstraintSpacingTimeline_apply es38__spPathConstraintSpacingTimeline_apply
+#define _spPathConstraintSpacingTimeline_getPropertyId es38__spPathConstraintSpacingTimeline_getPropertyId
+#define _spPointAttachment_copy es38__spPointAttachment_copy
+#define _spPointAttachment_dispose es38__spPointAttachment_dispose
+#define _spRandom es38__spRandom
+#define _spReadFile es38__spReadFile
+#define _spRealloc es38__spRealloc
+#define _spRegionAttachment_copy es38__spRegionAttachment_copy
+#define _spRegionAttachment_dispose es38__spRegionAttachment_dispose
+#define _spRotateTimeline_apply es38__spRotateTimeline_apply
+#define _spRotateTimeline_getPropertyId es38__spRotateTimeline_getPropertyId
+#define _spScaleTimeline_apply es38__spScaleTimeline_apply
+#define _spScaleTimeline_getPropertyId es38__spScaleTimeline_getPropertyId
+#define _spSetDebugMalloc es38__spSetDebugMalloc
+#define _spSetFree es38__spSetFree
+#define _spSetMalloc es38__spSetMalloc
+#define _spSetRandom es38__spSetRandom
+#define _spSetRealloc es38__spSetRealloc
+#define _spShearTimeline_apply es38__spShearTimeline_apply
+#define _spShearTimeline_getPropertyId es38__spShearTimeline_getPropertyId
+#define _spSkeletonBinary_setError es38__spSkeletonBinary_setError
+#define _spSkeletonJson_setError es38__spSkeletonJson_setError
+#define _spSwirlVertexEffect_begin es38__spSwirlVertexEffect_begin
+#define _spSwirlVertexEffect_end es38__spSwirlVertexEffect_end
+#define _spSwirlVertexEffect_transform es38__spSwirlVertexEffect_transform
+#define _spTimeline_deinit es38__spTimeline_deinit
+#define _spTimeline_init es38__spTimeline_init
+#define _spTrackEntry_computeHold es38__spTrackEntry_computeHold
+#define _spTrackEntry_hasTimeline es38__spTrackEntry_hasTimeline
+#define _spTransformConstraintTimeline_apply es38__spTransformConstraintTimeline_apply
+#define _spTransformConstraintTimeline_getPropertyId es38__spTransformConstraintTimeline_getPropertyId
+#define _spTransformConstraint_applyAbsoluteLocal es38__spTransformConstraint_applyAbsoluteLocal
+#define _spTransformConstraint_applyAbsoluteWorld es38__spTransformConstraint_applyAbsoluteWorld
+#define _spTransformConstraint_applyRelativeLocal es38__spTransformConstraint_applyRelativeLocal
+#define _spTransformConstraint_applyRelativeWorld es38__spTransformConstraint_applyRelativeWorld
+#define _spTranslateTimeline_apply es38__spTranslateTimeline_apply
+#define _spTranslateTimeline_getPropertyId es38__spTranslateTimeline_getPropertyId
+#define _spTwoColorTimeline_apply es38__spTwoColorTimeline_apply
+#define _spTwoColorTimeline_getPropertyId es38__spTwoColorTimeline_getPropertyId
+#define _spUtil_readFile es38__spUtil_readFile
+#define _spVertexAttachment_deinit es38__spVertexAttachment_deinit
+#define _spVertexAttachment_init es38__spVertexAttachment_init
+#define readFloat es38_readFloat
+#define readString es38_readString
+#define spAnimationStateData_create es38_spAnimationStateData_create
+#define spAnimationStateData_dispose es38_spAnimationStateData_dispose
+#define spAnimationStateData_getMix es38_spAnimationStateData_getMix
+#define spAnimationStateData_setMix es38_spAnimationStateData_setMix
+#define spAnimationStateData_setMixByName es38_spAnimationStateData_setMixByName
+#define spAnimationState_addAnimation es38_spAnimationState_addAnimation
+#define spAnimationState_addAnimationByName es38_spAnimationState_addAnimationByName
+#define spAnimationState_addEmptyAnimation es38_spAnimationState_addEmptyAnimation
+#define spAnimationState_apply es38_spAnimationState_apply
+#define spAnimationState_clearListenerNotifications es38_spAnimationState_clearListenerNotifications
+#define spAnimationState_clearTrack es38_spAnimationState_clearTrack
+#define spAnimationState_clearTracks es38_spAnimationState_clearTracks
+#define spAnimationState_create es38_spAnimationState_create
+#define spAnimationState_dispose es38_spAnimationState_dispose
+#define spAnimationState_disposeStatics es38_spAnimationState_disposeStatics
+#define spAnimationState_getCurrent es38_spAnimationState_getCurrent
+#define spAnimationState_setAnimation es38_spAnimationState_setAnimation
+#define spAnimationState_setAnimationByName es38_spAnimationState_setAnimationByName
+#define spAnimationState_setEmptyAnimation es38_spAnimationState_setEmptyAnimation
+#define spAnimationState_setEmptyAnimations es38_spAnimationState_setEmptyAnimations
+#define spAnimationState_update es38_spAnimationState_update
+#define spAnimation_apply es38_spAnimation_apply
+#define spAnimation_create es38_spAnimation_create
+#define spAnimation_dispose es38_spAnimation_dispose
+#define spArrayFloatArray_add es38_spArrayFloatArray_add
+#define spArrayFloatArray_addAll es38_spArrayFloatArray_addAll
+#define spArrayFloatArray_addAllValues es38_spArrayFloatArray_addAllValues
+#define spArrayFloatArray_clear es38_spArrayFloatArray_clear
+#define spArrayFloatArray_contains es38_spArrayFloatArray_contains
+#define spArrayFloatArray_create es38_spArrayFloatArray_create
+#define spArrayFloatArray_dispose es38_spArrayFloatArray_dispose
+#define spArrayFloatArray_ensureCapacity es38_spArrayFloatArray_ensureCapacity
+#define spArrayFloatArray_peek es38_spArrayFloatArray_peek
+#define spArrayFloatArray_pop es38_spArrayFloatArray_pop
+#define spArrayFloatArray_removeAt es38_spArrayFloatArray_removeAt
+#define spArrayFloatArray_setSize es38_spArrayFloatArray_setSize
+#define spArrayShortArray_add es38_spArrayShortArray_add
+#define spArrayShortArray_addAll es38_spArrayShortArray_addAll
+#define spArrayShortArray_addAllValues es38_spArrayShortArray_addAllValues
+#define spArrayShortArray_clear es38_spArrayShortArray_clear
+#define spArrayShortArray_contains es38_spArrayShortArray_contains
+#define spArrayShortArray_create es38_spArrayShortArray_create
+#define spArrayShortArray_dispose es38_spArrayShortArray_dispose
+#define spArrayShortArray_ensureCapacity es38_spArrayShortArray_ensureCapacity
+#define spArrayShortArray_peek es38_spArrayShortArray_peek
+#define spArrayShortArray_pop es38_spArrayShortArray_pop
+#define spArrayShortArray_removeAt es38_spArrayShortArray_removeAt
+#define spArrayShortArray_setSize es38_spArrayShortArray_setSize
+#define spAtlasAttachmentLoader_create es38_spAtlasAttachmentLoader_create
+#define spAtlasPage_create es38_spAtlasPage_create
+#define spAtlasPage_dispose es38_spAtlasPage_dispose
+#define spAtlasRegion_create es38_spAtlasRegion_create
+#define spAtlasRegion_dispose es38_spAtlasRegion_dispose
+#define spAtlas_create es38_spAtlas_create
+#define spAtlas_createFromFile es38_spAtlas_createFromFile
+#define spAtlas_dispose es38_spAtlas_dispose
+#define spAtlas_findRegion es38_spAtlas_findRegion
+#define spAttachmentLoader_configureAttachment es38_spAttachmentLoader_configureAttachment
+#define spAttachmentLoader_createAttachment es38_spAttachmentLoader_createAttachment
+#define spAttachmentLoader_dispose es38_spAttachmentLoader_dispose
+#define spAttachmentLoader_disposeAttachment es38_spAttachmentLoader_disposeAttachment
+#define spAttachmentTimeline_create es38_spAttachmentTimeline_create
+#define spAttachmentTimeline_setFrame es38_spAttachmentTimeline_setFrame
+#define spAttachment_copy es38_spAttachment_copy
+#define spAttachment_dispose es38_spAttachment_dispose
+#define spBoneDataArray_add es38_spBoneDataArray_add
+#define spBoneDataArray_addAll es38_spBoneDataArray_addAll
+#define spBoneDataArray_addAllValues es38_spBoneDataArray_addAllValues
+#define spBoneDataArray_clear es38_spBoneDataArray_clear
+#define spBoneDataArray_contains es38_spBoneDataArray_contains
+#define spBoneDataArray_create es38_spBoneDataArray_create
+#define spBoneDataArray_dispose es38_spBoneDataArray_dispose
+#define spBoneDataArray_ensureCapacity es38_spBoneDataArray_ensureCapacity
+#define spBoneDataArray_peek es38_spBoneDataArray_peek
+#define spBoneDataArray_pop es38_spBoneDataArray_pop
+#define spBoneDataArray_removeAt es38_spBoneDataArray_removeAt
+#define spBoneDataArray_setSize es38_spBoneDataArray_setSize
+#define spBoneData_create es38_spBoneData_create
+#define spBoneData_dispose es38_spBoneData_dispose
+#define spBone_create es38_spBone_create
+#define spBone_dispose es38_spBone_dispose
+#define spBone_getWorldRotationX es38_spBone_getWorldRotationX
+#define spBone_getWorldRotationY es38_spBone_getWorldRotationY
+#define spBone_getWorldScaleX es38_spBone_getWorldScaleX
+#define spBone_getWorldScaleY es38_spBone_getWorldScaleY
+#define spBone_isYDown es38_spBone_isYDown
+#define spBone_localToWorld es38_spBone_localToWorld
+#define spBone_localToWorldRotation es38_spBone_localToWorldRotation
+#define spBone_rotateWorld es38_spBone_rotateWorld
+#define spBone_setToSetupPose es38_spBone_setToSetupPose
+#define spBone_setYDown es38_spBone_setYDown
+#define spBone_updateAppliedTransform es38_spBone_updateAppliedTransform
+#define spBone_updateWorldTransform es38_spBone_updateWorldTransform
+#define spBone_updateWorldTransformWith es38_spBone_updateWorldTransformWith
+#define spBone_worldToLocal es38_spBone_worldToLocal
+#define spBone_worldToLocalRotation es38_spBone_worldToLocalRotation
+#define spBoundingBoxAttachment_create es38_spBoundingBoxAttachment_create
+#define spClippingAttachment_create es38_spClippingAttachment_create
+#define spColorTimeline_create es38_spColorTimeline_create
+#define spColorTimeline_setFrame es38_spColorTimeline_setFrame
+#define spColor_addColor es38_spColor_addColor
+#define spColor_addFloats es38_spColor_addFloats
+#define spColor_clamp es38_spColor_clamp
+#define spColor_create es38_spColor_create
+#define spColor_dispose es38_spColor_dispose
+#define spColor_setFromColor es38_spColor_setFromColor
+#define spColor_setFromFloats es38_spColor_setFromFloats
+#define spCurveTimeline_getCurvePercent es38_spCurveTimeline_getCurvePercent
+#define spCurveTimeline_setCurve es38_spCurveTimeline_setCurve
+#define spCurveTimeline_setLinear es38_spCurveTimeline_setLinear
+#define spCurveTimeline_setStepped es38_spCurveTimeline_setStepped
+#define spDeformTimeline_create es38_spDeformTimeline_create
+#define spDeformTimeline_setFrame es38_spDeformTimeline_setFrame
+#define spDrawOrderTimeline_create es38_spDrawOrderTimeline_create
+#define spDrawOrderTimeline_setFrame es38_spDrawOrderTimeline_setFrame
+#define spEventData_create es38_spEventData_create
+#define spEventData_dispose es38_spEventData_dispose
+#define spEventTimeline_create es38_spEventTimeline_create
+#define spEventTimeline_setFrame es38_spEventTimeline_setFrame
+#define spEvent_create es38_spEvent_create
+#define spEvent_dispose es38_spEvent_dispose
+#define spFloatArray_add es38_spFloatArray_add
+#define spFloatArray_addAll es38_spFloatArray_addAll
+#define spFloatArray_addAllValues es38_spFloatArray_addAllValues
+#define spFloatArray_clear es38_spFloatArray_clear
+#define spFloatArray_contains es38_spFloatArray_contains
+#define spFloatArray_create es38_spFloatArray_create
+#define spFloatArray_dispose es38_spFloatArray_dispose
+#define spFloatArray_ensureCapacity es38_spFloatArray_ensureCapacity
+#define spFloatArray_peek es38_spFloatArray_peek
+#define spFloatArray_pop es38_spFloatArray_pop
+#define spFloatArray_removeAt es38_spFloatArray_removeAt
+#define spFloatArray_setSize es38_spFloatArray_setSize
+#define spIkConstraintDataArray_add es38_spIkConstraintDataArray_add
+#define spIkConstraintDataArray_addAll es38_spIkConstraintDataArray_addAll
+#define spIkConstraintDataArray_addAllValues es38_spIkConstraintDataArray_addAllValues
+#define spIkConstraintDataArray_clear es38_spIkConstraintDataArray_clear
+#define spIkConstraintDataArray_contains es38_spIkConstraintDataArray_contains
+#define spIkConstraintDataArray_create es38_spIkConstraintDataArray_create
+#define spIkConstraintDataArray_dispose es38_spIkConstraintDataArray_dispose
+#define spIkConstraintDataArray_ensureCapacity es38_spIkConstraintDataArray_ensureCapacity
+#define spIkConstraintDataArray_peek es38_spIkConstraintDataArray_peek
+#define spIkConstraintDataArray_pop es38_spIkConstraintDataArray_pop
+#define spIkConstraintDataArray_removeAt es38_spIkConstraintDataArray_removeAt
+#define spIkConstraintDataArray_setSize es38_spIkConstraintDataArray_setSize
+#define spIkConstraintData_create es38_spIkConstraintData_create
+#define spIkConstraintData_dispose es38_spIkConstraintData_dispose
+#define spIkConstraintTimeline_create es38_spIkConstraintTimeline_create
+#define spIkConstraintTimeline_setFrame es38_spIkConstraintTimeline_setFrame
+#define spIkConstraint_apply es38_spIkConstraint_apply
+#define spIkConstraint_apply1 es38_spIkConstraint_apply1
+#define spIkConstraint_apply2 es38_spIkConstraint_apply2
+#define spIkConstraint_create es38_spIkConstraint_create
+#define spIkConstraint_dispose es38_spIkConstraint_dispose
+#define spIntArray_add es38_spIntArray_add
+#define spIntArray_addAll es38_spIntArray_addAll
+#define spIntArray_addAllValues es38_spIntArray_addAllValues
+#define spIntArray_clear es38_spIntArray_clear
+#define spIntArray_contains es38_spIntArray_contains
+#define spIntArray_create es38_spIntArray_create
+#define spIntArray_dispose es38_spIntArray_dispose
+#define spIntArray_ensureCapacity es38_spIntArray_ensureCapacity
+#define spIntArray_peek es38_spIntArray_peek
+#define spIntArray_pop es38_spIntArray_pop
+#define spIntArray_removeAt es38_spIntArray_removeAt
+#define spIntArray_setSize es38_spIntArray_setSize
+#define spJitterVertexEffect_create es38_spJitterVertexEffect_create
+#define spJitterVertexEffect_dispose es38_spJitterVertexEffect_dispose
+#define spMeshAttachment_create es38_spMeshAttachment_create
+#define spMeshAttachment_newLinkedMesh es38_spMeshAttachment_newLinkedMesh
+#define spMeshAttachment_setParentMesh es38_spMeshAttachment_setParentMesh
+#define spMeshAttachment_updateUVs es38_spMeshAttachment_updateUVs
+#define spPathAttachment_create es38_spPathAttachment_create
+#define spPathConstraintDataArray_add es38_spPathConstraintDataArray_add
+#define spPathConstraintDataArray_addAll es38_spPathConstraintDataArray_addAll
+#define spPathConstraintDataArray_addAllValues es38_spPathConstraintDataArray_addAllValues
+#define spPathConstraintDataArray_clear es38_spPathConstraintDataArray_clear
+#define spPathConstraintDataArray_contains es38_spPathConstraintDataArray_contains
+#define spPathConstraintDataArray_create es38_spPathConstraintDataArray_create
+#define spPathConstraintDataArray_dispose es38_spPathConstraintDataArray_dispose
+#define spPathConstraintDataArray_ensureCapacity es38_spPathConstraintDataArray_ensureCapacity
+#define spPathConstraintDataArray_peek es38_spPathConstraintDataArray_peek
+#define spPathConstraintDataArray_pop es38_spPathConstraintDataArray_pop
+#define spPathConstraintDataArray_removeAt es38_spPathConstraintDataArray_removeAt
+#define spPathConstraintDataArray_setSize es38_spPathConstraintDataArray_setSize
+#define spPathConstraintData_create es38_spPathConstraintData_create
+#define spPathConstraintData_dispose es38_spPathConstraintData_dispose
+#define spPathConstraintMixTimeline_create es38_spPathConstraintMixTimeline_create
+#define spPathConstraintMixTimeline_setFrame es38_spPathConstraintMixTimeline_setFrame
+#define spPathConstraintPositionTimeline_create es38_spPathConstraintPositionTimeline_create
+#define spPathConstraintPositionTimeline_setFrame es38_spPathConstraintPositionTimeline_setFrame
+#define spPathConstraintSpacingTimeline_create es38_spPathConstraintSpacingTimeline_create
+#define spPathConstraintSpacingTimeline_setFrame es38_spPathConstraintSpacingTimeline_setFrame
+#define spPathConstraint_apply es38_spPathConstraint_apply
+#define spPathConstraint_computeWorldPositions es38_spPathConstraint_computeWorldPositions
+#define spPathConstraint_create es38_spPathConstraint_create
+#define spPathConstraint_dispose es38_spPathConstraint_dispose
+#define spPointAttachment_computeWorldPosition es38_spPointAttachment_computeWorldPosition
+#define spPointAttachment_computeWorldRotation es38_spPointAttachment_computeWorldRotation
+#define spPointAttachment_create es38_spPointAttachment_create
+#define spPolygon_containsPoint es38_spPolygon_containsPoint
+#define spPolygon_create es38_spPolygon_create
+#define spPolygon_dispose es38_spPolygon_dispose
+#define spPolygon_intersectsSegment es38_spPolygon_intersectsSegment
+#define spRegionAttachment_computeWorldVertices es38_spRegionAttachment_computeWorldVertices
+#define spRegionAttachment_create es38_spRegionAttachment_create
+#define spRegionAttachment_setUVs es38_spRegionAttachment_setUVs
+#define spRegionAttachment_updateOffset es38_spRegionAttachment_updateOffset
+#define spRotateTimeline_create es38_spRotateTimeline_create
+#define spRotateTimeline_setFrame es38_spRotateTimeline_setFrame
+#define spScaleTimeline_create es38_spScaleTimeline_create
+#define spScaleTimeline_setFrame es38_spScaleTimeline_setFrame
+#define spShearTimeline_create es38_spShearTimeline_create
+#define spShearTimeline_setFrame es38_spShearTimeline_setFrame
+#define spShortArray_add es38_spShortArray_add
+#define spShortArray_addAll es38_spShortArray_addAll
+#define spShortArray_addAllValues es38_spShortArray_addAllValues
+#define spShortArray_clear es38_spShortArray_clear
+#define spShortArray_contains es38_spShortArray_contains
+#define spShortArray_create es38_spShortArray_create
+#define spShortArray_dispose es38_spShortArray_dispose
+#define spShortArray_ensureCapacity es38_spShortArray_ensureCapacity
+#define spShortArray_peek es38_spShortArray_peek
+#define spShortArray_pop es38_spShortArray_pop
+#define spShortArray_removeAt es38_spShortArray_removeAt
+#define spShortArray_setSize es38_spShortArray_setSize
+#define spSkeletonBinary_create es38_spSkeletonBinary_create
+#define spSkeletonBinary_createWithLoader es38_spSkeletonBinary_createWithLoader
+#define spSkeletonBinary_dispose es38_spSkeletonBinary_dispose
+#define spSkeletonBinary_readAttachment es38_spSkeletonBinary_readAttachment
+#define spSkeletonBinary_readSkeletonData es38_spSkeletonBinary_readSkeletonData
+#define spSkeletonBinary_readSkeletonDataFile es38_spSkeletonBinary_readSkeletonDataFile
+#define spSkeletonBinary_readSkin es38_spSkeletonBinary_readSkin
+#define spSkeletonBounds_aabbContainsPoint es38_spSkeletonBounds_aabbContainsPoint
+#define spSkeletonBounds_aabbIntersectsSegment es38_spSkeletonBounds_aabbIntersectsSegment
+#define spSkeletonBounds_aabbIntersectsSkeleton es38_spSkeletonBounds_aabbIntersectsSkeleton
+#define spSkeletonBounds_containsPoint es38_spSkeletonBounds_containsPoint
+#define spSkeletonBounds_create es38_spSkeletonBounds_create
+#define spSkeletonBounds_dispose es38_spSkeletonBounds_dispose
+#define spSkeletonBounds_getPolygon es38_spSkeletonBounds_getPolygon
+#define spSkeletonBounds_intersectsSegment es38_spSkeletonBounds_intersectsSegment
+#define spSkeletonBounds_update es38_spSkeletonBounds_update
+#define spSkeletonClipping_clipEnd es38_spSkeletonClipping_clipEnd
+#define spSkeletonClipping_clipEnd2 es38_spSkeletonClipping_clipEnd2
+#define spSkeletonClipping_clipStart es38_spSkeletonClipping_clipStart
+#define spSkeletonClipping_clipTriangles es38_spSkeletonClipping_clipTriangles
+#define spSkeletonClipping_create es38_spSkeletonClipping_create
+#define spSkeletonClipping_dispose es38_spSkeletonClipping_dispose
+#define spSkeletonClipping_isClipping es38_spSkeletonClipping_isClipping
+#define spSkeletonData_create es38_spSkeletonData_create
+#define spSkeletonData_dispose es38_spSkeletonData_dispose
+#define spSkeletonData_findAnimation es38_spSkeletonData_findAnimation
+#define spSkeletonData_findBone es38_spSkeletonData_findBone
+#define spSkeletonData_findBoneIndex es38_spSkeletonData_findBoneIndex
+#define spSkeletonData_findEvent es38_spSkeletonData_findEvent
+#define spSkeletonData_findIkConstraint es38_spSkeletonData_findIkConstraint
+#define spSkeletonData_findPathConstraint es38_spSkeletonData_findPathConstraint
+#define spSkeletonData_findSkin es38_spSkeletonData_findSkin
+#define spSkeletonData_findSlot es38_spSkeletonData_findSlot
+#define spSkeletonData_findSlotIndex es38_spSkeletonData_findSlotIndex
+#define spSkeletonData_findTransformConstraint es38_spSkeletonData_findTransformConstraint
+#define spSkeletonJson_create es38_spSkeletonJson_create
+#define spSkeletonJson_createWithLoader es38_spSkeletonJson_createWithLoader
+#define spSkeletonJson_dispose es38_spSkeletonJson_dispose
+#define spSkeletonJson_readSkeletonData es38_spSkeletonJson_readSkeletonData
+#define spSkeletonJson_readSkeletonDataFile es38_spSkeletonJson_readSkeletonDataFile
+#define spSkeleton_create es38_spSkeleton_create
+#define spSkeleton_dispose es38_spSkeleton_dispose
+#define spSkeleton_findBone es38_spSkeleton_findBone
+#define spSkeleton_findBoneIndex es38_spSkeleton_findBoneIndex
+#define spSkeleton_findIkConstraint es38_spSkeleton_findIkConstraint
+#define spSkeleton_findPathConstraint es38_spSkeleton_findPathConstraint
+#define spSkeleton_findSlot es38_spSkeleton_findSlot
+#define spSkeleton_findSlotIndex es38_spSkeleton_findSlotIndex
+#define spSkeleton_findTransformConstraint es38_spSkeleton_findTransformConstraint
+#define spSkeleton_getAttachmentForSlotIndex es38_spSkeleton_getAttachmentForSlotIndex
+#define spSkeleton_getAttachmentForSlotName es38_spSkeleton_getAttachmentForSlotName
+#define spSkeleton_setAttachment es38_spSkeleton_setAttachment
+#define spSkeleton_setBonesToSetupPose es38_spSkeleton_setBonesToSetupPose
+#define spSkeleton_setSkin es38_spSkeleton_setSkin
+#define spSkeleton_setSkinByName es38_spSkeleton_setSkinByName
+#define spSkeleton_setSlotsToSetupPose es38_spSkeleton_setSlotsToSetupPose
+#define spSkeleton_setToSetupPose es38_spSkeleton_setToSetupPose
+#define spSkeleton_update es38_spSkeleton_update
+#define spSkeleton_updateCache es38_spSkeleton_updateCache
+#define spSkeleton_updateWorldTransform es38_spSkeleton_updateWorldTransform
+#define spSkin_addSkin es38_spSkin_addSkin
+#define spSkin_attachAll es38_spSkin_attachAll
+#define spSkin_clear es38_spSkin_clear
+#define spSkin_copySkin es38_spSkin_copySkin
+#define spSkin_create es38_spSkin_create
+#define spSkin_dispose es38_spSkin_dispose
+#define spSkin_getAttachment es38_spSkin_getAttachment
+#define spSkin_getAttachmentName es38_spSkin_getAttachmentName
+#define spSkin_getAttachments es38_spSkin_getAttachments
+#define spSkin_setAttachment es38_spSkin_setAttachment
+#define spSlotData_create es38_spSlotData_create
+#define spSlotData_dispose es38_spSlotData_dispose
+#define spSlotData_setAttachmentName es38_spSlotData_setAttachmentName
+#define spSlot_create es38_spSlot_create
+#define spSlot_dispose es38_spSlot_dispose
+#define spSlot_getAttachmentTime es38_spSlot_getAttachmentTime
+#define spSlot_setAttachment es38_spSlot_setAttachment
+#define spSlot_setAttachmentTime es38_spSlot_setAttachmentTime
+#define spSlot_setToSetupPose es38_spSlot_setToSetupPose
+#define spSwirlVertexEffect_create es38_spSwirlVertexEffect_create
+#define spSwirlVertexEffect_dispose es38_spSwirlVertexEffect_dispose
+#define spTimelineArray_add es38_spTimelineArray_add
+#define spTimelineArray_addAll es38_spTimelineArray_addAll
+#define spTimelineArray_addAllValues es38_spTimelineArray_addAllValues
+#define spTimelineArray_clear es38_spTimelineArray_clear
+#define spTimelineArray_contains es38_spTimelineArray_contains
+#define spTimelineArray_create es38_spTimelineArray_create
+#define spTimelineArray_dispose es38_spTimelineArray_dispose
+#define spTimelineArray_ensureCapacity es38_spTimelineArray_ensureCapacity
+#define spTimelineArray_peek es38_spTimelineArray_peek
+#define spTimelineArray_pop es38_spTimelineArray_pop
+#define spTimelineArray_removeAt es38_spTimelineArray_removeAt
+#define spTimelineArray_setSize es38_spTimelineArray_setSize
+#define spTimeline_apply es38_spTimeline_apply
+#define spTimeline_dispose es38_spTimeline_dispose
+#define spTimeline_getPropertyId es38_spTimeline_getPropertyId
+#define spTrackEntryArray_add es38_spTrackEntryArray_add
+#define spTrackEntryArray_addAll es38_spTrackEntryArray_addAll
+#define spTrackEntryArray_addAllValues es38_spTrackEntryArray_addAllValues
+#define spTrackEntryArray_clear es38_spTrackEntryArray_clear
+#define spTrackEntryArray_contains es38_spTrackEntryArray_contains
+#define spTrackEntryArray_create es38_spTrackEntryArray_create
+#define spTrackEntryArray_dispose es38_spTrackEntryArray_dispose
+#define spTrackEntryArray_ensureCapacity es38_spTrackEntryArray_ensureCapacity
+#define spTrackEntryArray_peek es38_spTrackEntryArray_peek
+#define spTrackEntryArray_pop es38_spTrackEntryArray_pop
+#define spTrackEntryArray_removeAt es38_spTrackEntryArray_removeAt
+#define spTrackEntryArray_setSize es38_spTrackEntryArray_setSize
+#define spTrackEntry_getAnimationTime es38_spTrackEntry_getAnimationTime
+#define spTransformConstraintDataArray_add es38_spTransformConstraintDataArray_add
+#define spTransformConstraintDataArray_addAll es38_spTransformConstraintDataArray_addAll
+#define spTransformConstraintDataArray_addAllValues es38_spTransformConstraintDataArray_addAllValues
+#define spTransformConstraintDataArray_clear es38_spTransformConstraintDataArray_clear
+#define spTransformConstraintDataArray_contains es38_spTransformConstraintDataArray_contains
+#define spTransformConstraintDataArray_create es38_spTransformConstraintDataArray_create
+#define spTransformConstraintDataArray_dispose es38_spTransformConstraintDataArray_dispose
+#define spTransformConstraintDataArray_ensureCapacity es38_spTransformConstraintDataArray_ensureCapacity
+#define spTransformConstraintDataArray_peek es38_spTransformConstraintDataArray_peek
+#define spTransformConstraintDataArray_pop es38_spTransformConstraintDataArray_pop
+#define spTransformConstraintDataArray_removeAt es38_spTransformConstraintDataArray_removeAt
+#define spTransformConstraintDataArray_setSize es38_spTransformConstraintDataArray_setSize
+#define spTransformConstraintData_create es38_spTransformConstraintData_create
+#define spTransformConstraintData_dispose es38_spTransformConstraintData_dispose
+#define spTransformConstraintTimeline_create es38_spTransformConstraintTimeline_create
+#define spTransformConstraintTimeline_setFrame es38_spTransformConstraintTimeline_setFrame
+#define spTransformConstraint_apply es38_spTransformConstraint_apply
+#define spTransformConstraint_create es38_spTransformConstraint_create
+#define spTransformConstraint_dispose es38_spTransformConstraint_dispose
+#define spTranslateTimeline_create es38_spTranslateTimeline_create
+#define spTranslateTimeline_setFrame es38_spTranslateTimeline_setFrame
+#define spTriangulator_create es38_spTriangulator_create
+#define spTriangulator_decompose es38_spTriangulator_decompose
+#define spTriangulator_dispose es38_spTriangulator_dispose
+#define spTriangulator_triangulate es38_spTriangulator_triangulate
+#define spTwoColorTimeline_create es38_spTwoColorTimeline_create
+#define spTwoColorTimeline_setFrame es38_spTwoColorTimeline_setFrame
+#define spUnsignedShortArray_add es38_spUnsignedShortArray_add
+#define spUnsignedShortArray_addAll es38_spUnsignedShortArray_addAll
+#define spUnsignedShortArray_addAllValues es38_spUnsignedShortArray_addAllValues
+#define spUnsignedShortArray_clear es38_spUnsignedShortArray_clear
+#define spUnsignedShortArray_contains es38_spUnsignedShortArray_contains
+#define spUnsignedShortArray_create es38_spUnsignedShortArray_create
+#define spUnsignedShortArray_dispose es38_spUnsignedShortArray_dispose
+#define spUnsignedShortArray_ensureCapacity es38_spUnsignedShortArray_ensureCapacity
+#define spUnsignedShortArray_peek es38_spUnsignedShortArray_peek
+#define spUnsignedShortArray_pop es38_spUnsignedShortArray_pop
+#define spUnsignedShortArray_removeAt es38_spUnsignedShortArray_removeAt
+#define spUnsignedShortArray_setSize es38_spUnsignedShortArray_setSize
+#define spVertexAttachment_computeWorldVertices es38_spVertexAttachment_computeWorldVertices
+#define spVertexAttachment_copyTo es38_spVertexAttachment_copyTo
diff --git a/native/spine/SpineCRename41.hpp b/native/spine/SpineCRename41.hpp
new file mode 100644
index 000000000..d4d74b2f3
--- /dev/null
+++ b/native/spine/SpineCRename41.hpp
@@ -0,0 +1,588 @@
+// Generated by tools/spine-c-rename.mjs from the compiled spine-c 4.1 objects — DO NOT EDIT.
+// Force-included into spine-c 4.1 and the engine's backend for it, so that
+// release links beside the others in one native host (native/CMakeLists.txt).
+#pragma once
+
+#define Json_create es41_Json_create
+#define Json_dispose es41_Json_dispose
+#define Json_getError es41_Json_getError
+#define Json_getFloat es41_Json_getFloat
+#define Json_getInt es41_Json_getInt
+#define Json_getItem es41_Json_getItem
+#define Json_getItemAtIndex es41_Json_getItemAtIndex
+#define Json_getString es41_Json_getString
+#define _Entry_create es41__Entry_create
+#define _Entry_dispose es41__Entry_dispose
+#define _FromEntry_create es41__FromEntry_create
+#define _FromEntry_dispose es41__FromEntry_dispose
+#define _ToEntry_create es41__ToEntry_create
+#define _ToEntry_dispose es41__ToEntry_dispose
+#define _clip es41__clip
+#define _spAlphaTimeline_apply es41__spAlphaTimeline_apply
+#define _spAnimationState_addPropertyID es41__spAnimationState_addPropertyID
+#define _spAnimationState_addPropertyIDs es41__spAnimationState_addPropertyIDs
+#define _spAnimationState_animationsChanged es41__spAnimationState_animationsChanged
+#define _spAnimationState_applyAttachmentTimeline es41__spAnimationState_applyAttachmentTimeline
+#define _spAnimationState_applyMixingFrom es41__spAnimationState_applyMixingFrom
+#define _spAnimationState_applyRotateTimeline es41__spAnimationState_applyRotateTimeline
+#define _spAnimationState_disableQueue es41__spAnimationState_disableQueue
+#define _spAnimationState_disposeTrackEntries es41__spAnimationState_disposeTrackEntries
+#define _spAnimationState_disposeTrackEntry es41__spAnimationState_disposeTrackEntry
+#define _spAnimationState_enableQueue es41__spAnimationState_enableQueue
+#define _spAnimationState_ensureCapacityPropertyIDs es41__spAnimationState_ensureCapacityPropertyIDs
+#define _spAnimationState_expandToIndex es41__spAnimationState_expandToIndex
+#define _spAnimationState_queueEvents es41__spAnimationState_queueEvents
+#define _spAnimationState_resizeTimelinesRotation es41__spAnimationState_resizeTimelinesRotation
+#define _spAnimationState_setCurrent es41__spAnimationState_setCurrent
+#define _spAnimationState_trackEntry es41__spAnimationState_trackEntry
+#define _spAnimationState_updateMixingFrom es41__spAnimationState_updateMixingFrom
+#define _spAtlasAttachmentLoader_createAttachment es41__spAtlasAttachmentLoader_createAttachment
+#define _spAtlasPage_createTexture es41__spAtlasPage_createTexture
+#define _spAtlasPage_disposeTexture es41__spAtlasPage_disposeTexture
+#define _spAttachmentLoader_deinit es41__spAttachmentLoader_deinit
+#define _spAttachmentLoader_init es41__spAttachmentLoader_init
+#define _spAttachmentLoader_setError es41__spAttachmentLoader_setError
+#define _spAttachmentLoader_setUnknownTypeError es41__spAttachmentLoader_setUnknownTypeError
+#define _spAttachmentTimeline_apply es41__spAttachmentTimeline_apply
+#define _spAttachmentTimeline_dispose es41__spAttachmentTimeline_dispose
+#define _spAttachment_deinit es41__spAttachment_deinit
+#define _spAttachment_init es41__spAttachment_init
+#define _spBoundingBoxAttachment_copy es41__spBoundingBoxAttachment_copy
+#define _spBoundingBoxAttachment_dispose es41__spBoundingBoxAttachment_dispose
+#define _spCalloc es41__spCalloc
+#define _spClippingAttachment_copy es41__spClippingAttachment_copy
+#define _spClippingAttachment_dispose es41__spClippingAttachment_dispose
+#define _spCurveTimeline_dispose es41__spCurveTimeline_dispose
+#define _spCurveTimeline_getBezierValue es41__spCurveTimeline_getBezierValue
+#define _spCurveTimeline_init es41__spCurveTimeline_init
+#define _spCurveTimeline_setBezier es41__spCurveTimeline_setBezier
+#define _spDebug_printCurveTimeline es41__spDebug_printCurveTimeline
+#define _spDebug_printTimelineBase es41__spDebug_printTimelineBase
+#define _spDeformTimeline_apply es41__spDeformTimeline_apply
+#define _spDeformTimeline_dispose es41__spDeformTimeline_dispose
+#define _spDeformTimeline_getCurvePercent es41__spDeformTimeline_getCurvePercent
+#define _spDeformTimeline_setBezier es41__spDeformTimeline_setBezier
+#define _spDrawOrderTimeline_apply es41__spDrawOrderTimeline_apply
+#define _spDrawOrderTimeline_dispose es41__spDrawOrderTimeline_dispose
+#define _spEventQueue_addEntry es41__spEventQueue_addEntry
+#define _spEventQueue_addEvent es41__spEventQueue_addEvent
+#define _spEventQueue_addType es41__spEventQueue_addType
+#define _spEventQueue_clear es41__spEventQueue_clear
+#define _spEventQueue_complete es41__spEventQueue_complete
+#define _spEventQueue_create es41__spEventQueue_create
+#define _spEventQueue_dispose es41__spEventQueue_dispose
+#define _spEventQueue_drain es41__spEventQueue_drain
+#define _spEventQueue_end es41__spEventQueue_end
+#define _spEventQueue_ensureCapacity es41__spEventQueue_ensureCapacity
+#define _spEventQueue_event es41__spEventQueue_event
+#define _spEventQueue_free es41__spEventQueue_free
+#define _spEventQueue_interrupt es41__spEventQueue_interrupt
+#define _spEventQueue_start es41__spEventQueue_start
+#define _spEventTimeline_apply es41__spEventTimeline_apply
+#define _spEventTimeline_dispose es41__spEventTimeline_dispose
+#define _spFree es41__spFree
+#define _spIkConstraintTimeline_apply es41__spIkConstraintTimeline_apply
+#define _spInternalRandom es41__spInternalRandom
+#define _spMalloc es41__spMalloc
+#define _spMath_interpolate es41__spMath_interpolate
+#define _spMath_pow2_apply es41__spMath_pow2_apply
+#define _spMath_pow2out_apply es41__spMath_pow2out_apply
+#define _spMath_random es41__spMath_random
+#define _spMath_randomTriangular es41__spMath_randomTriangular
+#define _spMath_randomTriangularWith es41__spMath_randomTriangularWith
+#define _spMeshAttachment_copy es41__spMeshAttachment_copy
+#define _spMeshAttachment_dispose es41__spMeshAttachment_dispose
+#define _spPathAttachment_copy es41__spPathAttachment_copy
+#define _spPathAttachment_dispose es41__spPathAttachment_dispose
+#define _spPathConstraintMixTimeline_apply es41__spPathConstraintMixTimeline_apply
+#define _spPathConstraintPositionTimeline_apply es41__spPathConstraintPositionTimeline_apply
+#define _spPathConstraintSpacingTimeline_apply es41__spPathConstraintSpacingTimeline_apply
+#define _spPointAttachment_copy es41__spPointAttachment_copy
+#define _spPointAttachment_dispose es41__spPointAttachment_dispose
+#define _spRGB2Timeline_apply es41__spRGB2Timeline_apply
+#define _spRGBA2Timeline_apply es41__spRGBA2Timeline_apply
+#define _spRGBATimeline_apply es41__spRGBATimeline_apply
+#define _spRGBTimeline_apply es41__spRGBTimeline_apply
+#define _spRandom es41__spRandom
+#define _spReadFile es41__spReadFile
+#define _spRealloc es41__spRealloc
+#define _spRegionAttachment_copy es41__spRegionAttachment_copy
+#define _spRegionAttachment_dispose es41__spRegionAttachment_dispose
+#define _spRotateTimeline_apply es41__spRotateTimeline_apply
+#define _spScaleTimeline_apply es41__spScaleTimeline_apply
+#define _spScaleXTimeline_apply es41__spScaleXTimeline_apply
+#define _spScaleYTimeline_apply es41__spScaleYTimeline_apply
+#define _spSequenceTimeline_apply es41__spSequenceTimeline_apply
+#define _spSequenceTimeline_dispose es41__spSequenceTimeline_dispose
+#define _spSetDebugMalloc es41__spSetDebugMalloc
+#define _spSetFree es41__spSetFree
+#define _spSetMalloc es41__spSetMalloc
+#define _spSetRandom es41__spSetRandom
+#define _spSetRealloc es41__spSetRealloc
+#define _spShearTimeline_apply es41__spShearTimeline_apply
+#define _spShearXTimeline_apply es41__spShearXTimeline_apply
+#define _spShearYTimeline_apply es41__spShearYTimeline_apply
+#define _spSkeletonBinary_setError es41__spSkeletonBinary_setError
+#define _spSkeletonJson_setError es41__spSkeletonJson_setError
+#define _spTimeline_init es41__spTimeline_init
+#define _spTrackEntry_computeHold es41__spTrackEntry_computeHold
+#define _spTransformConstraintTimeline_apply es41__spTransformConstraintTimeline_apply
+#define _spTransformConstraint_applyAbsoluteLocal es41__spTransformConstraint_applyAbsoluteLocal
+#define _spTransformConstraint_applyAbsoluteWorld es41__spTransformConstraint_applyAbsoluteWorld
+#define _spTransformConstraint_applyRelativeLocal es41__spTransformConstraint_applyRelativeLocal
+#define _spTransformConstraint_applyRelativeWorld es41__spTransformConstraint_applyRelativeWorld
+#define _spTranslateTimeline_apply es41__spTranslateTimeline_apply
+#define _spTranslateXTimeline_apply es41__spTranslateXTimeline_apply
+#define _spTranslateYTimeline_apply es41__spTranslateYTimeline_apply
+#define _spUtil_readFile es41__spUtil_readFile
+#define _spVertexAttachment_deinit es41__spVertexAttachment_deinit
+#define _spVertexAttachment_init es41__spVertexAttachment_init
+#define findIkConstraintIndex es41_findIkConstraintIndex
+#define findPathConstraintIndex es41_findPathConstraintIndex
+#define findTransformConstraintIndex es41_findTransformConstraintIndex
+#define indexOf es41_indexOf
+#define readFloat es41_readFloat
+#define readString es41_readString
+#define spAlphaTimeline_create es41_spAlphaTimeline_create
+#define spAlphaTimeline_setFrame es41_spAlphaTimeline_setFrame
+#define spAnimationStateData_create es41_spAnimationStateData_create
+#define spAnimationStateData_dispose es41_spAnimationStateData_dispose
+#define spAnimationStateData_getMix es41_spAnimationStateData_getMix
+#define spAnimationStateData_setMix es41_spAnimationStateData_setMix
+#define spAnimationStateData_setMixByName es41_spAnimationStateData_setMixByName
+#define spAnimationState_addAnimation es41_spAnimationState_addAnimation
+#define spAnimationState_addAnimationByName es41_spAnimationState_addAnimationByName
+#define spAnimationState_addEmptyAnimation es41_spAnimationState_addEmptyAnimation
+#define spAnimationState_apply es41_spAnimationState_apply
+#define spAnimationState_clearListenerNotifications es41_spAnimationState_clearListenerNotifications
+#define spAnimationState_clearNext es41_spAnimationState_clearNext
+#define spAnimationState_clearTrack es41_spAnimationState_clearTrack
+#define spAnimationState_clearTracks es41_spAnimationState_clearTracks
+#define spAnimationState_create es41_spAnimationState_create
+#define spAnimationState_dispose es41_spAnimationState_dispose
+#define spAnimationState_disposeStatics es41_spAnimationState_disposeStatics
+#define spAnimationState_getCurrent es41_spAnimationState_getCurrent
+#define spAnimationState_setAnimation es41_spAnimationState_setAnimation
+#define spAnimationState_setAnimationByName es41_spAnimationState_setAnimationByName
+#define spAnimationState_setEmptyAnimation es41_spAnimationState_setEmptyAnimation
+#define spAnimationState_setEmptyAnimations es41_spAnimationState_setEmptyAnimations
+#define spAnimationState_update es41_spAnimationState_update
+#define spAnimation_apply es41_spAnimation_apply
+#define spAnimation_create es41_spAnimation_create
+#define spAnimation_dispose es41_spAnimation_dispose
+#define spAnimation_hasTimeline es41_spAnimation_hasTimeline
+#define spArrayFloatArray_add es41_spArrayFloatArray_add
+#define spArrayFloatArray_addAll es41_spArrayFloatArray_addAll
+#define spArrayFloatArray_addAllValues es41_spArrayFloatArray_addAllValues
+#define spArrayFloatArray_clear es41_spArrayFloatArray_clear
+#define spArrayFloatArray_contains es41_spArrayFloatArray_contains
+#define spArrayFloatArray_create es41_spArrayFloatArray_create
+#define spArrayFloatArray_dispose es41_spArrayFloatArray_dispose
+#define spArrayFloatArray_ensureCapacity es41_spArrayFloatArray_ensureCapacity
+#define spArrayFloatArray_peek es41_spArrayFloatArray_peek
+#define spArrayFloatArray_pop es41_spArrayFloatArray_pop
+#define spArrayFloatArray_removeAt es41_spArrayFloatArray_removeAt
+#define spArrayFloatArray_setSize es41_spArrayFloatArray_setSize
+#define spArrayShortArray_add es41_spArrayShortArray_add
+#define spArrayShortArray_addAll es41_spArrayShortArray_addAll
+#define spArrayShortArray_addAllValues es41_spArrayShortArray_addAllValues
+#define spArrayShortArray_clear es41_spArrayShortArray_clear
+#define spArrayShortArray_contains es41_spArrayShortArray_contains
+#define spArrayShortArray_create es41_spArrayShortArray_create
+#define spArrayShortArray_dispose es41_spArrayShortArray_dispose
+#define spArrayShortArray_ensureCapacity es41_spArrayShortArray_ensureCapacity
+#define spArrayShortArray_peek es41_spArrayShortArray_peek
+#define spArrayShortArray_pop es41_spArrayShortArray_pop
+#define spArrayShortArray_removeAt es41_spArrayShortArray_removeAt
+#define spArrayShortArray_setSize es41_spArrayShortArray_setSize
+#define spAtlasAttachmentLoader_create es41_spAtlasAttachmentLoader_create
+#define spAtlasPage_create es41_spAtlasPage_create
+#define spAtlasPage_dispose es41_spAtlasPage_dispose
+#define spAtlasRegion_create es41_spAtlasRegion_create
+#define spAtlasRegion_dispose es41_spAtlasRegion_dispose
+#define spAtlas_create es41_spAtlas_create
+#define spAtlas_createFromFile es41_spAtlas_createFromFile
+#define spAtlas_dispose es41_spAtlas_dispose
+#define spAtlas_findRegion es41_spAtlas_findRegion
+#define spAttachmentLoader_configureAttachment es41_spAttachmentLoader_configureAttachment
+#define spAttachmentLoader_createAttachment es41_spAttachmentLoader_createAttachment
+#define spAttachmentLoader_dispose es41_spAttachmentLoader_dispose
+#define spAttachmentLoader_disposeAttachment es41_spAttachmentLoader_disposeAttachment
+#define spAttachmentTimeline_create es41_spAttachmentTimeline_create
+#define spAttachmentTimeline_setFrame es41_spAttachmentTimeline_setFrame
+#define spAttachment_copy es41_spAttachment_copy
+#define spAttachment_dispose es41_spAttachment_dispose
+#define spBoneDataArray_add es41_spBoneDataArray_add
+#define spBoneDataArray_addAll es41_spBoneDataArray_addAll
+#define spBoneDataArray_addAllValues es41_spBoneDataArray_addAllValues
+#define spBoneDataArray_clear es41_spBoneDataArray_clear
+#define spBoneDataArray_contains es41_spBoneDataArray_contains
+#define spBoneDataArray_create es41_spBoneDataArray_create
+#define spBoneDataArray_dispose es41_spBoneDataArray_dispose
+#define spBoneDataArray_ensureCapacity es41_spBoneDataArray_ensureCapacity
+#define spBoneDataArray_peek es41_spBoneDataArray_peek
+#define spBoneDataArray_pop es41_spBoneDataArray_pop
+#define spBoneDataArray_removeAt es41_spBoneDataArray_removeAt
+#define spBoneDataArray_setSize es41_spBoneDataArray_setSize
+#define spBoneData_create es41_spBoneData_create
+#define spBoneData_dispose es41_spBoneData_dispose
+#define spBone_create es41_spBone_create
+#define spBone_dispose es41_spBone_dispose
+#define spBone_getWorldRotationX es41_spBone_getWorldRotationX
+#define spBone_getWorldRotationY es41_spBone_getWorldRotationY
+#define spBone_getWorldScaleX es41_spBone_getWorldScaleX
+#define spBone_getWorldScaleY es41_spBone_getWorldScaleY
+#define spBone_isYDown es41_spBone_isYDown
+#define spBone_localToWorld es41_spBone_localToWorld
+#define spBone_localToWorldRotation es41_spBone_localToWorldRotation
+#define spBone_rotateWorld es41_spBone_rotateWorld
+#define spBone_setToSetupPose es41_spBone_setToSetupPose
+#define spBone_setYDown es41_spBone_setYDown
+#define spBone_update es41_spBone_update
+#define spBone_updateAppliedTransform es41_spBone_updateAppliedTransform
+#define spBone_updateWorldTransform es41_spBone_updateWorldTransform
+#define spBone_updateWorldTransformWith es41_spBone_updateWorldTransformWith
+#define spBone_worldToLocal es41_spBone_worldToLocal
+#define spBone_worldToLocalRotation es41_spBone_worldToLocalRotation
+#define spBoundingBoxAttachment_create es41_spBoundingBoxAttachment_create
+#define spClippingAttachment_create es41_spClippingAttachment_create
+#define spColor_addColor es41_spColor_addColor
+#define spColor_addFloats es41_spColor_addFloats
+#define spColor_addFloats3 es41_spColor_addFloats3
+#define spColor_clamp es41_spColor_clamp
+#define spColor_create es41_spColor_create
+#define spColor_dispose es41_spColor_dispose
+#define spColor_setFromColor es41_spColor_setFromColor
+#define spColor_setFromColor3 es41_spColor_setFromColor3
+#define spColor_setFromFloats es41_spColor_setFromFloats
+#define spColor_setFromFloats3 es41_spColor_setFromFloats3
+#define spCurveTimeline1_getCurveValue es41_spCurveTimeline1_getCurveValue
+#define spCurveTimeline1_setFrame es41_spCurveTimeline1_setFrame
+#define spCurveTimeline2_setFrame es41_spCurveTimeline2_setFrame
+#define spCurveTimeline_setLinear es41_spCurveTimeline_setLinear
+#define spCurveTimeline_setStepped es41_spCurveTimeline_setStepped
+#define spDebug_printAnimation es41_spDebug_printAnimation
+#define spDebug_printBone es41_spDebug_printBone
+#define spDebug_printBoneData es41_spDebug_printBoneData
+#define spDebug_printBoneDatas es41_spDebug_printBoneDatas
+#define spDebug_printBones es41_spDebug_printBones
+#define spDebug_printFloats es41_spDebug_printFloats
+#define spDebug_printSkeleton es41_spDebug_printSkeleton
+#define spDebug_printSkeletonData es41_spDebug_printSkeletonData
+#define spDebug_printTimeline es41_spDebug_printTimeline
+#define spDeformTimeline_create es41_spDeformTimeline_create
+#define spDeformTimeline_setFrame es41_spDeformTimeline_setFrame
+#define spDrawOrderTimeline_create es41_spDrawOrderTimeline_create
+#define spDrawOrderTimeline_setFrame es41_spDrawOrderTimeline_setFrame
+#define spEventData_create es41_spEventData_create
+#define spEventData_dispose es41_spEventData_dispose
+#define spEventTimeline_create es41_spEventTimeline_create
+#define spEventTimeline_setFrame es41_spEventTimeline_setFrame
+#define spEvent_create es41_spEvent_create
+#define spEvent_dispose es41_spEvent_dispose
+#define spFloatArray_add es41_spFloatArray_add
+#define spFloatArray_addAll es41_spFloatArray_addAll
+#define spFloatArray_addAllValues es41_spFloatArray_addAllValues
+#define spFloatArray_clear es41_spFloatArray_clear
+#define spFloatArray_contains es41_spFloatArray_contains
+#define spFloatArray_create es41_spFloatArray_create
+#define spFloatArray_dispose es41_spFloatArray_dispose
+#define spFloatArray_ensureCapacity es41_spFloatArray_ensureCapacity
+#define spFloatArray_peek es41_spFloatArray_peek
+#define spFloatArray_pop es41_spFloatArray_pop
+#define spFloatArray_removeAt es41_spFloatArray_removeAt
+#define spFloatArray_setSize es41_spFloatArray_setSize
+#define spIkConstraintDataArray_add es41_spIkConstraintDataArray_add
+#define spIkConstraintDataArray_addAll es41_spIkConstraintDataArray_addAll
+#define spIkConstraintDataArray_addAllValues es41_spIkConstraintDataArray_addAllValues
+#define spIkConstraintDataArray_clear es41_spIkConstraintDataArray_clear
+#define spIkConstraintDataArray_contains es41_spIkConstraintDataArray_contains
+#define spIkConstraintDataArray_create es41_spIkConstraintDataArray_create
+#define spIkConstraintDataArray_dispose es41_spIkConstraintDataArray_dispose
+#define spIkConstraintDataArray_ensureCapacity es41_spIkConstraintDataArray_ensureCapacity
+#define spIkConstraintDataArray_peek es41_spIkConstraintDataArray_peek
+#define spIkConstraintDataArray_pop es41_spIkConstraintDataArray_pop
+#define spIkConstraintDataArray_removeAt es41_spIkConstraintDataArray_removeAt
+#define spIkConstraintDataArray_setSize es41_spIkConstraintDataArray_setSize
+#define spIkConstraintData_create es41_spIkConstraintData_create
+#define spIkConstraintData_dispose es41_spIkConstraintData_dispose
+#define spIkConstraintTimeline_create es41_spIkConstraintTimeline_create
+#define spIkConstraintTimeline_setFrame es41_spIkConstraintTimeline_setFrame
+#define spIkConstraint_apply1 es41_spIkConstraint_apply1
+#define spIkConstraint_apply2 es41_spIkConstraint_apply2
+#define spIkConstraint_create es41_spIkConstraint_create
+#define spIkConstraint_dispose es41_spIkConstraint_dispose
+#define spIkConstraint_update es41_spIkConstraint_update
+#define spIntArray_add es41_spIntArray_add
+#define spIntArray_addAll es41_spIntArray_addAll
+#define spIntArray_addAllValues es41_spIntArray_addAllValues
+#define spIntArray_clear es41_spIntArray_clear
+#define spIntArray_contains es41_spIntArray_contains
+#define spIntArray_create es41_spIntArray_create
+#define spIntArray_dispose es41_spIntArray_dispose
+#define spIntArray_ensureCapacity es41_spIntArray_ensureCapacity
+#define spIntArray_peek es41_spIntArray_peek
+#define spIntArray_pop es41_spIntArray_pop
+#define spIntArray_removeAt es41_spIntArray_removeAt
+#define spIntArray_setSize es41_spIntArray_setSize
+#define spKeyValueArray_add es41_spKeyValueArray_add
+#define spKeyValueArray_addAll es41_spKeyValueArray_addAll
+#define spKeyValueArray_addAllValues es41_spKeyValueArray_addAllValues
+#define spKeyValueArray_clear es41_spKeyValueArray_clear
+#define spKeyValueArray_contains es41_spKeyValueArray_contains
+#define spKeyValueArray_create es41_spKeyValueArray_create
+#define spKeyValueArray_dispose es41_spKeyValueArray_dispose
+#define spKeyValueArray_ensureCapacity es41_spKeyValueArray_ensureCapacity
+#define spKeyValueArray_peek es41_spKeyValueArray_peek
+#define spKeyValueArray_pop es41_spKeyValueArray_pop
+#define spKeyValueArray_setSize es41_spKeyValueArray_setSize
+#define spMeshAttachment_create es41_spMeshAttachment_create
+#define spMeshAttachment_newLinkedMesh es41_spMeshAttachment_newLinkedMesh
+#define spMeshAttachment_setParentMesh es41_spMeshAttachment_setParentMesh
+#define spMeshAttachment_updateRegion es41_spMeshAttachment_updateRegion
+#define spPathAttachment_create es41_spPathAttachment_create
+#define spPathConstraintDataArray_add es41_spPathConstraintDataArray_add
+#define spPathConstraintDataArray_addAll es41_spPathConstraintDataArray_addAll
+#define spPathConstraintDataArray_addAllValues es41_spPathConstraintDataArray_addAllValues
+#define spPathConstraintDataArray_clear es41_spPathConstraintDataArray_clear
+#define spPathConstraintDataArray_contains es41_spPathConstraintDataArray_contains
+#define spPathConstraintDataArray_create es41_spPathConstraintDataArray_create
+#define spPathConstraintDataArray_dispose es41_spPathConstraintDataArray_dispose
+#define spPathConstraintDataArray_ensureCapacity es41_spPathConstraintDataArray_ensureCapacity
+#define spPathConstraintDataArray_peek es41_spPathConstraintDataArray_peek
+#define spPathConstraintDataArray_pop es41_spPathConstraintDataArray_pop
+#define spPathConstraintDataArray_removeAt es41_spPathConstraintDataArray_removeAt
+#define spPathConstraintDataArray_setSize es41_spPathConstraintDataArray_setSize
+#define spPathConstraintData_create es41_spPathConstraintData_create
+#define spPathConstraintData_dispose es41_spPathConstraintData_dispose
+#define spPathConstraintMixTimeline_create es41_spPathConstraintMixTimeline_create
+#define spPathConstraintMixTimeline_setFrame es41_spPathConstraintMixTimeline_setFrame
+#define spPathConstraintPositionTimeline_create es41_spPathConstraintPositionTimeline_create
+#define spPathConstraintPositionTimeline_setFrame es41_spPathConstraintPositionTimeline_setFrame
+#define spPathConstraintSpacingTimeline_create es41_spPathConstraintSpacingTimeline_create
+#define spPathConstraintSpacingTimeline_setFrame es41_spPathConstraintSpacingTimeline_setFrame
+#define spPathConstraint_computeWorldPositions es41_spPathConstraint_computeWorldPositions
+#define spPathConstraint_create es41_spPathConstraint_create
+#define spPathConstraint_dispose es41_spPathConstraint_dispose
+#define spPathConstraint_update es41_spPathConstraint_update
+#define spPointAttachment_computeWorldPosition es41_spPointAttachment_computeWorldPosition
+#define spPointAttachment_computeWorldRotation es41_spPointAttachment_computeWorldRotation
+#define spPointAttachment_create es41_spPointAttachment_create
+#define spPolygon_containsPoint es41_spPolygon_containsPoint
+#define spPolygon_create es41_spPolygon_create
+#define spPolygon_dispose es41_spPolygon_dispose
+#define spPolygon_intersectsSegment es41_spPolygon_intersectsSegment
+#define spPropertyIdArray_add es41_spPropertyIdArray_add
+#define spPropertyIdArray_addAll es41_spPropertyIdArray_addAll
+#define spPropertyIdArray_addAllValues es41_spPropertyIdArray_addAllValues
+#define spPropertyIdArray_clear es41_spPropertyIdArray_clear
+#define spPropertyIdArray_contains es41_spPropertyIdArray_contains
+#define spPropertyIdArray_create es41_spPropertyIdArray_create
+#define spPropertyIdArray_dispose es41_spPropertyIdArray_dispose
+#define spPropertyIdArray_ensureCapacity es41_spPropertyIdArray_ensureCapacity
+#define spPropertyIdArray_peek es41_spPropertyIdArray_peek
+#define spPropertyIdArray_pop es41_spPropertyIdArray_pop
+#define spPropertyIdArray_removeAt es41_spPropertyIdArray_removeAt
+#define spPropertyIdArray_setSize es41_spPropertyIdArray_setSize
+#define spRGB2Timeline_create es41_spRGB2Timeline_create
+#define spRGB2Timeline_setFrame es41_spRGB2Timeline_setFrame
+#define spRGBA2Timeline_create es41_spRGBA2Timeline_create
+#define spRGBA2Timeline_setFrame es41_spRGBA2Timeline_setFrame
+#define spRGBATimeline_create es41_spRGBATimeline_create
+#define spRGBATimeline_setFrame es41_spRGBATimeline_setFrame
+#define spRGBTimeline_create es41_spRGBTimeline_create
+#define spRGBTimeline_setFrame es41_spRGBTimeline_setFrame
+#define spRegionAttachment_computeWorldVertices es41_spRegionAttachment_computeWorldVertices
+#define spRegionAttachment_create es41_spRegionAttachment_create
+#define spRegionAttachment_updateRegion es41_spRegionAttachment_updateRegion
+#define spRotateTimeline_create es41_spRotateTimeline_create
+#define spRotateTimeline_setFrame es41_spRotateTimeline_setFrame
+#define spScaleTimeline_create es41_spScaleTimeline_create
+#define spScaleTimeline_setFrame es41_spScaleTimeline_setFrame
+#define spScaleXTimeline_create es41_spScaleXTimeline_create
+#define spScaleXTimeline_setFrame es41_spScaleXTimeline_setFrame
+#define spScaleYTimeline_create es41_spScaleYTimeline_create
+#define spScaleYTimeline_setFrame es41_spScaleYTimeline_setFrame
+#define spSequenceTimeline_create es41_spSequenceTimeline_create
+#define spSequenceTimeline_setFrame es41_spSequenceTimeline_setFrame
+#define spSequence_apply es41_spSequence_apply
+#define spSequence_copy es41_spSequence_copy
+#define spSequence_create es41_spSequence_create
+#define spSequence_dispose es41_spSequence_dispose
+#define spSequence_getPath es41_spSequence_getPath
+#define spShearTimeline_create es41_spShearTimeline_create
+#define spShearTimeline_setFrame es41_spShearTimeline_setFrame
+#define spShearXTimeline_create es41_spShearXTimeline_create
+#define spShearXTimeline_setFrame es41_spShearXTimeline_setFrame
+#define spShearYTimeline_create es41_spShearYTimeline_create
+#define spShearYTimeline_setFrame es41_spShearYTimeline_setFrame
+#define spShortArray_add es41_spShortArray_add
+#define spShortArray_addAll es41_spShortArray_addAll
+#define spShortArray_addAllValues es41_spShortArray_addAllValues
+#define spShortArray_clear es41_spShortArray_clear
+#define spShortArray_contains es41_spShortArray_contains
+#define spShortArray_create es41_spShortArray_create
+#define spShortArray_dispose es41_spShortArray_dispose
+#define spShortArray_ensureCapacity es41_spShortArray_ensureCapacity
+#define spShortArray_peek es41_spShortArray_peek
+#define spShortArray_pop es41_spShortArray_pop
+#define spShortArray_removeAt es41_spShortArray_removeAt
+#define spShortArray_setSize es41_spShortArray_setSize
+#define spSkeletonBinary_create es41_spSkeletonBinary_create
+#define spSkeletonBinary_createWithLoader es41_spSkeletonBinary_createWithLoader
+#define spSkeletonBinary_dispose es41_spSkeletonBinary_dispose
+#define spSkeletonBinary_readAttachment es41_spSkeletonBinary_readAttachment
+#define spSkeletonBinary_readSkeletonData es41_spSkeletonBinary_readSkeletonData
+#define spSkeletonBinary_readSkeletonDataFile es41_spSkeletonBinary_readSkeletonDataFile
+#define spSkeletonBinary_readSkin es41_spSkeletonBinary_readSkin
+#define spSkeletonBounds_aabbContainsPoint es41_spSkeletonBounds_aabbContainsPoint
+#define spSkeletonBounds_aabbIntersectsSegment es41_spSkeletonBounds_aabbIntersectsSegment
+#define spSkeletonBounds_aabbIntersectsSkeleton es41_spSkeletonBounds_aabbIntersectsSkeleton
+#define spSkeletonBounds_containsPoint es41_spSkeletonBounds_containsPoint
+#define spSkeletonBounds_create es41_spSkeletonBounds_create
+#define spSkeletonBounds_dispose es41_spSkeletonBounds_dispose
+#define spSkeletonBounds_getPolygon es41_spSkeletonBounds_getPolygon
+#define spSkeletonBounds_intersectsSegment es41_spSkeletonBounds_intersectsSegment
+#define spSkeletonBounds_update es41_spSkeletonBounds_update
+#define spSkeletonClipping_clipEnd es41_spSkeletonClipping_clipEnd
+#define spSkeletonClipping_clipEnd2 es41_spSkeletonClipping_clipEnd2
+#define spSkeletonClipping_clipStart es41_spSkeletonClipping_clipStart
+#define spSkeletonClipping_clipTriangles es41_spSkeletonClipping_clipTriangles
+#define spSkeletonClipping_create es41_spSkeletonClipping_create
+#define spSkeletonClipping_dispose es41_spSkeletonClipping_dispose
+#define spSkeletonClipping_isClipping es41_spSkeletonClipping_isClipping
+#define spSkeletonData_create es41_spSkeletonData_create
+#define spSkeletonData_dispose es41_spSkeletonData_dispose
+#define spSkeletonData_findAnimation es41_spSkeletonData_findAnimation
+#define spSkeletonData_findBone es41_spSkeletonData_findBone
+#define spSkeletonData_findEvent es41_spSkeletonData_findEvent
+#define spSkeletonData_findIkConstraint es41_spSkeletonData_findIkConstraint
+#define spSkeletonData_findPathConstraint es41_spSkeletonData_findPathConstraint
+#define spSkeletonData_findSkin es41_spSkeletonData_findSkin
+#define spSkeletonData_findSlot es41_spSkeletonData_findSlot
+#define spSkeletonData_findTransformConstraint es41_spSkeletonData_findTransformConstraint
+#define spSkeletonJson_create es41_spSkeletonJson_create
+#define spSkeletonJson_createWithLoader es41_spSkeletonJson_createWithLoader
+#define spSkeletonJson_dispose es41_spSkeletonJson_dispose
+#define spSkeletonJson_readSkeletonData es41_spSkeletonJson_readSkeletonData
+#define spSkeletonJson_readSkeletonDataFile es41_spSkeletonJson_readSkeletonDataFile
+#define spSkeleton_create es41_spSkeleton_create
+#define spSkeleton_dispose es41_spSkeleton_dispose
+#define spSkeleton_findBone es41_spSkeleton_findBone
+#define spSkeleton_findIkConstraint es41_spSkeleton_findIkConstraint
+#define spSkeleton_findPathConstraint es41_spSkeleton_findPathConstraint
+#define spSkeleton_findSlot es41_spSkeleton_findSlot
+#define spSkeleton_findTransformConstraint es41_spSkeleton_findTransformConstraint
+#define spSkeleton_getAttachmentForSlotIndex es41_spSkeleton_getAttachmentForSlotIndex
+#define spSkeleton_getAttachmentForSlotName es41_spSkeleton_getAttachmentForSlotName
+#define spSkeleton_setAttachment es41_spSkeleton_setAttachment
+#define spSkeleton_setBonesToSetupPose es41_spSkeleton_setBonesToSetupPose
+#define spSkeleton_setSkin es41_spSkeleton_setSkin
+#define spSkeleton_setSkinByName es41_spSkeleton_setSkinByName
+#define spSkeleton_setSlotsToSetupPose es41_spSkeleton_setSlotsToSetupPose
+#define spSkeleton_setToSetupPose es41_spSkeleton_setToSetupPose
+#define spSkeleton_updateCache es41_spSkeleton_updateCache
+#define spSkeleton_updateWorldTransform es41_spSkeleton_updateWorldTransform
+#define spSkeleton_updateWorldTransformWith es41_spSkeleton_updateWorldTransformWith
+#define spSkin_addSkin es41_spSkin_addSkin
+#define spSkin_attachAll es41_spSkin_attachAll
+#define spSkin_clear es41_spSkin_clear
+#define spSkin_copySkin es41_spSkin_copySkin
+#define spSkin_create es41_spSkin_create
+#define spSkin_dispose es41_spSkin_dispose
+#define spSkin_getAttachment es41_spSkin_getAttachment
+#define spSkin_getAttachmentName es41_spSkin_getAttachmentName
+#define spSkin_getAttachments es41_spSkin_getAttachments
+#define spSkin_setAttachment es41_spSkin_setAttachment
+#define spSlotData_create es41_spSlotData_create
+#define spSlotData_dispose es41_spSlotData_dispose
+#define spSlotData_setAttachmentName es41_spSlotData_setAttachmentName
+#define spSlot_create es41_spSlot_create
+#define spSlot_dispose es41_spSlot_dispose
+#define spSlot_setAttachment es41_spSlot_setAttachment
+#define spSlot_setToSetupPose es41_spSlot_setToSetupPose
+#define spTextureRegionArray_add es41_spTextureRegionArray_add
+#define spTextureRegionArray_addAll es41_spTextureRegionArray_addAll
+#define spTextureRegionArray_addAllValues es41_spTextureRegionArray_addAllValues
+#define spTextureRegionArray_clear es41_spTextureRegionArray_clear
+#define spTextureRegionArray_contains es41_spTextureRegionArray_contains
+#define spTextureRegionArray_create es41_spTextureRegionArray_create
+#define spTextureRegionArray_dispose es41_spTextureRegionArray_dispose
+#define spTextureRegionArray_ensureCapacity es41_spTextureRegionArray_ensureCapacity
+#define spTextureRegionArray_peek es41_spTextureRegionArray_peek
+#define spTextureRegionArray_pop es41_spTextureRegionArray_pop
+#define spTextureRegionArray_removeAt es41_spTextureRegionArray_removeAt
+#define spTextureRegionArray_setSize es41_spTextureRegionArray_setSize
+#define spTimelineArray_add es41_spTimelineArray_add
+#define spTimelineArray_addAll es41_spTimelineArray_addAll
+#define spTimelineArray_addAllValues es41_spTimelineArray_addAllValues
+#define spTimelineArray_clear es41_spTimelineArray_clear
+#define spTimelineArray_contains es41_spTimelineArray_contains
+#define spTimelineArray_create es41_spTimelineArray_create
+#define spTimelineArray_dispose es41_spTimelineArray_dispose
+#define spTimelineArray_ensureCapacity es41_spTimelineArray_ensureCapacity
+#define spTimelineArray_peek es41_spTimelineArray_peek
+#define spTimelineArray_pop es41_spTimelineArray_pop
+#define spTimelineArray_removeAt es41_spTimelineArray_removeAt
+#define spTimelineArray_setSize es41_spTimelineArray_setSize
+#define spTimeline_apply es41_spTimeline_apply
+#define spTimeline_dispose es41_spTimeline_dispose
+#define spTimeline_getDuration es41_spTimeline_getDuration
+#define spTimeline_setBezier es41_spTimeline_setBezier
+#define spTrackEntryArray_add es41_spTrackEntryArray_add
+#define spTrackEntryArray_addAll es41_spTrackEntryArray_addAll
+#define spTrackEntryArray_addAllValues es41_spTrackEntryArray_addAllValues
+#define spTrackEntryArray_clear es41_spTrackEntryArray_clear
+#define spTrackEntryArray_contains es41_spTrackEntryArray_contains
+#define spTrackEntryArray_create es41_spTrackEntryArray_create
+#define spTrackEntryArray_dispose es41_spTrackEntryArray_dispose
+#define spTrackEntryArray_ensureCapacity es41_spTrackEntryArray_ensureCapacity
+#define spTrackEntryArray_peek es41_spTrackEntryArray_peek
+#define spTrackEntryArray_pop es41_spTrackEntryArray_pop
+#define spTrackEntryArray_removeAt es41_spTrackEntryArray_removeAt
+#define spTrackEntryArray_setSize es41_spTrackEntryArray_setSize
+#define spTrackEntry_getAnimationTime es41_spTrackEntry_getAnimationTime
+#define spTrackEntry_getTrackComplete es41_spTrackEntry_getTrackComplete
+#define spTransformConstraintDataArray_add es41_spTransformConstraintDataArray_add
+#define spTransformConstraintDataArray_addAll es41_spTransformConstraintDataArray_addAll
+#define spTransformConstraintDataArray_addAllValues es41_spTransformConstraintDataArray_addAllValues
+#define spTransformConstraintDataArray_clear es41_spTransformConstraintDataArray_clear
+#define spTransformConstraintDataArray_contains es41_spTransformConstraintDataArray_contains
+#define spTransformConstraintDataArray_create es41_spTransformConstraintDataArray_create
+#define spTransformConstraintDataArray_dispose es41_spTransformConstraintDataArray_dispose
+#define spTransformConstraintDataArray_ensureCapacity es41_spTransformConstraintDataArray_ensureCapacity
+#define spTransformConstraintDataArray_peek es41_spTransformConstraintDataArray_peek
+#define spTransformConstraintDataArray_pop es41_spTransformConstraintDataArray_pop
+#define spTransformConstraintDataArray_removeAt es41_spTransformConstraintDataArray_removeAt
+#define spTransformConstraintDataArray_setSize es41_spTransformConstraintDataArray_setSize
+#define spTransformConstraintData_create es41_spTransformConstraintData_create
+#define spTransformConstraintData_dispose es41_spTransformConstraintData_dispose
+#define spTransformConstraintTimeline_create es41_spTransformConstraintTimeline_create
+#define spTransformConstraintTimeline_setFrame es41_spTransformConstraintTimeline_setFrame
+#define spTransformConstraint_create es41_spTransformConstraint_create
+#define spTransformConstraint_dispose es41_spTransformConstraint_dispose
+#define spTransformConstraint_update es41_spTransformConstraint_update
+#define spTranslateTimeline_create es41_spTranslateTimeline_create
+#define spTranslateTimeline_setFrame es41_spTranslateTimeline_setFrame
+#define spTranslateXTimeline_create es41_spTranslateXTimeline_create
+#define spTranslateXTimeline_setFrame es41_spTranslateXTimeline_setFrame
+#define spTranslateYTimeline_create es41_spTranslateYTimeline_create
+#define spTranslateYTimeline_setFrame es41_spTranslateYTimeline_setFrame
+#define spTriangulator_create es41_spTriangulator_create
+#define spTriangulator_decompose es41_spTriangulator_decompose
+#define spTriangulator_dispose es41_spTriangulator_dispose
+#define spTriangulator_triangulate es41_spTriangulator_triangulate
+#define spUnsignedShortArray_add es41_spUnsignedShortArray_add
+#define spUnsignedShortArray_addAll es41_spUnsignedShortArray_addAll
+#define spUnsignedShortArray_addAllValues es41_spUnsignedShortArray_addAllValues
+#define spUnsignedShortArray_clear es41_spUnsignedShortArray_clear
+#define spUnsignedShortArray_contains es41_spUnsignedShortArray_contains
+#define spUnsignedShortArray_create es41_spUnsignedShortArray_create
+#define spUnsignedShortArray_dispose es41_spUnsignedShortArray_dispose
+#define spUnsignedShortArray_ensureCapacity es41_spUnsignedShortArray_ensureCapacity
+#define spUnsignedShortArray_peek es41_spUnsignedShortArray_peek
+#define spUnsignedShortArray_pop es41_spUnsignedShortArray_pop
+#define spUnsignedShortArray_removeAt es41_spUnsignedShortArray_removeAt
+#define spUnsignedShortArray_setSize es41_spUnsignedShortArray_setSize
+#define spVertexAttachment_computeWorldVertices es41_spVertexAttachment_computeWorldVertices
+#define spVertexAttachment_copyTo es41_spVertexAttachment_copyTo
diff --git a/native/spine/SpineCRename42.hpp b/native/spine/SpineCRename42.hpp
new file mode 100644
index 000000000..50edb6550
--- /dev/null
+++ b/native/spine/SpineCRename42.hpp
@@ -0,0 +1,643 @@
+// Generated by tools/spine-c-rename.mjs from the compiled spine-c 4.2 objects — DO NOT EDIT.
+// Force-included into spine-c 4.2 and the engine's backend for it, so that
+// release links beside the others in one native host (native/CMakeLists.txt).
+#pragma once
+
+#define Json_create es42_Json_create
+#define Json_dispose es42_Json_dispose
+#define Json_getError es42_Json_getError
+#define Json_getFloat es42_Json_getFloat
+#define Json_getInt es42_Json_getInt
+#define Json_getItem es42_Json_getItem
+#define Json_getItemAtIndex es42_Json_getItemAtIndex
+#define Json_getString es42_Json_getString
+#define _Entry_create es42__Entry_create
+#define _Entry_dispose es42__Entry_dispose
+#define _FromEntry_create es42__FromEntry_create
+#define _FromEntry_dispose es42__FromEntry_dispose
+#define _ToEntry_create es42__ToEntry_create
+#define _ToEntry_dispose es42__ToEntry_dispose
+#define _clip es42__clip
+#define _spAlphaTimeline_apply es42__spAlphaTimeline_apply
+#define _spAnimationState_addPropertyID es42__spAnimationState_addPropertyID
+#define _spAnimationState_addPropertyIDs es42__spAnimationState_addPropertyIDs
+#define _spAnimationState_animationsChanged es42__spAnimationState_animationsChanged
+#define _spAnimationState_applyAttachmentTimeline es42__spAnimationState_applyAttachmentTimeline
+#define _spAnimationState_applyMixingFrom es42__spAnimationState_applyMixingFrom
+#define _spAnimationState_applyRotateTimeline es42__spAnimationState_applyRotateTimeline
+#define _spAnimationState_disableQueue es42__spAnimationState_disableQueue
+#define _spAnimationState_disposeTrackEntries es42__spAnimationState_disposeTrackEntries
+#define _spAnimationState_disposeTrackEntry es42__spAnimationState_disposeTrackEntry
+#define _spAnimationState_enableQueue es42__spAnimationState_enableQueue
+#define _spAnimationState_ensureCapacityPropertyIDs es42__spAnimationState_ensureCapacityPropertyIDs
+#define _spAnimationState_expandToIndex es42__spAnimationState_expandToIndex
+#define _spAnimationState_queueEvents es42__spAnimationState_queueEvents
+#define _spAnimationState_resizeTimelinesRotation es42__spAnimationState_resizeTimelinesRotation
+#define _spAnimationState_setCurrent es42__spAnimationState_setCurrent
+#define _spAnimationState_trackEntry es42__spAnimationState_trackEntry
+#define _spAnimationState_updateMixingFrom es42__spAnimationState_updateMixingFrom
+#define _spAtlasAttachmentLoader_createAttachment es42__spAtlasAttachmentLoader_createAttachment
+#define _spAtlasPage_createTexture es42__spAtlasPage_createTexture
+#define _spAtlasPage_disposeTexture es42__spAtlasPage_disposeTexture
+#define _spAttachmentLoader_deinit es42__spAttachmentLoader_deinit
+#define _spAttachmentLoader_init es42__spAttachmentLoader_init
+#define _spAttachmentLoader_setError es42__spAttachmentLoader_setError
+#define _spAttachmentLoader_setUnknownTypeError es42__spAttachmentLoader_setUnknownTypeError
+#define _spAttachmentTimeline_apply es42__spAttachmentTimeline_apply
+#define _spAttachmentTimeline_dispose es42__spAttachmentTimeline_dispose
+#define _spAttachment_deinit es42__spAttachment_deinit
+#define _spAttachment_init es42__spAttachment_init
+#define _spBoundingBoxAttachment_copy es42__spBoundingBoxAttachment_copy
+#define _spBoundingBoxAttachment_dispose es42__spBoundingBoxAttachment_dispose
+#define _spCalloc es42__spCalloc
+#define _spClippingAttachment_copy es42__spClippingAttachment_copy
+#define _spClippingAttachment_dispose es42__spClippingAttachment_dispose
+#define _spCurveTimeline_dispose es42__spCurveTimeline_dispose
+#define _spCurveTimeline_getBezierValue es42__spCurveTimeline_getBezierValue
+#define _spCurveTimeline_init es42__spCurveTimeline_init
+#define _spCurveTimeline_setBezier es42__spCurveTimeline_setBezier
+#define _spDebug_printCurveTimeline es42__spDebug_printCurveTimeline
+#define _spDebug_printTimelineBase es42__spDebug_printTimelineBase
+#define _spDeformTimeline_apply es42__spDeformTimeline_apply
+#define _spDeformTimeline_dispose es42__spDeformTimeline_dispose
+#define _spDeformTimeline_getCurvePercent es42__spDeformTimeline_getCurvePercent
+#define _spDeformTimeline_setBezier es42__spDeformTimeline_setBezier
+#define _spDrawOrderTimeline_apply es42__spDrawOrderTimeline_apply
+#define _spDrawOrderTimeline_dispose es42__spDrawOrderTimeline_dispose
+#define _spEventQueue_addEntry es42__spEventQueue_addEntry
+#define _spEventQueue_addEvent es42__spEventQueue_addEvent
+#define _spEventQueue_addType es42__spEventQueue_addType
+#define _spEventQueue_clear es42__spEventQueue_clear
+#define _spEventQueue_complete es42__spEventQueue_complete
+#define _spEventQueue_create es42__spEventQueue_create
+#define _spEventQueue_dispose es42__spEventQueue_dispose
+#define _spEventQueue_drain es42__spEventQueue_drain
+#define _spEventQueue_end es42__spEventQueue_end
+#define _spEventQueue_ensureCapacity es42__spEventQueue_ensureCapacity
+#define _spEventQueue_event es42__spEventQueue_event
+#define _spEventQueue_free es42__spEventQueue_free
+#define _spEventQueue_interrupt es42__spEventQueue_interrupt
+#define _spEventQueue_start es42__spEventQueue_start
+#define _spEventTimeline_apply es42__spEventTimeline_apply
+#define _spEventTimeline_dispose es42__spEventTimeline_dispose
+#define _spFree es42__spFree
+#define _spIkConstraintTimeline_apply es42__spIkConstraintTimeline_apply
+#define _spInheritTimeline_apply es42__spInheritTimeline_apply
+#define _spInheritTimeline_dispose es42__spInheritTimeline_dispose
+#define _spInternalRandom es42__spInternalRandom
+#define _spMalloc es42__spMalloc
+#define _spMath_interpolate es42__spMath_interpolate
+#define _spMath_pow2_apply es42__spMath_pow2_apply
+#define _spMath_pow2out_apply es42__spMath_pow2out_apply
+#define _spMath_random es42__spMath_random
+#define _spMath_randomTriangular es42__spMath_randomTriangular
+#define _spMath_randomTriangularWith es42__spMath_randomTriangularWith
+#define _spMeshAttachment_copy es42__spMeshAttachment_copy
+#define _spMeshAttachment_dispose es42__spMeshAttachment_dispose
+#define _spPathAttachment_copy es42__spPathAttachment_copy
+#define _spPathAttachment_dispose es42__spPathAttachment_dispose
+#define _spPathConstraintMixTimeline_apply es42__spPathConstraintMixTimeline_apply
+#define _spPathConstraintPositionTimeline_apply es42__spPathConstraintPositionTimeline_apply
+#define _spPathConstraintSpacingTimeline_apply es42__spPathConstraintSpacingTimeline_apply
+#define _spPhysicsConstraintResetTimeline_apply es42__spPhysicsConstraintResetTimeline_apply
+#define _spPhysicsConstraintResetTimeline_dispose es42__spPhysicsConstraintResetTimeline_dispose
+#define _spPhysicsConstraintTimeline_apply es42__spPhysicsConstraintTimeline_apply
+#define _spPhysicsConstraintTimeline_get es42__spPhysicsConstraintTimeline_get
+#define _spPhysicsConstraintTimeline_global es42__spPhysicsConstraintTimeline_global
+#define _spPhysicsConstraintTimeline_set es42__spPhysicsConstraintTimeline_set
+#define _spPhysicsConstraintTimeline_setup es42__spPhysicsConstraintTimeline_setup
+#define _spPointAttachment_copy es42__spPointAttachment_copy
+#define _spPointAttachment_dispose es42__spPointAttachment_dispose
+#define _spRGB2Timeline_apply es42__spRGB2Timeline_apply
+#define _spRGBA2Timeline_apply es42__spRGBA2Timeline_apply
+#define _spRGBATimeline_apply es42__spRGBATimeline_apply
+#define _spRGBTimeline_apply es42__spRGBTimeline_apply
+#define _spRandom es42__spRandom
+#define _spReadFile es42__spReadFile
+#define _spRealloc es42__spRealloc
+#define _spRegionAttachment_copy es42__spRegionAttachment_copy
+#define _spRegionAttachment_dispose es42__spRegionAttachment_dispose
+#define _spRotateTimeline_apply es42__spRotateTimeline_apply
+#define _spScaleTimeline_apply es42__spScaleTimeline_apply
+#define _spScaleXTimeline_apply es42__spScaleXTimeline_apply
+#define _spScaleYTimeline_apply es42__spScaleYTimeline_apply
+#define _spSequenceTimeline_apply es42__spSequenceTimeline_apply
+#define _spSequenceTimeline_dispose es42__spSequenceTimeline_dispose
+#define _spSetDebugMalloc es42__spSetDebugMalloc
+#define _spSetFree es42__spSetFree
+#define _spSetMalloc es42__spSetMalloc
+#define _spSetRandom es42__spSetRandom
+#define _spSetRealloc es42__spSetRealloc
+#define _spShearTimeline_apply es42__spShearTimeline_apply
+#define _spShearXTimeline_apply es42__spShearXTimeline_apply
+#define _spShearYTimeline_apply es42__spShearYTimeline_apply
+#define _spSkeletonBinary_setError es42__spSkeletonBinary_setError
+#define _spSkeletonJson_setError es42__spSkeletonJson_setError
+#define _spTimeline_init es42__spTimeline_init
+#define _spTrackEntry_computeHold es42__spTrackEntry_computeHold
+#define _spTransformConstraintTimeline_apply es42__spTransformConstraintTimeline_apply
+#define _spTransformConstraint_applyAbsoluteLocal es42__spTransformConstraint_applyAbsoluteLocal
+#define _spTransformConstraint_applyAbsoluteWorld es42__spTransformConstraint_applyAbsoluteWorld
+#define _spTransformConstraint_applyRelativeLocal es42__spTransformConstraint_applyRelativeLocal
+#define _spTransformConstraint_applyRelativeWorld es42__spTransformConstraint_applyRelativeWorld
+#define _spTranslateTimeline_apply es42__spTranslateTimeline_apply
+#define _spTranslateXTimeline_apply es42__spTranslateXTimeline_apply
+#define _spTranslateYTimeline_apply es42__spTranslateYTimeline_apply
+#define _spUtil_readFile es42__spUtil_readFile
+#define _spVertexAttachment_deinit es42__spVertexAttachment_deinit
+#define _spVertexAttachment_init es42__spVertexAttachment_init
+#define findIkConstraintIndex es42_findIkConstraintIndex
+#define findPathConstraintIndex es42_findPathConstraintIndex
+#define findPhysicsConstraintIndex es42_findPhysicsConstraintIndex
+#define findTransformConstraintIndex es42_findTransformConstraintIndex
+#define indexOf es42_indexOf
+#define readFloat es42_readFloat
+#define readString es42_readString
+#define spAlphaTimeline_create es42_spAlphaTimeline_create
+#define spAlphaTimeline_setFrame es42_spAlphaTimeline_setFrame
+#define spAnimationStateData_create es42_spAnimationStateData_create
+#define spAnimationStateData_dispose es42_spAnimationStateData_dispose
+#define spAnimationStateData_getMix es42_spAnimationStateData_getMix
+#define spAnimationStateData_setMix es42_spAnimationStateData_setMix
+#define spAnimationStateData_setMixByName es42_spAnimationStateData_setMixByName
+#define spAnimationState_addAnimation es42_spAnimationState_addAnimation
+#define spAnimationState_addAnimationByName es42_spAnimationState_addAnimationByName
+#define spAnimationState_addEmptyAnimation es42_spAnimationState_addEmptyAnimation
+#define spAnimationState_apply es42_spAnimationState_apply
+#define spAnimationState_clearListenerNotifications es42_spAnimationState_clearListenerNotifications
+#define spAnimationState_clearNext es42_spAnimationState_clearNext
+#define spAnimationState_clearTrack es42_spAnimationState_clearTrack
+#define spAnimationState_clearTracks es42_spAnimationState_clearTracks
+#define spAnimationState_create es42_spAnimationState_create
+#define spAnimationState_dispose es42_spAnimationState_dispose
+#define spAnimationState_disposeStatics es42_spAnimationState_disposeStatics
+#define spAnimationState_getCurrent es42_spAnimationState_getCurrent
+#define spAnimationState_setAnimation es42_spAnimationState_setAnimation
+#define spAnimationState_setAnimationByName es42_spAnimationState_setAnimationByName
+#define spAnimationState_setEmptyAnimation es42_spAnimationState_setEmptyAnimation
+#define spAnimationState_setEmptyAnimations es42_spAnimationState_setEmptyAnimations
+#define spAnimationState_update es42_spAnimationState_update
+#define spAnimation_apply es42_spAnimation_apply
+#define spAnimation_create es42_spAnimation_create
+#define spAnimation_dispose es42_spAnimation_dispose
+#define spAnimation_hasTimeline es42_spAnimation_hasTimeline
+#define spArrayFloatArray_add es42_spArrayFloatArray_add
+#define spArrayFloatArray_addAll es42_spArrayFloatArray_addAll
+#define spArrayFloatArray_addAllValues es42_spArrayFloatArray_addAllValues
+#define spArrayFloatArray_clear es42_spArrayFloatArray_clear
+#define spArrayFloatArray_contains es42_spArrayFloatArray_contains
+#define spArrayFloatArray_create es42_spArrayFloatArray_create
+#define spArrayFloatArray_dispose es42_spArrayFloatArray_dispose
+#define spArrayFloatArray_ensureCapacity es42_spArrayFloatArray_ensureCapacity
+#define spArrayFloatArray_peek es42_spArrayFloatArray_peek
+#define spArrayFloatArray_pop es42_spArrayFloatArray_pop
+#define spArrayFloatArray_removeAt es42_spArrayFloatArray_removeAt
+#define spArrayFloatArray_setSize es42_spArrayFloatArray_setSize
+#define spArrayShortArray_add es42_spArrayShortArray_add
+#define spArrayShortArray_addAll es42_spArrayShortArray_addAll
+#define spArrayShortArray_addAllValues es42_spArrayShortArray_addAllValues
+#define spArrayShortArray_clear es42_spArrayShortArray_clear
+#define spArrayShortArray_contains es42_spArrayShortArray_contains
+#define spArrayShortArray_create es42_spArrayShortArray_create
+#define spArrayShortArray_dispose es42_spArrayShortArray_dispose
+#define spArrayShortArray_ensureCapacity es42_spArrayShortArray_ensureCapacity
+#define spArrayShortArray_peek es42_spArrayShortArray_peek
+#define spArrayShortArray_pop es42_spArrayShortArray_pop
+#define spArrayShortArray_removeAt es42_spArrayShortArray_removeAt
+#define spArrayShortArray_setSize es42_spArrayShortArray_setSize
+#define spAtlasAttachmentLoader_create es42_spAtlasAttachmentLoader_create
+#define spAtlasPage_create es42_spAtlasPage_create
+#define spAtlasPage_dispose es42_spAtlasPage_dispose
+#define spAtlasRegion_create es42_spAtlasRegion_create
+#define spAtlasRegion_dispose es42_spAtlasRegion_dispose
+#define spAtlas_create es42_spAtlas_create
+#define spAtlas_createFromFile es42_spAtlas_createFromFile
+#define spAtlas_dispose es42_spAtlas_dispose
+#define spAtlas_findRegion es42_spAtlas_findRegion
+#define spAttachmentLoader_configureAttachment es42_spAttachmentLoader_configureAttachment
+#define spAttachmentLoader_createAttachment es42_spAttachmentLoader_createAttachment
+#define spAttachmentLoader_dispose es42_spAttachmentLoader_dispose
+#define spAttachmentLoader_disposeAttachment es42_spAttachmentLoader_disposeAttachment
+#define spAttachmentTimeline_create es42_spAttachmentTimeline_create
+#define spAttachmentTimeline_setFrame es42_spAttachmentTimeline_setFrame
+#define spAttachment_copy es42_spAttachment_copy
+#define spAttachment_dispose es42_spAttachment_dispose
+#define spBoneDataArray_add es42_spBoneDataArray_add
+#define spBoneDataArray_addAll es42_spBoneDataArray_addAll
+#define spBoneDataArray_addAllValues es42_spBoneDataArray_addAllValues
+#define spBoneDataArray_clear es42_spBoneDataArray_clear
+#define spBoneDataArray_contains es42_spBoneDataArray_contains
+#define spBoneDataArray_create es42_spBoneDataArray_create
+#define spBoneDataArray_dispose es42_spBoneDataArray_dispose
+#define spBoneDataArray_ensureCapacity es42_spBoneDataArray_ensureCapacity
+#define spBoneDataArray_peek es42_spBoneDataArray_peek
+#define spBoneDataArray_pop es42_spBoneDataArray_pop
+#define spBoneDataArray_removeAt es42_spBoneDataArray_removeAt
+#define spBoneDataArray_setSize es42_spBoneDataArray_setSize
+#define spBoneData_create es42_spBoneData_create
+#define spBoneData_dispose es42_spBoneData_dispose
+#define spBone_create es42_spBone_create
+#define spBone_dispose es42_spBone_dispose
+#define spBone_getWorldRotationX es42_spBone_getWorldRotationX
+#define spBone_getWorldRotationY es42_spBone_getWorldRotationY
+#define spBone_getWorldScaleX es42_spBone_getWorldScaleX
+#define spBone_getWorldScaleY es42_spBone_getWorldScaleY
+#define spBone_isYDown es42_spBone_isYDown
+#define spBone_localToWorld es42_spBone_localToWorld
+#define spBone_localToWorldRotation es42_spBone_localToWorldRotation
+#define spBone_parentToWorld es42_spBone_parentToWorld
+#define spBone_rotateWorld es42_spBone_rotateWorld
+#define spBone_setToSetupPose es42_spBone_setToSetupPose
+#define spBone_setYDown es42_spBone_setYDown
+#define spBone_update es42_spBone_update
+#define spBone_updateAppliedTransform es42_spBone_updateAppliedTransform
+#define spBone_updateWorldTransform es42_spBone_updateWorldTransform
+#define spBone_updateWorldTransformWith es42_spBone_updateWorldTransformWith
+#define spBone_worldToLocal es42_spBone_worldToLocal
+#define spBone_worldToLocalRotation es42_spBone_worldToLocalRotation
+#define spBone_worldToParent es42_spBone_worldToParent
+#define spBoundingBoxAttachment_create es42_spBoundingBoxAttachment_create
+#define spClippingAttachment_create es42_spClippingAttachment_create
+#define spColor_addColor es42_spColor_addColor
+#define spColor_addFloats es42_spColor_addFloats
+#define spColor_addFloats3 es42_spColor_addFloats3
+#define spColor_clamp es42_spColor_clamp
+#define spColor_create es42_spColor_create
+#define spColor_dispose es42_spColor_dispose
+#define spColor_setFromColor es42_spColor_setFromColor
+#define spColor_setFromColor3 es42_spColor_setFromColor3
+#define spColor_setFromFloats es42_spColor_setFromFloats
+#define spColor_setFromFloats3 es42_spColor_setFromFloats3
+#define spCurveTimeline1_getAbsoluteValue es42_spCurveTimeline1_getAbsoluteValue
+#define spCurveTimeline1_getAbsoluteValue2 es42_spCurveTimeline1_getAbsoluteValue2
+#define spCurveTimeline1_getCurveValue es42_spCurveTimeline1_getCurveValue
+#define spCurveTimeline1_getRelativeValue es42_spCurveTimeline1_getRelativeValue
+#define spCurveTimeline1_getScaleValue es42_spCurveTimeline1_getScaleValue
+#define spCurveTimeline1_setFrame es42_spCurveTimeline1_setFrame
+#define spCurveTimeline2_setFrame es42_spCurveTimeline2_setFrame
+#define spCurveTimeline_setLinear es42_spCurveTimeline_setLinear
+#define spCurveTimeline_setStepped es42_spCurveTimeline_setStepped
+#define spDebug_printAnimation es42_spDebug_printAnimation
+#define spDebug_printBone es42_spDebug_printBone
+#define spDebug_printBoneData es42_spDebug_printBoneData
+#define spDebug_printBoneDatas es42_spDebug_printBoneDatas
+#define spDebug_printBones es42_spDebug_printBones
+#define spDebug_printFloats es42_spDebug_printFloats
+#define spDebug_printSkeleton es42_spDebug_printSkeleton
+#define spDebug_printSkeletonData es42_spDebug_printSkeletonData
+#define spDebug_printTimeline es42_spDebug_printTimeline
+#define spDeformTimeline_create es42_spDeformTimeline_create
+#define spDeformTimeline_setFrame es42_spDeformTimeline_setFrame
+#define spDrawOrderTimeline_create es42_spDrawOrderTimeline_create
+#define spDrawOrderTimeline_setFrame es42_spDrawOrderTimeline_setFrame
+#define spEventData_create es42_spEventData_create
+#define spEventData_dispose es42_spEventData_dispose
+#define spEventTimeline_create es42_spEventTimeline_create
+#define spEventTimeline_setFrame es42_spEventTimeline_setFrame
+#define spEvent_create es42_spEvent_create
+#define spEvent_dispose es42_spEvent_dispose
+#define spFloatArray_add es42_spFloatArray_add
+#define spFloatArray_addAll es42_spFloatArray_addAll
+#define spFloatArray_addAllValues es42_spFloatArray_addAllValues
+#define spFloatArray_clear es42_spFloatArray_clear
+#define spFloatArray_contains es42_spFloatArray_contains
+#define spFloatArray_create es42_spFloatArray_create
+#define spFloatArray_dispose es42_spFloatArray_dispose
+#define spFloatArray_ensureCapacity es42_spFloatArray_ensureCapacity
+#define spFloatArray_peek es42_spFloatArray_peek
+#define spFloatArray_pop es42_spFloatArray_pop
+#define spFloatArray_removeAt es42_spFloatArray_removeAt
+#define spFloatArray_setSize es42_spFloatArray_setSize
+#define spIkConstraintDataArray_add es42_spIkConstraintDataArray_add
+#define spIkConstraintDataArray_addAll es42_spIkConstraintDataArray_addAll
+#define spIkConstraintDataArray_addAllValues es42_spIkConstraintDataArray_addAllValues
+#define spIkConstraintDataArray_clear es42_spIkConstraintDataArray_clear
+#define spIkConstraintDataArray_contains es42_spIkConstraintDataArray_contains
+#define spIkConstraintDataArray_create es42_spIkConstraintDataArray_create
+#define spIkConstraintDataArray_dispose es42_spIkConstraintDataArray_dispose
+#define spIkConstraintDataArray_ensureCapacity es42_spIkConstraintDataArray_ensureCapacity
+#define spIkConstraintDataArray_peek es42_spIkConstraintDataArray_peek
+#define spIkConstraintDataArray_pop es42_spIkConstraintDataArray_pop
+#define spIkConstraintDataArray_removeAt es42_spIkConstraintDataArray_removeAt
+#define spIkConstraintDataArray_setSize es42_spIkConstraintDataArray_setSize
+#define spIkConstraintData_create es42_spIkConstraintData_create
+#define spIkConstraintData_dispose es42_spIkConstraintData_dispose
+#define spIkConstraintTimeline_create es42_spIkConstraintTimeline_create
+#define spIkConstraintTimeline_setFrame es42_spIkConstraintTimeline_setFrame
+#define spIkConstraint_apply1 es42_spIkConstraint_apply1
+#define spIkConstraint_apply2 es42_spIkConstraint_apply2
+#define spIkConstraint_create es42_spIkConstraint_create
+#define spIkConstraint_dispose es42_spIkConstraint_dispose
+#define spIkConstraint_setToSetupPose es42_spIkConstraint_setToSetupPose
+#define spIkConstraint_update es42_spIkConstraint_update
+#define spInheritTimeline_create es42_spInheritTimeline_create
+#define spInheritTimeline_setFrame es42_spInheritTimeline_setFrame
+#define spIntArray_add es42_spIntArray_add
+#define spIntArray_addAll es42_spIntArray_addAll
+#define spIntArray_addAllValues es42_spIntArray_addAllValues
+#define spIntArray_clear es42_spIntArray_clear
+#define spIntArray_contains es42_spIntArray_contains
+#define spIntArray_create es42_spIntArray_create
+#define spIntArray_dispose es42_spIntArray_dispose
+#define spIntArray_ensureCapacity es42_spIntArray_ensureCapacity
+#define spIntArray_peek es42_spIntArray_peek
+#define spIntArray_pop es42_spIntArray_pop
+#define spIntArray_removeAt es42_spIntArray_removeAt
+#define spIntArray_setSize es42_spIntArray_setSize
+#define spKeyValueArray_add es42_spKeyValueArray_add
+#define spKeyValueArray_addAll es42_spKeyValueArray_addAll
+#define spKeyValueArray_addAllValues es42_spKeyValueArray_addAllValues
+#define spKeyValueArray_clear es42_spKeyValueArray_clear
+#define spKeyValueArray_contains es42_spKeyValueArray_contains
+#define spKeyValueArray_create es42_spKeyValueArray_create
+#define spKeyValueArray_dispose es42_spKeyValueArray_dispose
+#define spKeyValueArray_ensureCapacity es42_spKeyValueArray_ensureCapacity
+#define spKeyValueArray_peek es42_spKeyValueArray_peek
+#define spKeyValueArray_pop es42_spKeyValueArray_pop
+#define spKeyValueArray_setSize es42_spKeyValueArray_setSize
+#define spMeshAttachment_create es42_spMeshAttachment_create
+#define spMeshAttachment_newLinkedMesh es42_spMeshAttachment_newLinkedMesh
+#define spMeshAttachment_setParentMesh es42_spMeshAttachment_setParentMesh
+#define spMeshAttachment_updateRegion es42_spMeshAttachment_updateRegion
+#define spPathAttachment_create es42_spPathAttachment_create
+#define spPathConstraintDataArray_add es42_spPathConstraintDataArray_add
+#define spPathConstraintDataArray_addAll es42_spPathConstraintDataArray_addAll
+#define spPathConstraintDataArray_addAllValues es42_spPathConstraintDataArray_addAllValues
+#define spPathConstraintDataArray_clear es42_spPathConstraintDataArray_clear
+#define spPathConstraintDataArray_contains es42_spPathConstraintDataArray_contains
+#define spPathConstraintDataArray_create es42_spPathConstraintDataArray_create
+#define spPathConstraintDataArray_dispose es42_spPathConstraintDataArray_dispose
+#define spPathConstraintDataArray_ensureCapacity es42_spPathConstraintDataArray_ensureCapacity
+#define spPathConstraintDataArray_peek es42_spPathConstraintDataArray_peek
+#define spPathConstraintDataArray_pop es42_spPathConstraintDataArray_pop
+#define spPathConstraintDataArray_removeAt es42_spPathConstraintDataArray_removeAt
+#define spPathConstraintDataArray_setSize es42_spPathConstraintDataArray_setSize
+#define spPathConstraintData_create es42_spPathConstraintData_create
+#define spPathConstraintData_dispose es42_spPathConstraintData_dispose
+#define spPathConstraintMixTimeline_create es42_spPathConstraintMixTimeline_create
+#define spPathConstraintMixTimeline_setFrame es42_spPathConstraintMixTimeline_setFrame
+#define spPathConstraintPositionTimeline_create es42_spPathConstraintPositionTimeline_create
+#define spPathConstraintPositionTimeline_setFrame es42_spPathConstraintPositionTimeline_setFrame
+#define spPathConstraintSpacingTimeline_create es42_spPathConstraintSpacingTimeline_create
+#define spPathConstraintSpacingTimeline_setFrame es42_spPathConstraintSpacingTimeline_setFrame
+#define spPathConstraint_computeWorldPositions es42_spPathConstraint_computeWorldPositions
+#define spPathConstraint_create es42_spPathConstraint_create
+#define spPathConstraint_dispose es42_spPathConstraint_dispose
+#define spPathConstraint_setToSetupPose es42_spPathConstraint_setToSetupPose
+#define spPathConstraint_update es42_spPathConstraint_update
+#define spPhysicsConstraintDataArray_add es42_spPhysicsConstraintDataArray_add
+#define spPhysicsConstraintDataArray_addAll es42_spPhysicsConstraintDataArray_addAll
+#define spPhysicsConstraintDataArray_addAllValues es42_spPhysicsConstraintDataArray_addAllValues
+#define spPhysicsConstraintDataArray_clear es42_spPhysicsConstraintDataArray_clear
+#define spPhysicsConstraintDataArray_contains es42_spPhysicsConstraintDataArray_contains
+#define spPhysicsConstraintDataArray_create es42_spPhysicsConstraintDataArray_create
+#define spPhysicsConstraintDataArray_dispose es42_spPhysicsConstraintDataArray_dispose
+#define spPhysicsConstraintDataArray_ensureCapacity es42_spPhysicsConstraintDataArray_ensureCapacity
+#define spPhysicsConstraintDataArray_peek es42_spPhysicsConstraintDataArray_peek
+#define spPhysicsConstraintDataArray_pop es42_spPhysicsConstraintDataArray_pop
+#define spPhysicsConstraintDataArray_removeAt es42_spPhysicsConstraintDataArray_removeAt
+#define spPhysicsConstraintDataArray_setSize es42_spPhysicsConstraintDataArray_setSize
+#define spPhysicsConstraintData_create es42_spPhysicsConstraintData_create
+#define spPhysicsConstraintData_dispose es42_spPhysicsConstraintData_dispose
+#define spPhysicsConstraintResetTimeline_create es42_spPhysicsConstraintResetTimeline_create
+#define spPhysicsConstraintResetTimeline_setFrame es42_spPhysicsConstraintResetTimeline_setFrame
+#define spPhysicsConstraintTimeline_create es42_spPhysicsConstraintTimeline_create
+#define spPhysicsConstraintTimeline_setFrame es42_spPhysicsConstraintTimeline_setFrame
+#define spPhysicsConstraint_create es42_spPhysicsConstraint_create
+#define spPhysicsConstraint_dispose es42_spPhysicsConstraint_dispose
+#define spPhysicsConstraint_reset es42_spPhysicsConstraint_reset
+#define spPhysicsConstraint_rotate es42_spPhysicsConstraint_rotate
+#define spPhysicsConstraint_setToSetupPose es42_spPhysicsConstraint_setToSetupPose
+#define spPhysicsConstraint_translate es42_spPhysicsConstraint_translate
+#define spPhysicsConstraint_update es42_spPhysicsConstraint_update
+#define spPointAttachment_computeWorldPosition es42_spPointAttachment_computeWorldPosition
+#define spPointAttachment_computeWorldRotation es42_spPointAttachment_computeWorldRotation
+#define spPointAttachment_create es42_spPointAttachment_create
+#define spPolygon_containsPoint es42_spPolygon_containsPoint
+#define spPolygon_create es42_spPolygon_create
+#define spPolygon_dispose es42_spPolygon_dispose
+#define spPolygon_intersectsSegment es42_spPolygon_intersectsSegment
+#define spPropertyIdArray_add es42_spPropertyIdArray_add
+#define spPropertyIdArray_addAll es42_spPropertyIdArray_addAll
+#define spPropertyIdArray_addAllValues es42_spPropertyIdArray_addAllValues
+#define spPropertyIdArray_clear es42_spPropertyIdArray_clear
+#define spPropertyIdArray_contains es42_spPropertyIdArray_contains
+#define spPropertyIdArray_create es42_spPropertyIdArray_create
+#define spPropertyIdArray_dispose es42_spPropertyIdArray_dispose
+#define spPropertyIdArray_ensureCapacity es42_spPropertyIdArray_ensureCapacity
+#define spPropertyIdArray_peek es42_spPropertyIdArray_peek
+#define spPropertyIdArray_pop es42_spPropertyIdArray_pop
+#define spPropertyIdArray_removeAt es42_spPropertyIdArray_removeAt
+#define spPropertyIdArray_setSize es42_spPropertyIdArray_setSize
+#define spRGB2Timeline_create es42_spRGB2Timeline_create
+#define spRGB2Timeline_setFrame es42_spRGB2Timeline_setFrame
+#define spRGBA2Timeline_create es42_spRGBA2Timeline_create
+#define spRGBA2Timeline_setFrame es42_spRGBA2Timeline_setFrame
+#define spRGBATimeline_create es42_spRGBATimeline_create
+#define spRGBATimeline_setFrame es42_spRGBATimeline_setFrame
+#define spRGBTimeline_create es42_spRGBTimeline_create
+#define spRGBTimeline_setFrame es42_spRGBTimeline_setFrame
+#define spRegionAttachment_computeWorldVertices es42_spRegionAttachment_computeWorldVertices
+#define spRegionAttachment_create es42_spRegionAttachment_create
+#define spRegionAttachment_updateRegion es42_spRegionAttachment_updateRegion
+#define spRotateTimeline_create es42_spRotateTimeline_create
+#define spRotateTimeline_setFrame es42_spRotateTimeline_setFrame
+#define spScaleTimeline_create es42_spScaleTimeline_create
+#define spScaleTimeline_setFrame es42_spScaleTimeline_setFrame
+#define spScaleXTimeline_create es42_spScaleXTimeline_create
+#define spScaleXTimeline_setFrame es42_spScaleXTimeline_setFrame
+#define spScaleYTimeline_create es42_spScaleYTimeline_create
+#define spScaleYTimeline_setFrame es42_spScaleYTimeline_setFrame
+#define spSequenceTimeline_create es42_spSequenceTimeline_create
+#define spSequenceTimeline_setFrame es42_spSequenceTimeline_setFrame
+#define spSequence_apply es42_spSequence_apply
+#define spSequence_copy es42_spSequence_copy
+#define spSequence_create es42_spSequence_create
+#define spSequence_dispose es42_spSequence_dispose
+#define spSequence_getPath es42_spSequence_getPath
+#define spShearTimeline_create es42_spShearTimeline_create
+#define spShearTimeline_setFrame es42_spShearTimeline_setFrame
+#define spShearXTimeline_create es42_spShearXTimeline_create
+#define spShearXTimeline_setFrame es42_spShearXTimeline_setFrame
+#define spShearYTimeline_create es42_spShearYTimeline_create
+#define spShearYTimeline_setFrame es42_spShearYTimeline_setFrame
+#define spShortArray_add es42_spShortArray_add
+#define spShortArray_addAll es42_spShortArray_addAll
+#define spShortArray_addAllValues es42_spShortArray_addAllValues
+#define spShortArray_clear es42_spShortArray_clear
+#define spShortArray_contains es42_spShortArray_contains
+#define spShortArray_create es42_spShortArray_create
+#define spShortArray_dispose es42_spShortArray_dispose
+#define spShortArray_ensureCapacity es42_spShortArray_ensureCapacity
+#define spShortArray_peek es42_spShortArray_peek
+#define spShortArray_pop es42_spShortArray_pop
+#define spShortArray_removeAt es42_spShortArray_removeAt
+#define spShortArray_setSize es42_spShortArray_setSize
+#define spSkeletonBinary_create es42_spSkeletonBinary_create
+#define spSkeletonBinary_createWithLoader es42_spSkeletonBinary_createWithLoader
+#define spSkeletonBinary_dispose es42_spSkeletonBinary_dispose
+#define spSkeletonBinary_readAttachment es42_spSkeletonBinary_readAttachment
+#define spSkeletonBinary_readSkeletonData es42_spSkeletonBinary_readSkeletonData
+#define spSkeletonBinary_readSkeletonDataFile es42_spSkeletonBinary_readSkeletonDataFile
+#define spSkeletonBinary_readSkin es42_spSkeletonBinary_readSkin
+#define spSkeletonBounds_aabbContainsPoint es42_spSkeletonBounds_aabbContainsPoint
+#define spSkeletonBounds_aabbIntersectsSegment es42_spSkeletonBounds_aabbIntersectsSegment
+#define spSkeletonBounds_aabbIntersectsSkeleton es42_spSkeletonBounds_aabbIntersectsSkeleton
+#define spSkeletonBounds_containsPoint es42_spSkeletonBounds_containsPoint
+#define spSkeletonBounds_create es42_spSkeletonBounds_create
+#define spSkeletonBounds_dispose es42_spSkeletonBounds_dispose
+#define spSkeletonBounds_getPolygon es42_spSkeletonBounds_getPolygon
+#define spSkeletonBounds_intersectsSegment es42_spSkeletonBounds_intersectsSegment
+#define spSkeletonBounds_update es42_spSkeletonBounds_update
+#define spSkeletonClipping_clipEnd es42_spSkeletonClipping_clipEnd
+#define spSkeletonClipping_clipEnd2 es42_spSkeletonClipping_clipEnd2
+#define spSkeletonClipping_clipStart es42_spSkeletonClipping_clipStart
+#define spSkeletonClipping_clipTriangles es42_spSkeletonClipping_clipTriangles
+#define spSkeletonClipping_create es42_spSkeletonClipping_create
+#define spSkeletonClipping_dispose es42_spSkeletonClipping_dispose
+#define spSkeletonClipping_isClipping es42_spSkeletonClipping_isClipping
+#define spSkeletonData_create es42_spSkeletonData_create
+#define spSkeletonData_dispose es42_spSkeletonData_dispose
+#define spSkeletonData_findAnimation es42_spSkeletonData_findAnimation
+#define spSkeletonData_findBone es42_spSkeletonData_findBone
+#define spSkeletonData_findEvent es42_spSkeletonData_findEvent
+#define spSkeletonData_findIkConstraint es42_spSkeletonData_findIkConstraint
+#define spSkeletonData_findPathConstraint es42_spSkeletonData_findPathConstraint
+#define spSkeletonData_findPhysicsConstraint es42_spSkeletonData_findPhysicsConstraint
+#define spSkeletonData_findSkin es42_spSkeletonData_findSkin
+#define spSkeletonData_findSlot es42_spSkeletonData_findSlot
+#define spSkeletonData_findTransformConstraint es42_spSkeletonData_findTransformConstraint
+#define spSkeletonJson_create es42_spSkeletonJson_create
+#define spSkeletonJson_createWithLoader es42_spSkeletonJson_createWithLoader
+#define spSkeletonJson_dispose es42_spSkeletonJson_dispose
+#define spSkeletonJson_readSkeletonData es42_spSkeletonJson_readSkeletonData
+#define spSkeletonJson_readSkeletonDataFile es42_spSkeletonJson_readSkeletonDataFile
+#define spSkeleton_create es42_spSkeleton_create
+#define spSkeleton_dispose es42_spSkeleton_dispose
+#define spSkeleton_findBone es42_spSkeleton_findBone
+#define spSkeleton_findIkConstraint es42_spSkeleton_findIkConstraint
+#define spSkeleton_findPathConstraint es42_spSkeleton_findPathConstraint
+#define spSkeleton_findPhysicsConstraint es42_spSkeleton_findPhysicsConstraint
+#define spSkeleton_findSlot es42_spSkeleton_findSlot
+#define spSkeleton_findTransformConstraint es42_spSkeleton_findTransformConstraint
+#define spSkeleton_getAttachmentForSlotIndex es42_spSkeleton_getAttachmentForSlotIndex
+#define spSkeleton_getAttachmentForSlotName es42_spSkeleton_getAttachmentForSlotName
+#define spSkeleton_physicsRotate es42_spSkeleton_physicsRotate
+#define spSkeleton_physicsTranslate es42_spSkeleton_physicsTranslate
+#define spSkeleton_setAttachment es42_spSkeleton_setAttachment
+#define spSkeleton_setBonesToSetupPose es42_spSkeleton_setBonesToSetupPose
+#define spSkeleton_setSkin es42_spSkeleton_setSkin
+#define spSkeleton_setSkinByName es42_spSkeleton_setSkinByName
+#define spSkeleton_setSlotsToSetupPose es42_spSkeleton_setSlotsToSetupPose
+#define spSkeleton_setToSetupPose es42_spSkeleton_setToSetupPose
+#define spSkeleton_update es42_spSkeleton_update
+#define spSkeleton_updateCache es42_spSkeleton_updateCache
+#define spSkeleton_updateWorldTransform es42_spSkeleton_updateWorldTransform
+#define spSkeleton_updateWorldTransformWith es42_spSkeleton_updateWorldTransformWith
+#define spSkin_addSkin es42_spSkin_addSkin
+#define spSkin_attachAll es42_spSkin_attachAll
+#define spSkin_clear es42_spSkin_clear
+#define spSkin_copySkin es42_spSkin_copySkin
+#define spSkin_create es42_spSkin_create
+#define spSkin_dispose es42_spSkin_dispose
+#define spSkin_getAttachment es42_spSkin_getAttachment
+#define spSkin_getAttachmentName es42_spSkin_getAttachmentName
+#define spSkin_getAttachments es42_spSkin_getAttachments
+#define spSkin_setAttachment es42_spSkin_setAttachment
+#define spSlotData_create es42_spSlotData_create
+#define spSlotData_dispose es42_spSlotData_dispose
+#define spSlotData_setAttachmentName es42_spSlotData_setAttachmentName
+#define spSlot_create es42_spSlot_create
+#define spSlot_dispose es42_spSlot_dispose
+#define spSlot_setAttachment es42_spSlot_setAttachment
+#define spSlot_setToSetupPose es42_spSlot_setToSetupPose
+#define spTextureRegionArray_add es42_spTextureRegionArray_add
+#define spTextureRegionArray_addAll es42_spTextureRegionArray_addAll
+#define spTextureRegionArray_addAllValues es42_spTextureRegionArray_addAllValues
+#define spTextureRegionArray_clear es42_spTextureRegionArray_clear
+#define spTextureRegionArray_contains es42_spTextureRegionArray_contains
+#define spTextureRegionArray_create es42_spTextureRegionArray_create
+#define spTextureRegionArray_dispose es42_spTextureRegionArray_dispose
+#define spTextureRegionArray_ensureCapacity es42_spTextureRegionArray_ensureCapacity
+#define spTextureRegionArray_peek es42_spTextureRegionArray_peek
+#define spTextureRegionArray_pop es42_spTextureRegionArray_pop
+#define spTextureRegionArray_removeAt es42_spTextureRegionArray_removeAt
+#define spTextureRegionArray_setSize es42_spTextureRegionArray_setSize
+#define spTimelineArray_add es42_spTimelineArray_add
+#define spTimelineArray_addAll es42_spTimelineArray_addAll
+#define spTimelineArray_addAllValues es42_spTimelineArray_addAllValues
+#define spTimelineArray_clear es42_spTimelineArray_clear
+#define spTimelineArray_contains es42_spTimelineArray_contains
+#define spTimelineArray_create es42_spTimelineArray_create
+#define spTimelineArray_dispose es42_spTimelineArray_dispose
+#define spTimelineArray_ensureCapacity es42_spTimelineArray_ensureCapacity
+#define spTimelineArray_peek es42_spTimelineArray_peek
+#define spTimelineArray_pop es42_spTimelineArray_pop
+#define spTimelineArray_removeAt es42_spTimelineArray_removeAt
+#define spTimelineArray_setSize es42_spTimelineArray_setSize
+#define spTimeline_apply es42_spTimeline_apply
+#define spTimeline_dispose es42_spTimeline_dispose
+#define spTimeline_getDuration es42_spTimeline_getDuration
+#define spTimeline_setBezier es42_spTimeline_setBezier
+#define spTrackEntryArray_add es42_spTrackEntryArray_add
+#define spTrackEntryArray_addAll es42_spTrackEntryArray_addAll
+#define spTrackEntryArray_addAllValues es42_spTrackEntryArray_addAllValues
+#define spTrackEntryArray_clear es42_spTrackEntryArray_clear
+#define spTrackEntryArray_contains es42_spTrackEntryArray_contains
+#define spTrackEntryArray_create es42_spTrackEntryArray_create
+#define spTrackEntryArray_dispose es42_spTrackEntryArray_dispose
+#define spTrackEntryArray_ensureCapacity es42_spTrackEntryArray_ensureCapacity
+#define spTrackEntryArray_peek es42_spTrackEntryArray_peek
+#define spTrackEntryArray_pop es42_spTrackEntryArray_pop
+#define spTrackEntryArray_removeAt es42_spTrackEntryArray_removeAt
+#define spTrackEntryArray_setSize es42_spTrackEntryArray_setSize
+#define spTrackEntry_getAnimationTime es42_spTrackEntry_getAnimationTime
+#define spTrackEntry_getTrackComplete es42_spTrackEntry_getTrackComplete
+#define spTrackEntry_isNextReady es42_spTrackEntry_isNextReady
+#define spTrackEntry_resetRotationDirections es42_spTrackEntry_resetRotationDirections
+#define spTrackEntry_setMixDuration es42_spTrackEntry_setMixDuration
+#define spTrackEntry_wasApplied es42_spTrackEntry_wasApplied
+#define spTransformConstraintDataArray_add es42_spTransformConstraintDataArray_add
+#define spTransformConstraintDataArray_addAll es42_spTransformConstraintDataArray_addAll
+#define spTransformConstraintDataArray_addAllValues es42_spTransformConstraintDataArray_addAllValues
+#define spTransformConstraintDataArray_clear es42_spTransformConstraintDataArray_clear
+#define spTransformConstraintDataArray_contains es42_spTransformConstraintDataArray_contains
+#define spTransformConstraintDataArray_create es42_spTransformConstraintDataArray_create
+#define spTransformConstraintDataArray_dispose es42_spTransformConstraintDataArray_dispose
+#define spTransformConstraintDataArray_ensureCapacity es42_spTransformConstraintDataArray_ensureCapacity
+#define spTransformConstraintDataArray_peek es42_spTransformConstraintDataArray_peek
+#define spTransformConstraintDataArray_pop es42_spTransformConstraintDataArray_pop
+#define spTransformConstraintDataArray_removeAt es42_spTransformConstraintDataArray_removeAt
+#define spTransformConstraintDataArray_setSize es42_spTransformConstraintDataArray_setSize
+#define spTransformConstraintData_create es42_spTransformConstraintData_create
+#define spTransformConstraintData_dispose es42_spTransformConstraintData_dispose
+#define spTransformConstraintTimeline_create es42_spTransformConstraintTimeline_create
+#define spTransformConstraintTimeline_setFrame es42_spTransformConstraintTimeline_setFrame
+#define spTransformConstraint_create es42_spTransformConstraint_create
+#define spTransformConstraint_dispose es42_spTransformConstraint_dispose
+#define spTransformConstraint_setToSetupPose es42_spTransformConstraint_setToSetupPose
+#define spTransformConstraint_update es42_spTransformConstraint_update
+#define spTranslateTimeline_create es42_spTranslateTimeline_create
+#define spTranslateTimeline_setFrame es42_spTranslateTimeline_setFrame
+#define spTranslateXTimeline_create es42_spTranslateXTimeline_create
+#define spTranslateXTimeline_setFrame es42_spTranslateXTimeline_setFrame
+#define spTranslateYTimeline_create es42_spTranslateYTimeline_create
+#define spTranslateYTimeline_setFrame es42_spTranslateYTimeline_setFrame
+#define spTriangulator_create es42_spTriangulator_create
+#define spTriangulator_decompose es42_spTriangulator_decompose
+#define spTriangulator_dispose es42_spTriangulator_dispose
+#define spTriangulator_triangulate es42_spTriangulator_triangulate
+#define spUnsignedShortArray_add es42_spUnsignedShortArray_add
+#define spUnsignedShortArray_addAll es42_spUnsignedShortArray_addAll
+#define spUnsignedShortArray_addAllValues es42_spUnsignedShortArray_addAllValues
+#define spUnsignedShortArray_clear es42_spUnsignedShortArray_clear
+#define spUnsignedShortArray_contains es42_spUnsignedShortArray_contains
+#define spUnsignedShortArray_create es42_spUnsignedShortArray_create
+#define spUnsignedShortArray_dispose es42_spUnsignedShortArray_dispose
+#define spUnsignedShortArray_ensureCapacity es42_spUnsignedShortArray_ensureCapacity
+#define spUnsignedShortArray_peek es42_spUnsignedShortArray_peek
+#define spUnsignedShortArray_pop es42_spUnsignedShortArray_pop
+#define spUnsignedShortArray_removeAt es42_spUnsignedShortArray_removeAt
+#define spUnsignedShortArray_setSize es42_spUnsignedShortArray_setSize
+#define spVertexAttachment_computeWorldVertices es42_spVertexAttachment_computeWorldVertices
+#define spVertexAttachment_copyTo es42_spVertexAttachment_copyTo
diff --git a/pipeline/src/export/exportGame.ts b/pipeline/src/export/exportGame.ts
index 606d716e0..75c84ff50 100644
--- a/pipeline/src/export/exportGame.ts
+++ b/pipeline/src/export/exportGame.ts
@@ -71,7 +71,7 @@ import { orientationCss, orientationOverlayHtml, orientationLockScript, orientat
import { PAGE_BACKGROUND, splashCss, splashHtml, type SplashLook } from './splash';
import { emitIosXcodeProject, type IosProjectSources } from '../../../build-tools/utils/iosProject.js';
import { emitAndroidGradleProject } from '../../../build-tools/utils/gradleProject.js';
-import { androidPhysXLibs, androidTemplateSources, packageAbis } from '../../../build-tools/utils/nativeTemplate.js';
+import { androidPhysXLibs, androidSpineLibs, androidTemplateSources, packageAbis } from '../../../build-tools/utils/nativeTemplate.js';
import { assembleApk, apkFileName } from '../../../build-tools/utils/apk.js';
import { ANDROID_AOT_LIBRARY, androidAotCompilers } from './androidAot';
import { assembleAab, aabFileName } from '../../../build-tools/utils/aab.js';
@@ -1390,6 +1390,14 @@ async function produceExport(opts: ExportGameOptions): Promise<ExportGameResult>
// PhysX is the host's optional library: in this package only when the project
// picked it, beside the compiled systems in lib/<abi>/ (the host dlopens it).
let extraLibs = androidAotLibs;
+ // The Spine releases this package's skeletons were exported from, one library
+ // each, and no others: a release no skeleton uses is not downloaded (#115).
+ if (template && nativeSpine.size > 0) {
+ const spine = androidSpineLibs(template, packageAbis(template, { emulator: opts.androidEmulatorAbi === true }),
+ nativeSpine.keys());
+ extraLibs = { ...(extraLibs ?? {}) };
+ for (const [abi, files] of Object.entries(spine)) extraLibs[abi] = [...(extraLibs[abi] ?? []), ...files];
+ }
if (template && opts.features?.physics?.backend3d === 'physx') {
const physx = androidPhysXLibs(template, packageAbis(template, { emulator: opts.androidEmulatorAbi === true }));
if (physx) {
diff --git a/pipeline/src/export/nativeTemplates.ts b/pipeline/src/export/nativeTemplates.ts
index 0b89bdcc1..5cc583b13 100644
--- a/pipeline/src/export/nativeTemplates.ts
+++ b/pipeline/src/export/nativeTemplates.ts
@@ -22,7 +22,7 @@ import { randomUUID, createHash } from 'node:crypto';
import {
findTemplate, readTemplateManifest, missingTemplateFiles, installedTemplateDir,
templateStoreDir, iosTemplateSources, releaseAssetBases, parseTemplateIndex,
- TEMPLATE_INDEX, templateSpineVersion,
+ TEMPLATE_INDEX, templateSpineVersions,
type TemplatePlatform, type NativeTemplateManifest,
} from '../../../build-tools/utils/nativeTemplate.js';
import { extractZip } from '../../../build-tools/utils/zip.js';
@@ -31,31 +31,24 @@ export type { NativeTemplateManifest };
/**
* Which Spine skeletons a package ships will not play on a template, said as a
- * warning, or null when every one will. A native host links ONE Spine runtime
- * (every vendored one exports the same symbols), so a skeleton plays only if it
- * was exported from the version the template was built with — the project
- * setting is a preference, the skeleton files are the fact (#115). The package
+ * warning, or null when every one will. A host carries every vendored Spine
+ * release, each reading the skeletons exported from it (#115); only a template
+ * from before that, or one built with a narrowed --spine, lacks one. The package
* is still assembled: the rest of the game runs, and the runtime names each
- * skeleton it refuses. `target` is the `cli native --target` name.
+ * skeleton it cannot read. `target` names the template (`android`, `windows`, …).
*/
export function nativeSpineMismatch(
skeletons: ReadonlyMap<string, readonly string[]>, templateDir: string, target: string,
): string | null {
- const linked = templateSpineVersion(readTemplateManifest(templateDir));
- const other = [...skeletons].filter(([v]) => v !== linked).sort(([a], [b]) => a.localeCompare(b));
- if (other.length === 0) return null;
- const files = other.flatMap(([, paths]) => paths);
+ const carried = templateSpineVersions(readTemplateManifest(templateDir));
+ const missing = [...skeletons].filter(([v]) => !carried.includes(v)).sort(([a], [b]) => a.localeCompare(b));
+ if (missing.length === 0) return null;
+ const files = missing.flatMap(([, paths]) => paths);
const named = files.slice(0, 3).join(', ') + (files.length > 3 ? `, and ${files.length - 3} more` : '');
- const versions = other.map(([v]) => v);
- const them = files.length === 1 ? 'it' : 'them';
- const fix = versions.length === 1 && !skeletons.has(linked)
- ? `Build a template for ${versions[0]} with \`node build-tools/cli.js native --target ${target} --spine ${versions[0]}\`, `
- + `or export ${them} from Spine ${linked}.`
- : `Export ${them} from Spine ${linked}, or export every skeleton from one version and build a template for `
- + `that version with \`node build-tools/cli.js native --target ${target} --spine <version>\`.`;
- return `${files.length} Spine skeleton${files.length === 1 ? ' is' : 's are'} ${versions.join(' / ')} (${named}), `
- + `and the ${target} runtime template links Spine ${linked}: a native host carries one Spine runtime, `
- + `so ${files.length === 1 ? 'it does' : 'they do'} not play in this app. ${fix}`;
+ return `${files.length} Spine skeleton${files.length === 1 ? ' is' : 's are'} ${missing.map(([v]) => v).join(' / ')} `
+ + `(${named}), and the installed ${target} runtime template carries Spine ${carried.join(', ')} only, so `
+ + `${files.length === 1 ? 'it does' : 'they do'} not play in this app. Install this editor version's ${target} `
+ + 'runtime template from Package Project, then export again.';
}
/** A template this editor can actually use, with where it came from. */
@@ -92,9 +85,9 @@ export interface NativeTemplateEntry {
/** Android: the architectures it carries. */
abis: string[];
engineVersion: string;
- /** The one Spine runtime the host links; skeletons of any other version do
- * not play on it (see {@link nativeSpineMismatch}). */
- spineVersion: string;
+ /** The Spine releases the host carries; a skeleton of any other does not
+ * play on it (see {@link nativeSpineMismatch}). */
+ spineVersions: string[];
dir: string;
/** Usable by THIS editor — an older release's template stays listed (removing
* it is the user's call) but cannot be packaged with. */
@@ -117,7 +110,7 @@ export function listNativeTemplates(engineVersion: string): NativeTemplateEntry[
platform: manifest.platform,
abis: manifest.abis ?? [],
engineVersion: manifest.engineVersion,
- spineVersion: templateSpineVersion(manifest),
+ spineVersions: templateSpineVersions(manifest),
dir,
current: manifest.engineVersion === engineVersion
&& missingTemplateFiles(dir, manifest.platform).length === 0,
diff --git a/pipeline/tests/native-template.test.ts b/pipeline/tests/native-template.test.ts
index 372c6fee2..9181ec440 100644
--- a/pipeline/tests/native-template.test.ts
+++ b/pipeline/tests/native-template.test.ts
@@ -21,7 +21,8 @@ import {
import { listPlatforms } from '../src/export/platformCatalog';
import {
requiredTemplateFiles, templateLayout, installedTemplateDir, parseTemplateIndex,
- missingTemplateEntries, isTemplatePlatform, builtSpineVersion, templateSpineVersion,
+ missingTemplateEntries, isTemplatePlatform, builtSpineVersions, templateSpineVersions, SPINE_RELEASES,
+ androidSpineLibs, androidSpineLibrary,
TEMPLATE_FORMAT, TEMPLATE_MANIFEST, TEMPLATE_INDEX, TEMPLATE_PLATFORMS,
type TemplatePlatform,
} from '../../build-tools/utils/nativeTemplate.js';
@@ -75,17 +76,19 @@ function writeTemplateZip(version: string, omit?: string, platform: TemplatePlat
return file;
}
-// #115: a host links ONE Spine runtime, so the template says which, read off the
-// build rather than assumed, and an export holds the skeletons it ships to it.
-describe('the Spine runtime a template links', () => {
- function manifestDir(spineVersion?: string): string {
+// #115: a host carries every vendored Spine release, each reading the skeletons
+// exported from it. The template says which it carries, read off the build, and
+// an Android package takes only the releases its skeletons need.
+describe('the Spine releases a template carries', () => {
+ function manifestDir(fields: Record<string, unknown> = {}): string {
const dir = mkdtempSync(path.join(scratch, 'tmpl-'));
writeFileSync(path.join(dir, TEMPLATE_MANIFEST), JSON.stringify({
kind: 'estella-native-template', formatVersion: TEMPLATE_FORMAT, id: 'android', platform: 'android',
- engineVersion: VERSION, ...(spineVersion ? { spineVersion } : {}),
+ engineVersion: VERSION, ...fields,
}));
return dir;
}
+ const ALL = { spineVersions: [...SPINE_RELEASES] };
function hostCache(rel: string, line: string | null): void {
mkdirSync(path.join(scratch, rel), { recursive: true });
writeFileSync(path.join(scratch, rel, 'CMakeCache.txt'),
@@ -94,50 +97,67 @@ ${line ?? ''}
`);
}
- it('reads what the host build linked from its CMake cache', () => {
- hostCache('build/cmake/native-windows', 'ESTELLA_SPINE_VERSION:STRING=3.8');
- expect(builtSpineVersion(scratch, 'windows')).toBe('3.8');
- hostCache('build/cmake/native/arm64-v8a', 'ESTELLA_SPINE_VERSION:STRING=3.8');
- expect(builtSpineVersion(scratch, 'android', ['arm64-v8a'])).toBe('3.8');
+ it('lists every vendored release, and the ones the SDK can ask for', async () => {
+ const { readdirSync } = await import('node:fs');
+ const vendored = readdirSync(path.join(__dirname, '../../third_party'))
+ .filter((d) => d.startsWith('spine-runtimes-')).map((d) => d.slice('spine-runtimes-'.length)).sort();
+ expect([...SPINE_RELEASES]).toEqual(vendored);
+ const { SPINE_VERSIONS } = await import('esengine');
+ expect([...SPINE_RELEASES]).toEqual([...SPINE_VERSIONS].sort());
});
- it('takes the CMake default from a cache that never set it, and says nothing without a build', () => {
- hostCache('build/cmake/native-linux', null);
- expect(builtSpineVersion(scratch, 'linux')).toBe('4.2');
- expect(builtSpineVersion(scratch, 'macos')).toBeNull();
+ it('reads the releases the host build carried from its CMake cache', () => {
+ hostCache('build/cmake/native-windows', 'ESTELLA_SPINE_VERSIONS:STRING=4.2;3.8');
+ expect(builtSpineVersions(scratch, 'windows')).toEqual(['3.8', '4.2']);
+ hostCache('build/cmake/native/arm64-v8a', 'ESTELLA_SPINE_VERSIONS:STRING=3.8;4.2');
+ expect(builtSpineVersions(scratch, 'android', ['arm64-v8a'])).toEqual(['3.8', '4.2']);
});
- it('refuses to pack ABIs that linked different runtimes into one template', () => {
- hostCache('build/cmake/native/arm64-v8a', 'ESTELLA_SPINE_VERSION:STRING=3.8');
- hostCache('build/cmake/native/x86_64', 'ESTELLA_SPINE_VERSION:STRING=4.2');
- expect(() => builtSpineVersion(scratch, 'android', ['arm64-v8a', 'x86_64'])).toThrow(/same --spine/);
+ it('reads a single-release build as the one release it linked, and says nothing without a build', () => {
+ hostCache('build/cmake/native-linux', 'ESTELLA_SPINE_VERSION:STRING=3.8');
+ expect(builtSpineVersions(scratch, 'linux')).toEqual(['3.8']);
+ expect(builtSpineVersions(scratch, 'macos')).toBeNull();
});
- it('reads a template written before the field as the 4.2 it was built with', () => {
- expect(templateSpineVersion({})).toBe('4.2');
- expect(templateSpineVersion({ spineVersion: '3.8' })).toBe('3.8');
+ it('refuses to pack ABIs that carried different releases into one template', () => {
+ hostCache('build/cmake/native/arm64-v8a', 'ESTELLA_SPINE_VERSIONS:STRING=3.8');
+ hostCache('build/cmake/native/x86_64', 'ESTELLA_SPINE_VERSIONS:STRING=4.2');
+ expect(() => builtSpineVersions(scratch, 'android', ['arm64-v8a', 'x86_64'])).toThrow(/same --spine/);
});
- it('passes skeletons of the linked version, and content with no skeletons at all', () => {
- expect(nativeSpineMismatch(new Map([['3.8', ['a.skel']]]), manifestDir('3.8'), 'android')).toBeNull();
- expect(nativeSpineMismatch(new Map(), manifestDir('3.8'), 'android')).toBeNull();
+ it('reads an older template as the one release it linked', () => {
+ expect(templateSpineVersions({})).toEqual(['4.2']);
+ expect(templateSpineVersions({ spineVersion: '3.8' })).toEqual(['3.8']);
+ expect(templateSpineVersions(ALL)).toEqual([...SPINE_RELEASES]);
});
- it('names the skeletons that will not play, and the build that would play them', () => {
- const why = nativeSpineMismatch(new Map([['3.8', ['hero.skel']]]), manifestDir(), 'android');
- expect(why).toContain('hero.skel');
- expect(why).toContain('Spine 4.2');
- expect(why).toContain('node build-tools/cli.js native --target android --spine 3.8');
+ it('plays skeletons of every release on a current template', () => {
+ const skeletons = new Map([['3.8', ['a.skel']], ['4.1', ['b.json']], ['4.2', ['c.skel']]]);
+ expect(nativeSpineMismatch(skeletons, manifestDir(ALL), 'android')).toBeNull();
+ expect(nativeSpineMismatch(new Map(), manifestDir(), 'android')).toBeNull();
});
- // spine-demo ships 4.1 and 4.2: on the 4.2 template the 4.2 ones play, so only
- // the 4.1 ones are named — and no single --spine build would play them all.
- it('names only the skeletons of another version when some match', () => {
+ // The reporter's case on a template from before: named, and fixed by installing
+ // the editor's own template — not by a build only a source checkout can run.
+ it('names the skeletons an older template cannot play, and the template that can', () => {
const why = nativeSpineMismatch(
- new Map([['4.2', ['ok.skel']], ['4.1', ['a.json', 'b.json', 'c.json', 'd.json']]]), manifestDir('4.2'), 'windows');
- expect(why).toContain('4 Spine skeletons are 4.1 (a.json, b.json, c.json, and 1 more)');
+ new Map([['4.2', ['ok.skel']], ['3.8', ['a.json', 'b.json', 'c.json', 'd.json']]]), manifestDir(), 'android');
+ expect(why).toContain('4 Spine skeletons are 3.8 (a.json, b.json, c.json, and 1 more)');
+ expect(why).toContain('carries Spine 4.2 only');
expect(why).not.toContain('ok.skel');
- expect(why).toContain('from one version');
+ expect(why).toContain('runtime template from Package Project');
+ expect(why).not.toContain('build-tools');
+ });
+
+ it('gives an Android package the libraries of the releases its skeletons need, and no others', () => {
+ const dir = manifestDir(ALL);
+ for (const abi of ['arm64-v8a', 'x86_64']) {
+ mkdirSync(path.join(dir, 'plugins', abi), { recursive: true });
+ for (const v of SPINE_RELEASES) writeFileSync(path.join(dir, 'plugins', abi, androidSpineLibrary(v)), 'so');
+ }
+ const libs = androidSpineLibs(dir, ['arm64-v8a'], ['3.8', '4.2']);
+ expect(Object.keys(libs)).toEqual(['arm64-v8a']);
+ expect(libs['arm64-v8a'].map((f) => path.basename(f))).toEqual(['libestella_spine38.so', 'libestella_spine42.so']);
});
});
diff --git a/sdk/src/ecs/bridge/nativeSideModules.ts b/sdk/src/ecs/bridge/nativeSideModules.ts
index ac9691cb1..90050b386 100644
--- a/sdk/src/ecs/bridge/nativeSideModules.ts
+++ b/sdk/src/ecs/bridge/nativeSideModules.ts
@@ -29,23 +29,29 @@ import { createNativeHeap, type NativeHeap } from './nativeHeap';
// has neither. See utf8.ts.
import { encodeUtf8, decodeUtf8 } from '../../util/utf8';
+/**
+ * The prefix a native host binds one Spine release's surface under: `spine38_`
+ * for 3.8. Every vendored runtime implements the one `spine_*` surface, and a host
+ * carries them all side by side, each renamed (native/CMakeLists.txt), so the
+ * release a skeleton was exported from is the one that reads it — as on the web,
+ * where each version is a side module of its own.
+ */
+export function nativeSpinePrefix(version: string): string {
+ return `spine${version.replace('.', '')}_`;
+}
+
+// One entry per Spine version the SDK can ask for, derived from SPINE_VERSIONS so
+// a newly vendored release cannot be probed for and forgotten.
+const SPINE_PROBES = Object.fromEntries(SPINE_VERSIONS.map(
+ (version) => [spineModuleId(version), `es_${nativeSpinePrefix(version)}loadSkeleton`]));
+const SPINE_ALIASES = Object.fromEntries(SPINE_VERSIONS.map(
+ (version) => [spineModuleId(version), ['spine_', nativeSpinePrefix(version)] as const]));
+
/**
* One global per subsystem that proves the host compiled it in. Picked from the
* entry points a consumer calls first, so the probe cannot pass while the surface
* is half-registered.
*/
-// One entry per Spine version the SDK can ask for; which one this host actually
-// linked is a second question (see SPINE_VERSION_BINDING), because every vendored
-// runtime exports the same symbols and a binary carries exactly one. Derived from
-// SPINE_VERSIONS so a newly vendored release cannot be probed for and forgotten.
-const SPINE_PROBES = SPINE_VERSIONS.reduce<Partial<Record<SideModuleId, string>>>(
- (probes, version) => {
- probes[spineModuleId(version)] = 'es_spine_loadSkeleton';
- return probes;
- },
- {},
-);
-
export const NATIVE_SIDE_MODULE_PROBES: Partial<Record<SideModuleId, string>> = {
physics: 'es_physics_init',
physics3d: 'es_physics3d_init',
@@ -68,20 +74,9 @@ export const NATIVE_SIDE_MODULE_PROBES: Partial<Record<SideModuleId, string>> =
*/
export const NATIVE_PREFIX_ALIASES: Partial<Record<SideModuleId, readonly [from: string, to: string]>> = {
'physics3d:physx': ['physics3d_', 'physx3d_'],
+ ...SPINE_ALIASES,
};
-/** The host global that reports the linked Spine runtime (38 / 41 / 42 / 43). */
-export const SPINE_VERSION_BINDING = 'es_spine_runtimeVersion';
-
-/** The id the host's own Spine runtime answers to, or null if it linked none. */
-function nativeSpineId(scope: Record<string, unknown>): SideModuleId | null {
- const report = scope[SPINE_VERSION_BINDING];
- if (typeof report !== 'function') return null;
- const version = (report as () => number)();
- const id = SPINE_VERSIONS.find((v) => v.replace('.', '') === String(version));
- return id ? spineModuleId(id) : null;
-}
-
/** A NUL-terminated UTF-8 string at `ptr` in the heap; empty for a null pointer,
* which is what emscripten's UTF8ToString(0) answers. */
function readUtf8(heap: NativeHeap, ptr: number): string {
@@ -180,23 +175,13 @@ export function createNativeSideModules(
+ 'subsystems it compiles in (KTX2, for one, is decoded in C++)');
}
if (typeof scope[probe] !== 'function') {
- throw new Error(
- `[native] "${id}" is not compiled into this host (${probe} is not bound) — `
- + 'rebuild it with that subsystem enabled',
- );
- }
- // A Spine binary is one runtime. Answering the wrong version would load a
- // skeleton with a decoder that cannot read its format, so a project authored
- // against another release is told which one this app carries instead.
- if (id.startsWith('spine:')) {
- const linked = nativeSpineId(scope);
- if (linked !== id) {
- throw new Error(
- `[native] this app links Spine ${linked ? linked.slice(6) : 'none'}, and the `
- + `content asks for ${id.slice(6)} — rebuild with `
- + `-DESTELLA_SPINE_VERSION=${id.slice(6)} (a binary carries one runtime)`,
- );
- }
+ // An Android package carries only the Spine releases its skeletons use,
+ // and a template from before the host carried them all links one.
+ throw new Error(id.startsWith('spine:')
+ ? `[native] this app carries no Spine ${id.slice(6)} runtime (${probe} is not bound) — `
+ + 'package it again with this editor version\'s runtime template'
+ : `[native] "${id}" is not compiled into this host (${probe} is not bound) — `
+ + 'rebuild it with that subsystem enabled');
}
if (!heap) {
throw new Error(
diff --git a/sdk/tests/native-side-modules.test.ts b/sdk/tests/native-side-modules.test.ts
index 27482c8ee..9226d8bfa 100644
--- a/sdk/tests/native-side-modules.test.ts
+++ b/sdk/tests/native-side-modules.test.ts
@@ -10,7 +10,7 @@
// Driven against a mock host scope — the marshalling is what these check, not Box2D.
import { describe, it, expect, vi } from 'vitest';
import {
- createNativeSideModules, NATIVE_SIDE_MODULE_PROBES, NATIVE_PREFIX_ALIASES, SPINE_VERSION_BINDING,
+ createNativeSideModules, NATIVE_SIDE_MODULE_PROBES, NATIVE_PREFIX_ALIASES,
} from '../src/ecs/bridge/nativeSideModules';
import { HEAP_BINDINGS } from '../src/ecs/bridge/nativeHeap';
import type { PhysicsWasmModule } from '../src/physics/PhysicsModuleLoader';
@@ -19,7 +19,7 @@ import type { DragonBonesWasmModule } from '../src/dragonbones/DragonBonesModule
/** A host that compiled physics in: the heap plus a few es_physics_* globals. */
function mockNativeHost(options: {
- physics?: boolean; heap?: boolean; spine?: number; dragonbones?: boolean;
+ physics?: boolean; heap?: boolean; spine?: number | number[]; dragonbones?: boolean;
} = {}) {
const { physics = true, heap = true, spine, dragonbones = false } = options;
const buffer = new ArrayBuffer(4096);
@@ -43,14 +43,15 @@ function mockNativeHost(options: {
// the module's bytes there), exactly like a wasm pointer.
scope['es_physics_getDynamicBodyTransforms'] = () => 64;
}
- if (spine !== undefined) {
- // A host links ONE spine runtime and says which (spine_runtimeVersion).
- scope[SPINE_VERSION_BINDING] = () => spine;
- scope['es_spine_loadSkeleton'] = (...args: unknown[]) => { calls.push({ name: 'loadSkeleton', args }); return 1; };
- scope['es_spine_playAnimation'] = (...args: unknown[]) => { calls.push({ name: 'playAnimation', args }); return 1; };
+ // A host carries every Spine release it was built with, each under its own
+ // prefix (es_spine38_*, es_spine42_*): the tag says which ones this mock has.
+ for (const tag of spine === undefined ? [] : [spine].flat()) {
+ const record = (name: string) => (...args: unknown[]) => { calls.push({ name: `${tag}:${name}`, args }); return 1; };
+ scope[`es_spine${tag}_loadSkeleton`] = record('loadSkeleton');
+ scope[`es_spine${tag}_playAnimation`] = record('playAnimation');
// A C string crosses as a JS string, in and out — the generated wrapper reads
// and writes them, so nothing here needs the heap.
- scope['es_spine_getAnimations'] = () => 'idle,walk,run';
+ scope[`es_spine${tag}_getAnimations`] = () => `idle,walk,run@${tag}`;
}
if (dragonbones) {
// One runtime, no version to declare: the format is frozen, so unlike Spine
@@ -189,14 +190,27 @@ describe('the runtime installs physics from a native host', () => {
});
describe('spine on a native host', () => {
- it('answers the version the host actually linked', async () => {
- const host = createNativeSideModules(mockNativeHost({ spine: 42 }).scope);
+ it('answers each version the host carries', async () => {
+ const host = createNativeSideModules(mockNativeHost({ spine: [38, 42] }).scope);
expect(await host.acquire('spine:4.2')).not.toBeNull();
+ expect(await host.acquire('spine:3.8')).not.toBeNull();
+ });
+
+ // #115: one binary, several runtimes, and the call reaches the one the skeleton
+ // was exported from — never another release's decoder.
+ it('routes each version to its own runtime', async () => {
+ const { scope, calls } = mockNativeHost({ spine: [38, 42] });
+ const host = createNativeSideModules(scope);
+ type Mod = { _spine_loadSkeleton(...a: unknown[]): number; cwrap(i: string, r: string, a: string[]): (...a: unknown[]) => unknown };
+ const v38 = (await host.acquire('spine:3.8')) as unknown as Mod;
+ const v42 = (await host.acquire('spine:4.2')) as unknown as Mod;
+ v38._spine_loadSkeleton('a');
+ v42._spine_loadSkeleton('b');
+ expect(calls.map((c) => c.name)).toEqual(['38:loadSkeleton', '42:loadSkeleton']);
+ expect(v38.cwrap('spine_getAnimations', 'string', ['number'])(1)).toBe('idle,walk,run@38');
});
- it('refuses a version it did not link, rather than mis-decoding a skeleton', async () => {
- // The three vendored runtimes export the same symbols, so the entry points
- // being present says nothing about the format they can read.
+ it('refuses a version the app does not carry, rather than mis-decoding a skeleton', async () => {
const host = createNativeSideModules(mockNativeHost({ spine: 42 }).scope);
expect(await host.acquire('spine:3.8')).toBeNull();
expect(await host.acquire('spine:4.1')).toBeNull();
@@ -214,10 +228,10 @@ describe('spine on a native host', () => {
};
const play = mod.cwrap('spine_playAnimation', 'number', ['number', 'string', 'number', 'number']);
expect(play(1, 'walk', 1, 0)).toBe(1);
- expect(calls.at(-1)).toEqual({ name: 'playAnimation', args: [1, 'walk', 1, 0] });
+ expect(calls.at(-1)).toEqual({ name: '42:playAnimation', args: [1, 'walk', 1, 0] });
const list = mod.cwrap('spine_getAnimations', 'string', ['number']);
- expect(list(1)).toBe('idle,walk,run');
+ expect(list(1)).toBe('idle,walk,run@42');
});
it('reads and writes heap strings the way emscripten states them', async () => {
diff --git a/src/esengine/bindings/modules/spine/SpineModuleEntry.cpp b/src/esengine/bindings/modules/spine/SpineModuleEntry.cpp
index 3d6102c8a..2dfe960d7 100644
--- a/src/esengine/bindings/modules/spine/SpineModuleEntry.cpp
+++ b/src/esengine/bindings/modules/spine/SpineModuleEntry.cpp
@@ -45,12 +45,12 @@
namespace {
-using es::spine::ConstraintKind;
-using es::spine::Event;
-using es::spine::InstancePtr;
-using es::spine::PathMix;
-using es::spine::SkeletonPtr;
-using es::spine::TransformMix;
+using es::ES_SPINE_NS::ConstraintKind;
+using es::ES_SPINE_NS::Event;
+using es::ES_SPINE_NS::InstancePtr;
+using es::ES_SPINE_NS::PathMix;
+using es::ES_SPINE_NS::SkeletonPtr;
+using es::ES_SPINE_NS::TransformMix;
struct LiveInstance {
InstancePtr instance;
@@ -73,7 +73,7 @@ struct Context {
}
void forgetEvents(const LiveInstance& live) {
- const auto source = es::spine::eventSource(live.instance.get());
+ const auto source = es::ES_SPINE_NS::eventSource(live.instance.get());
auto owner = eventOwners.find(source);
if (owner != eventOwners.end()) {
if (selectedEventInstance == owner->second) selectedEventInstance = -1;
@@ -95,12 +95,12 @@ struct Context {
skeletons.clear();
}
- es::spine::Instance* instanceOf(int id) {
+ es::ES_SPINE_NS::Instance* instanceOf(int id) {
auto* live = instances.find(id);
return live ? live->instance.get() : nullptr;
}
- es::spine::Skeleton* skeletonOf(int handle) {
+ es::ES_SPINE_NS::Skeleton* skeletonOf(int handle) {
auto* held = skeletons.find(handle);
return held ? held->get() : nullptr;
}
@@ -127,10 +127,10 @@ struct CountingSink final : es::skeletal::TriangleSink {
};
/** The last probe run's counts. Benchmark only; a frame never writes it. */
-es::spine::ProbeCounts g_probeCounts{};
+es::ES_SPINE_NS::ProbeCounts g_probeCounts{};
/** The last staged pose's counts. Benchmark only, for the same reason. */
-es::spine::PoseCounts g_poseCounts{};
+es::ES_SPINE_NS::PoseCounts g_poseCounts{};
void extractBatches(int instanceId) {
g_ctx.batches.reset();
@@ -138,7 +138,7 @@ void extractBatches(int instanceId) {
if (!instance) return;
es::skeletal::BatchCollector collector(g_ctx.batches);
- es::spine::render(instance, collector, g_ctx.clippingEnabled);
+ es::ES_SPINE_NS::render(instance, collector, g_ctx.clippingEnabled);
}
const char* publish(const char* text) { return g_ctx.strings.publish(text); }
@@ -156,7 +156,7 @@ int spine_loadSkeleton(uintptr_t skelDataPtr, int skelDataLen,
uintptr_t atlasPtr, int atlasLen, int isBinary) {
g_ctx.lastError.clear();
- es::spine::Skeleton* loaded = es::spine::loadSkeleton(
+ es::ES_SPINE_NS::Skeleton* loaded = es::ES_SPINE_NS::loadSkeleton(
reinterpret_cast<const void*>(skelDataPtr), skelDataLen,
reinterpret_cast<const char*>(atlasPtr), atlasLen, isBinary != 0, g_ctx.lastError);
if (!loaded) return -1;
@@ -185,18 +185,18 @@ void spine_unloadSkeleton(int handle) {
EMSCRIPTEN_KEEPALIVE
int spine_getAtlasPageCount(int handle) {
- return es::spine::atlasPageCount(g_ctx.skeletonOf(handle));
+ return es::ES_SPINE_NS::atlasPageCount(g_ctx.skeletonOf(handle));
}
EMSCRIPTEN_KEEPALIVE
const char* spine_getAtlasPageTextureName(int handle, int pageIndex) {
- return publish(es::spine::atlasPageName(g_ctx.skeletonOf(handle), pageIndex));
+ return publish(es::ES_SPINE_NS::atlasPageName(g_ctx.skeletonOf(handle), pageIndex));
}
EMSCRIPTEN_KEEPALIVE
void spine_setAtlasPageTexture(int handle, int pageIndex,
uint32_t textureId, int width, int height) {
- es::spine::setAtlasPageTexture(g_ctx.skeletonOf(handle), pageIndex, textureId, width, height);
+ es::ES_SPINE_NS::setAtlasPageTexture(g_ctx.skeletonOf(handle), pageIndex, textureId, width, height);
}
// =============================================================================
@@ -208,11 +208,11 @@ int spine_createInstance(int skeletonHandle) {
auto* skeleton = g_ctx.skeletonOf(skeletonHandle);
if (!skeleton) return -1;
- es::spine::Instance* created = es::spine::createInstance(skeleton);
+ es::ES_SPINE_NS::Instance* created = es::ES_SPINE_NS::createInstance(skeleton);
if (!created) return -1;
const int id = g_ctx.instances.add(LiveInstance{InstancePtr(created), skeletonHandle, {}});
- g_ctx.eventOwners.emplace(es::spine::eventSource(created), id);
+ g_ctx.eventOwners.emplace(es::ES_SPINE_NS::eventSource(created), id);
return id;
}
@@ -227,25 +227,25 @@ void spine_destroyInstance(int instanceId) {
// =============================================================================
/** Back to where the data says the skeleton starts — the one state a replay can
- * be reproduced from. See es::spine::setToSetupPose. */
+ * be reproduced from. See es::ES_SPINE_NS::setToSetupPose. */
EMSCRIPTEN_KEEPALIVE
void spine_setToSetupPose(int instanceId) {
- es::spine::setToSetupPose(g_ctx.instanceOf(instanceId));
+ es::ES_SPINE_NS::setToSetupPose(g_ctx.instanceOf(instanceId));
}
EMSCRIPTEN_KEEPALIVE
int spine_playAnimation(int instanceId, const char* name, int loop, int track) {
- return es::spine::playAnimation(g_ctx.instanceOf(instanceId), name, loop != 0, track) ? 1 : 0;
+ return es::ES_SPINE_NS::playAnimation(g_ctx.instanceOf(instanceId), name, loop != 0, track) ? 1 : 0;
}
EMSCRIPTEN_KEEPALIVE
int spine_addAnimation(int instanceId, const char* name, int loop, float delay, int track) {
- return es::spine::addAnimation(g_ctx.instanceOf(instanceId), name, loop != 0, delay, track) ? 1 : 0;
+ return es::ES_SPINE_NS::addAnimation(g_ctx.instanceOf(instanceId), name, loop != 0, delay, track) ? 1 : 0;
}
EMSCRIPTEN_KEEPALIVE
void spine_setSkin(int instanceId, const char* name) {
- es::spine::setSkin(g_ctx.instanceOf(instanceId), name);
+ es::ES_SPINE_NS::setSkin(g_ctx.instanceOf(instanceId), name);
}
EMSCRIPTEN_KEEPALIVE
@@ -254,7 +254,7 @@ void spine_update(int instanceId, float dt) {
if (!instance) return;
// The composition lives in the runtime beside the two halves, so there is
// one definition of what a whole frame is rather than one here as well.
- es::spine::update(instance, dt);
+ es::ES_SPINE_NS::update(instance, dt);
}
/**
@@ -267,7 +267,7 @@ EMSCRIPTEN_KEEPALIVE
void spine_advanceAndApply(int instanceId, float dt) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return;
- es::spine::advanceAndApply(instance, dt);
+ es::ES_SPINE_NS::advanceAndApply(instance, dt);
}
/**
@@ -277,19 +277,19 @@ void spine_advanceAndApply(int instanceId, float dt) {
*/
EMSCRIPTEN_KEEPALIVE
void spine_materializeWorldPose(int instanceId, float dt) {
- es::spine::materializeWorldPose(g_ctx.instanceOf(instanceId), dt);
+ es::ES_SPINE_NS::materializeWorldPose(g_ctx.instanceOf(instanceId), dt);
}
/** How long one animation runs; negative where there is no such animation. */
EMSCRIPTEN_KEEPALIVE
float spine_getAnimationDuration(int skeletonHandle, const char* animation) {
- return es::spine::animationDuration(g_ctx.skeletonOf(skeletonHandle), animation);
+ return es::ES_SPINE_NS::animationDuration(g_ctx.skeletonOf(skeletonHandle), animation);
}
/** 1 where this skeleton's world pose carries state and may not be deferred. */
EMSCRIPTEN_KEEPALIVE
int spine_requiresContinuousWorldPose(int skeletonHandle) {
- return es::spine::requiresContinuousWorldPose(g_ctx.skeletonOf(skeletonHandle)) ? 1 : 0;
+ return es::ES_SPINE_NS::requiresContinuousWorldPose(g_ctx.skeletonOf(skeletonHandle)) ? 1 : 0;
}
// =============================================================================
@@ -300,22 +300,22 @@ EMSCRIPTEN_KEEPALIVE
const char* spine_getAnimations(int instanceId) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return publish("[]");
- return g_ctx.strings.publishArray(es::spine::animationCount(instance),
- [instance](int i) { return es::spine::animationName(instance, i); });
+ return g_ctx.strings.publishArray(es::ES_SPINE_NS::animationCount(instance),
+ [instance](int i) { return es::ES_SPINE_NS::animationName(instance, i); });
}
EMSCRIPTEN_KEEPALIVE
const char* spine_getSkins(int instanceId) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return publish("[]");
- return g_ctx.strings.publishArray(es::spine::skinCount(instance),
- [instance](int i) { return es::spine::skinName(instance, i); });
+ return g_ctx.strings.publishArray(es::ES_SPINE_NS::skinCount(instance),
+ [instance](int i) { return es::ES_SPINE_NS::skinName(instance, i); });
}
EMSCRIPTEN_KEEPALIVE
int spine_getBonePosition(int instanceId, const char* bone,
uintptr_t outXPtr, uintptr_t outYPtr) {
- return es::spine::bonePosition(g_ctx.instanceOf(instanceId), bone,
+ return es::ES_SPINE_NS::bonePosition(g_ctx.instanceOf(instanceId), bone,
reinterpret_cast<float*>(outXPtr),
reinterpret_cast<float*>(outYPtr))
? 1
@@ -327,8 +327,8 @@ EMSCRIPTEN_KEEPALIVE
const char* spine_getBones(int instanceId) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return publish("[]");
- return g_ctx.strings.publishArray(es::spine::boneCount(instance),
- [instance](int i) { return es::spine::boneName(instance, i); });
+ return g_ctx.strings.publishArray(es::ES_SPINE_NS::boneCount(instance),
+ [instance](int i) { return es::ES_SPINE_NS::boneName(instance, i); });
}
/**
@@ -341,13 +341,13 @@ int spine_getBonePoses(int instanceId, uintptr_t outPtr, int capacity) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return 0;
float* out = reinterpret_cast<float*>(outPtr);
- const int n = std::min(es::spine::boneCount(instance), capacity);
+ const int n = std::min(es::ES_SPINE_NS::boneCount(instance), capacity);
int written = 0;
for (int i = 0; i < n; ++i) {
float x = 0, y = 0, degrees = 0, length = 0;
- if (!es::spine::bonePose(instance, i, &x, &y, &degrees, &length)) continue;
+ if (!es::ES_SPINE_NS::bonePose(instance, i, &x, &y, &degrees, &length)) continue;
float* at = out + written * 5;
- at[0] = static_cast<float>(es::spine::boneParent(instance, i));
+ at[0] = static_cast<float>(es::ES_SPINE_NS::boneParent(instance, i));
at[1] = x;
at[2] = y;
at[3] = degrees;
@@ -360,14 +360,14 @@ int spine_getBonePoses(int instanceId, uintptr_t outPtr, int capacity) {
EMSCRIPTEN_KEEPALIVE
float spine_getBoneRotation(int instanceId, const char* bone) {
float degrees = 0.0f;
- es::spine::boneRotation(g_ctx.instanceOf(instanceId), bone, &degrees);
+ es::ES_SPINE_NS::boneRotation(g_ctx.instanceOf(instanceId), bone, &degrees);
return degrees;
}
EMSCRIPTEN_KEEPALIVE
void spine_getBounds(int instanceId, uintptr_t outXPtr, uintptr_t outYPtr,
uintptr_t outWPtr, uintptr_t outHPtr) {
- es::spine::bounds(g_ctx.instanceOf(instanceId),
+ es::ES_SPINE_NS::bounds(g_ctx.instanceOf(instanceId),
reinterpret_cast<float*>(outXPtr), reinterpret_cast<float*>(outYPtr),
reinterpret_cast<float*>(outWPtr), reinterpret_cast<float*>(outHPtr));
}
@@ -386,7 +386,7 @@ int spine_getSkeletonBounds(int skeletonHandle, uintptr_t outXPtr, uintptr_t out
auto* w = reinterpret_cast<float*>(outWPtr);
auto* h = reinterpret_cast<float*>(outHPtr);
*x = *y = *w = *h = 0.0f;
- return es::spine::skeletonBounds(g_ctx.skeletonOf(skeletonHandle), x, y, w, h) ? 1 : 0;
+ return es::ES_SPINE_NS::skeletonBounds(g_ctx.skeletonOf(skeletonHandle), x, y, w, h) ? 1 : 0;
}
// =============================================================================
@@ -402,17 +402,17 @@ int spine_getSkeletonBounds(int skeletonHandle, uintptr_t outXPtr, uintptr_t out
*/
EMSCRIPTEN_KEEPALIVE
int spine_probe_extract(int instanceId, int stage, int useCollector) {
- g_probeCounts = es::spine::ProbeCounts{};
+ g_probeCounts = es::ES_SPINE_NS::ProbeCounts{};
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return 0;
if (useCollector) {
g_ctx.batches.reset();
es::skeletal::BatchCollector collector(g_ctx.batches);
- return es::spine::renderStage(instance, collector, g_ctx.clippingEnabled,
+ return es::ES_SPINE_NS::renderStage(instance, collector, g_ctx.clippingEnabled,
stage, &g_probeCounts) ? 1 : 0;
}
CountingSink sink;
- return es::spine::renderStage(instance, sink, g_ctx.clippingEnabled,
+ return es::ES_SPINE_NS::renderStage(instance, sink, g_ctx.clippingEnabled,
stage, &g_probeCounts) ? 1 : 0;
}
@@ -447,19 +447,19 @@ void spine_probe_counts(std::uint32_t* out) {
}
/** The last staged open's counts. Benchmark only; a frame never writes it. */
-es::spine::ClipStartCounts g_clipStartCounts{};
+static es::ES_SPINE_NS::ClipStartCounts g_clipStartCounts{};
/**
* BENCHMARK ONLY — open the instance's first clip region to `stage`
- * (es::spine::ClipStartStage), so what a 39-vertex polygon costs before a single
+ * (es::ES_SPINE_NS::ClipStartStage), so what a 39-vertex polygon costs before a single
* triangle is cut can be priced without a clock inside the preparation.
*/
EMSCRIPTEN_KEEPALIVE
int spine_probe_clip_start(int instanceId, int stage) {
- g_clipStartCounts = es::spine::ClipStartCounts{};
+ g_clipStartCounts = es::ES_SPINE_NS::ClipStartCounts{};
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return 0;
- const bool ran = es::spine::clipStartStage(instance, stage, &g_clipStartCounts);
+ const bool ran = es::ES_SPINE_NS::clipStartStage(instance, stage, &g_clipStartCounts);
return ran ? 1 : 0;
}
@@ -491,9 +491,9 @@ int spine_clipBudget(int instanceId, std::uint32_t* out) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return 0;
- es::spine::ProbeCounts counts{};
+ es::ES_SPINE_NS::ProbeCounts counts{};
CountingSink sink;
- if (!es::spine::renderCounted(instance, sink, g_ctx.clippingEnabled, &counts)) return 0;
+ if (!es::ES_SPINE_NS::renderCounted(instance, sink, g_ctx.clippingEnabled, &counts)) return 0;
out[0] = counts.clipPolygonVertices;
out[1] = counts.clipPolygons;
@@ -514,8 +514,8 @@ int spine_clipBudget(int instanceId, std::uint32_t* out) {
EMSCRIPTEN_KEEPALIVE
void spine_probe_clip_storage(std::uint32_t* out) {
if (!out) return;
- es::spine::ClipStorage held{};
- es::spine::clipStorage(&held);
+ es::ES_SPINE_NS::ClipStorage held{};
+ es::ES_SPINE_NS::clipStorage(&held);
out[0] = held.polygon;
out[1] = held.output;
out[2] = held.vertices;
@@ -525,16 +525,16 @@ void spine_probe_clip_storage(std::uint32_t* out) {
}
/**
- * BENCHMARK ONLY — the pose run to `stage` (es::spine::PoseStage). Advancing a
+ * BENCHMARK ONLY — the pose run to `stage` (es::ES_SPINE_NS::PoseStage). Advancing a
* pose is not a query: this MOVES the instance forward, so a caller measuring
* with it owns the instance's clock.
*/
EMSCRIPTEN_KEEPALIVE
int spine_probe_pose(int instanceId, float dt, int stage) {
- g_poseCounts = es::spine::PoseCounts{};
+ g_poseCounts = es::ES_SPINE_NS::PoseCounts{};
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return 0;
- return es::spine::poseStage(instance, dt, stage, &g_poseCounts) ? 1 : 0;
+ return es::ES_SPINE_NS::poseStage(instance, dt, stage, &g_poseCounts) ? 1 : 0;
}
/** The counts of the last {@link spine_probe_pose}, into nine u32 slots. */
@@ -622,18 +622,18 @@ void spine_setClippingEnabled(int enabled) {
EMSCRIPTEN_KEEPALIVE
void spine_setDefaultMix(int skeletonHandle, float duration) {
- es::spine::setDefaultMix(g_ctx.skeletonOf(skeletonHandle), duration);
+ es::ES_SPINE_NS::setDefaultMix(g_ctx.skeletonOf(skeletonHandle), duration);
}
EMSCRIPTEN_KEEPALIVE
void spine_setMixDuration(int skeletonHandle, const char* fromAnim,
const char* toAnim, float duration) {
- es::spine::setMixDuration(g_ctx.skeletonOf(skeletonHandle), fromAnim, toAnim, duration);
+ es::ES_SPINE_NS::setMixDuration(g_ctx.skeletonOf(skeletonHandle), fromAnim, toAnim, duration);
}
EMSCRIPTEN_KEEPALIVE
void spine_setTrackAlpha(int instanceId, int track, float alpha) {
- es::spine::setTrackAlpha(g_ctx.instanceOf(instanceId), track, alpha);
+ es::ES_SPINE_NS::setTrackAlpha(g_ctx.instanceOf(instanceId), track, alpha);
}
// =============================================================================
@@ -644,8 +644,8 @@ EMSCRIPTEN_KEEPALIVE
void spine_enableEvents(int instanceId) {
auto* instance = g_ctx.instanceOf(instanceId);
if (!instance) return;
- es::spine::setEventSink(collectEvent);
- es::spine::enableEvents(instance);
+ es::ES_SPINE_NS::setEventSink(collectEvent);
+ es::ES_SPINE_NS::enableEvents(instance);
}
EMSCRIPTEN_KEEPALIVE
@@ -699,13 +699,13 @@ const char* spine_getEventStringValue(int index) {
EMSCRIPTEN_KEEPALIVE
int spine_setAttachment(int instanceId, const char* slotName, const char* attachmentName) {
- return es::spine::setAttachment(g_ctx.instanceOf(instanceId), slotName, attachmentName) ? 1 : 0;
+ return es::ES_SPINE_NS::setAttachment(g_ctx.instanceOf(instanceId), slotName, attachmentName) ? 1 : 0;
}
EMSCRIPTEN_KEEPALIVE
int spine_setIKTarget(int instanceId, const char* constraintName,
float targetX, float targetY, float mix) {
- return es::spine::setIkTarget(g_ctx.instanceOf(instanceId), constraintName,
+ return es::ES_SPINE_NS::setIkTarget(g_ctx.instanceOf(instanceId), constraintName,
targetX, targetY, mix)
? 1
: 0;
@@ -732,10 +732,10 @@ const char* spine_listConstraints(int instanceId) {
out += '"';
out += kinds[k].key;
out += "\":[";
- const int count = es::spine::constraintCount(instance, kinds[k].kind);
+ const int count = es::ES_SPINE_NS::constraintCount(instance, kinds[k].kind);
for (int i = 0; i < count; ++i) {
if (i > 0) out += ',';
- const char* name = es::spine::constraintName(instance, kinds[k].kind, i);
+ const char* name = es::ES_SPINE_NS::constraintName(instance, kinds[k].kind, i);
out += '"';
out += name ? name : "";
out += '"';
@@ -749,7 +749,7 @@ const char* spine_listConstraints(int instanceId) {
EMSCRIPTEN_KEEPALIVE
const char* spine_getTransformConstraintMix(int instanceId, const char* name) {
TransformMix mix;
- if (!es::spine::transformMix(g_ctx.instanceOf(instanceId), name, &mix)) return publish("");
+ if (!es::ES_SPINE_NS::transformMix(g_ctx.instanceOf(instanceId), name, &mix)) return publish("");
char buffer[256];
std::snprintf(buffer, sizeof(buffer),
@@ -763,13 +763,13 @@ EMSCRIPTEN_KEEPALIVE
int spine_setTransformConstraintMix(int instanceId, const char* name, float rotate,
float x, float y, float scaleX, float scaleY, float shearY) {
const TransformMix mix{rotate, x, y, scaleX, scaleY, shearY};
- return es::spine::setTransformMix(g_ctx.instanceOf(instanceId), name, mix) ? 1 : 0;
+ return es::ES_SPINE_NS::setTransformMix(g_ctx.instanceOf(instanceId), name, mix) ? 1 : 0;
}
EMSCRIPTEN_KEEPALIVE
const char* spine_getPathConstraintMix(int instanceId, const char* name) {
PathMix mix;
- if (!es::spine::pathMix(g_ctx.instanceOf(instanceId), name, &mix)) return publish("");
+ if (!es::ES_SPINE_NS::pathMix(g_ctx.instanceOf(instanceId), name, &mix)) return publish("");
char buffer[256];
std::snprintf(buffer, sizeof(buffer),
@@ -783,20 +783,20 @@ EMSCRIPTEN_KEEPALIVE
int spine_setPathConstraintMix(int instanceId, const char* name, float position,
float spacing, float rotate, float x, float y) {
const PathMix mix{position, spacing, rotate, x, y};
- return es::spine::setPathMix(g_ctx.instanceOf(instanceId), name, mix) ? 1 : 0;
+ return es::ES_SPINE_NS::setPathMix(g_ctx.instanceOf(instanceId), name, mix) ? 1 : 0;
}
EMSCRIPTEN_KEEPALIVE
int spine_setSlotColor(int instanceId, const char* slotName,
float r, float g, float b, float a) {
- return es::spine::setSlotColor(g_ctx.instanceOf(instanceId), slotName, r, g, b, a) ? 1 : 0;
+ return es::ES_SPINE_NS::setSlotColor(g_ctx.instanceOf(instanceId), slotName, r, g, b, a) ? 1 : 0;
}
// Whole-skeleton tint: extraction already multiplies the skeleton colour into every
// vertex, so this is all the wiring a SpineAnimation.color needs.
EMSCRIPTEN_KEEPALIVE
int spine_setSkeletonColor(int instanceId, float r, float g, float b, float a) {
- return es::spine::setSkeletonColor(g_ctx.instanceOf(instanceId), r, g, b, a) ? 1 : 0;
+ return es::ES_SPINE_NS::setSkeletonColor(g_ctx.instanceOf(instanceId), r, g, b, a) ? 1 : 0;
}
// Which Spine runtime this build linked. Every backend exports the same symbols, so a
@@ -804,7 +804,7 @@ int spine_setSkeletonColor(int instanceId, float r, float g, float b, float a) {
// artifact instead — spine38.wasm / spine41 / spine42 / spine43).
EMSCRIPTEN_KEEPALIVE
int spine_runtimeVersion() {
- return es::spine::version();
+ return es::ES_SPINE_NS::version();
}
// The live extent of the event buffer, for the readback getter above: it is this
diff --git a/src/esengine/bindings/modules/spine/SpineRuntime.hpp b/src/esengine/bindings/modules/spine/SpineRuntime.hpp
index accf04143..862970fab 100644
--- a/src/esengine/bindings/modules/spine/SpineRuntime.hpp
+++ b/src/esengine/bindings/modules/spine/SpineRuntime.hpp
@@ -35,7 +35,15 @@
#include "./SkeletalModule.hpp"
-namespace es::spine {
+// The namespace this release's backend lives in. A web side module carries one
+// release and keeps the plain name; a native host carries every release, so its
+// build compiles each backend with its own (spine38, spine42, …), the same way
+// each spine-c release gets its own C names (native/spine/SpineCRename*.hpp).
+#ifndef ES_SPINE_NS
+#define ES_SPINE_NS spine
+#endif
+
+namespace es::ES_SPINE_NS {
/** A loaded skeleton: its atlas, its data, and the mix table instances share. */
struct Skeleton;
@@ -119,7 +127,7 @@ const void* eventSource(Instance* instance);
* premultiplied twins of the first two, which is how the engine's renderer reads it.
*/
/// The shared one (SkeletalModule.hpp): batching is not a Spine idea, and the
-/// backends below name this type, so it stays spelled `es::spine::TriangleSink`.
+/// backends below name this type, so it stays spelled `es::ES_SPINE_NS::TriangleSink`.
using TriangleSink = es::skeletal::TriangleSink;
/**
@@ -432,4 +440,4 @@ bool poseStage(Instance* instance, float dt, int stage, PoseCounts* counts);
/** 21 / 38 / 41 / 42 / 43 — whatever `spine_runtimeVersion()` should report. */
int version();
-} // namespace es::spine
+} // namespace es::ES_SPINE_NS
diff --git a/src/esengine/bindings/modules/spine/SpineRuntime21.cpp b/src/esengine/bindings/modules/spine/SpineRuntime21.cpp
index 1029030e4..cba63d01b 100644
--- a/src/esengine/bindings/modules/spine/SpineRuntime21.cpp
+++ b/src/esengine/bindings/modules/spine/SpineRuntime21.cpp
@@ -57,7 +57,7 @@ char* _spUtil_readFile(const char* path, int* length) {
return nullptr;
}
-namespace es::spine {
+namespace es::ES_SPINE_NS {
struct Skeleton {
spAtlas* atlas = nullptr;
@@ -639,4 +639,4 @@ int version() {
return ES_SPINE_VERSION;
}
-} // namespace es::spine
+} // namespace es::ES_SPINE_NS
diff --git a/src/esengine/bindings/modules/spine/SpineRuntimeC.cpp b/src/esengine/bindings/modules/spine/SpineRuntimeC.cpp
index 38b057ade..c52d24b86 100644
--- a/src/esengine/bindings/modules/spine/SpineRuntimeC.cpp
+++ b/src/esengine/bindings/modules/spine/SpineRuntimeC.cpp
@@ -56,7 +56,7 @@ char* _spUtil_readFile(const char* path, int* length) {
return nullptr;
}
-namespace es::spine {
+namespace es::ES_SPINE_NS {
// =============================================================================
// Resources
@@ -1249,4 +1249,4 @@ int version() {
return ES_SPINE_VERSION;
}
-} // namespace es::spine
+} // namespace es::ES_SPINE_NS
diff --git a/src/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp b/src/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp
index b8814765e..329e25d61 100644
--- a/src/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp
+++ b/src/esengine/bindings/modules/spine/SpineRuntimeCpp.cpp
@@ -47,7 +47,7 @@ sp::SpineExtension* spine::getDefaultExtension() {
return new sp::DefaultSpineExtension();
}
-namespace es::spine {
+namespace es::ES_SPINE_NS {
namespace {
@@ -623,4 +623,4 @@ int version() {
return ES_SPINE_VERSION;
}
-} // namespace es::spine
+} // namespace es::ES_SPINE_NS
diff --git a/tools/check-native-bindings.mjs b/tools/check-native-bindings.mjs
index 5b94d40d8..f839c0a03 100644
--- a/tools/check-native-bindings.mjs
+++ b/tools/check-native-bindings.mjs
@@ -28,7 +28,8 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const SRC = path.join(ROOT, 'src');
const BINDINGS = path.join(SRC, 'esengine', 'bindings');
-const { NATIVE_BINDING_HEADERS, PHYSX_ALIAS } = await import('../build-tools/tasks/native.js');
+const { NATIVE_BINDING_HEADERS, PHYSX_ALIAS, SPINE_BINDING_HEADER, spineAlias, vendoredSpineVersions } =
+ await import('../build-tools/tasks/native.js');
let failed = false;
const fail = (msg) => { console.error(msg); failed = true; };
@@ -101,8 +102,41 @@ const header = readFileSync(path.join(BINDINGS, 'modules/physics3d/Physics3DBind
for (const [, name] of header.matchAll(/\b(physics3d_\w+)\s*\(/g)) {
if (!renameText.includes(`#define ${name} physx3d_`)) fail(`${name} is not renamed for the PhysX build`);
}
+
+// 5. Every vendored Spine release gets the whole spine_* surface under its own
+// prefix, and nothing of it leaks into the host TU: a host carries them all
+// side by side, so an unrenamed name would bind one release to another's code.
+const spineHeader = readFileSync(path.join(BINDINGS, SPINE_BINDING_HEADER), 'utf8');
+const spineNames = [...new Set([...spineHeader.matchAll(/(spine_\w+)\s*\(/g)].map((m) => m[1]))];
+if (/"es_spine_/.test(text)) fail('unprefixed es_spine_* wrappers leaked into the host TU — every Spine release has its own');
+const spineVersions = vendoredSpineVersions(ROOT);
+for (const version of spineVersions) {
+ const tag = version.replace('.', '');
+ const wrappers = path.join(out, `SpineFunctionBindings${tag}.generated.cpp`);
+ const rename = path.join(out, `SpineRename${tag}.generated.hpp`);
+ try {
+ execFileSync(python, [
+ path.join(ROOT, 'tools', 'eht.py'),
+ '--native-functions', path.join(BINDINGS, SPINE_BINDING_HEADER),
+ '--native-shim', 'esn_shim.hpp',
+ '--native-functions-alias', spineAlias(version),
+ '--native-functions-alias-output', wrappers,
+ '--native-functions-alias-header', rename,
+ ], { cwd: ROOT, stdio: 'pipe' });
+ } catch (e) {
+ fail(`EHT failed on Spine ${version}: ${String(e.stderr || e.message)}`);
+ continue;
+ }
+ const renameText = readFileSync(rename, 'utf8');
+ for (const name of spineNames) {
+ if (!renameText.includes(`#define ${name} spine${tag}_`)) fail(`${name} is not renamed for Spine ${version}`);
+ }
+ if (!readFileSync(wrappers, 'utf8').includes(`\nvoid esn_register_functions_spine${tag}(esjs::Val global) {`)) {
+ fail(`the Spine ${version} TU has no esn_register_functions_spine${tag}`);
+ }
+}
rmSync(out, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
if (failed) process.exit(1);
console.log(`native bindings OK: ${abs.length} headers, ${includes.length} generated include(s) resolve, `
- + `${physxWrapped.size} PhysX twins.`);
+ + `${physxWrapped.size} PhysX twins, ${spineVersions.length} Spine releases.`);
diff --git a/tools/eht/__main__.py b/tools/eht/__main__.py
index e55570031..97a432ccd 100644
--- a/tools/eht/__main__.py
+++ b/tools/eht/__main__.py
@@ -155,9 +155,10 @@ def main() -> int:
# Function wrappers are parsed from declarations, not component reflection —
# emit them before (and independently of) the component pass.
if args.native_functions:
- if args.native_functions_output is None and args.native_functions_ts is None:
- print("[FAIL] --native-functions needs --native-functions-output and/or "
- "--native-functions-ts.")
+ if (args.native_functions_output is None and args.native_functions_ts is None
+ and args.native_functions_alias_output is None):
+ print("[FAIL] --native-functions needs --native-functions-output, "
+ "--native-functions-ts and/or --native-functions-alias-output.")
return 1
code = _emit_native_functions(args)
if code != 0 or args.native_output is None:
diff --git a/tools/spine-c-rename.mjs b/tools/spine-c-rename.mjs
new file mode 100644
index 000000000..36b6665c6
--- /dev/null
+++ b/tools/spine-c-rename.mjs
@@ -0,0 +1,182 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
+/**
+ * @file spine-c-rename.mjs
+ * @brief The rename header that lets several spine-c releases share one binary.
+ *
+ * @details Every vendored spine-c runtime (2.1, 3.8, 4.1, 4.2) defines the same C
+ * names — spSkeleton_create, Json_create, … — so a native host that
+ * carries more than one has to give each its own. The header this writes
+ * is force-included into one release's sources and into the engine's
+ * backend for it, prefixing every external symbol that release's objects
+ * define or expect from the backend (_spAtlasPage_createTexture and the
+ * other hooks).
+ *
+ * The list is read off the compiled objects with llvm-nm, not off the
+ * sources: token-pasting macros define functions no regex would see, and
+ * a name left out does not fail loudly — the linker binds one release's
+ * call to another's definition. The vendored runtimes are pinned, so the
+ * output is committed (native/spine/) and regenerated only when one moves:
+ *
+ * node tools/spine-c-rename.mjs # rewrite the headers
+ * node tools/spine-c-rename.mjs --check # fail if one is stale
+ * node tools/spine-c-rename.mjs --verify <build dir>
+ * # after a host build: fail if a Spine name escaped its prefix
+ *
+ * Needs a clang and llvm-nm: CC / NM, or the Android NDK's (ANDROID_NDK_HOME,
+ * or the newest NDK under the SDK).
+ *
+ * 4.3 is not here: it is spine-cpp, whose names live in namespace spine and
+ * collide with none of these.
+ */
+import { execFileSync } from 'node:child_process';
+import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync, mkdirSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
+const OUT_DIR = path.join(root, 'native', 'spine');
+
+/** Where each spine-c release keeps its sources — the shapes native/CMakeLists.txt reads. */
+function spineCTree(version) {
+ const base = path.join(root, 'third_party', `spine-runtimes-${version}`);
+ for (const rel of ['spine-c/spine-c', 'spine-c']) {
+ const src = path.join(base, rel, 'src', 'spine');
+ const inc = path.join(base, rel, 'include');
+ if (existsSync(path.join(inc, 'spine')) && existsSync(src)) return { src, inc };
+ }
+ return null;
+}
+
+export function spineCVersions() {
+ return readdirSync(path.join(root, 'third_party'))
+ .filter((d) => d.startsWith('spine-runtimes-'))
+ .map((d) => d.slice('spine-runtimes-'.length))
+ .filter((v) => spineCTree(v))
+ .sort();
+}
+
+export const spineTag = (version) => version.replace('.', '');
+export const renameHeaderPath = (version) => path.join(OUT_DIR, `SpineCRename${spineTag(version)}.hpp`);
+
+function ndkBin() {
+ const sdk = process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT
+ || (process.env.LOCALAPPDATA && path.join(process.env.LOCALAPPDATA, 'Android', 'Sdk'));
+ const ndk = process.env.ANDROID_NDK_HOME || (sdk && existsSync(path.join(sdk, 'ndk'))
+ ? path.join(sdk, 'ndk', readdirSync(path.join(sdk, 'ndk')).sort().at(-1)) : null);
+ if (!ndk) return null;
+ const host = process.platform === 'win32' ? 'windows-x86_64' : process.platform === 'darwin' ? 'darwin-x86_64' : 'linux-x86_64';
+ const bin = path.join(ndk, 'toolchains', 'llvm', 'prebuilt', host, 'bin');
+ return existsSync(bin) ? bin : null;
+}
+
+function tools() {
+ const bin = ndkBin();
+ const exe = process.platform === 'win32' ? '.exe' : '';
+ const cc = process.env.CC || (bin && path.join(bin, `clang${exe}`));
+ const nm = process.env.NM || (bin && path.join(bin, `llvm-nm${exe}`));
+ if (!cc || !nm) throw new Error('spine-c-rename: no clang/llvm-nm (set CC and NM, or install the Android NDK).');
+ return { cc, nm };
+}
+
+/** Every external name one release's objects define, plus the backend hooks they call. */
+function symbolsOf(version, { cc, nm }) {
+ const tree = spineCTree(version);
+ const work = mkdtempSync(path.join(tmpdir(), `spine-c-${spineTag(version)}-`));
+ try {
+ const objects = [];
+ for (const file of readdirSync(tree.src).filter((f) => f.endsWith('.c'))) {
+ const obj = path.join(work, `${file}.o`);
+ // ELF, so the names come back undecorated whichever OS runs this.
+ execFileSync(cc, ['--target=aarch64-linux-android29', '-c', '-w', '-O0',
+ '-I', tree.inc, path.join(tree.src, file), '-o', obj]);
+ objects.push(obj);
+ }
+ const out = execFileSync(nm, ['--extern-only', ...objects], { encoding: 'utf8', maxBuffer: 1 << 26 });
+ const defined = new Set();
+ const undefinedNames = new Set();
+ for (const line of out.split('\n')) {
+ const m = /^\s*(?:[0-9a-f]+\s+)?([A-Za-z])\s+(\S+)$/.exec(line.trim());
+ if (!m) continue;
+ const [, kind, name] = m;
+ if (!/^[A-Za-z_]\w*$/.test(name)) continue;
+ if (kind === 'U') undefinedNames.add(name);
+ else defined.add(name);
+ }
+ // The hooks spine-c leaves to its host (texture create/dispose, file read):
+ // undefined here, defined by the engine's backend for this release.
+ for (const name of undefinedNames) {
+ if (!defined.has(name) && /^_?sp[A-Z]/.test(name)) defined.add(name);
+ }
+ return [...defined].sort();
+ } finally {
+ rmSync(work, { recursive: true, force: true });
+ }
+}
+
+function headerFor(version, names) {
+ const tag = spineTag(version);
+ return [
+ '// Generated by tools/spine-c-rename.mjs from the compiled spine-c ' + version + ' objects — DO NOT EDIT.',
+ `// Force-included into spine-c ${version} and the engine's backend for it, so that`,
+ '// release links beside the others in one native host (native/CMakeLists.txt).',
+ '#pragma once',
+ '',
+ ...names.map((n) => `#define ${n} es${tag}_${n}`),
+ '',
+ ].join('\n');
+}
+
+/**
+ * The build's own word on it: every Spine-owned C name each release's libraries
+ * define carries that release's prefix. A name the header missed links without a
+ * complaint — one release's call bound to another's definition — so this reads
+ * the libraries the host was linked from. Returns the offending names.
+ */
+export function verifyBuild(buildDir, nm = tools().nm) {
+ const libs = readdirSync(buildDir).filter((f) => /^(lib)?(spine_runtime|estella_spine)_\d+\.(lib|a)$/.test(f));
+ const escaped = [];
+ for (const lib of libs) {
+ const tag = /_(\d+)\.(lib|a)$/.exec(lib)[1];
+ const out = execFileSync(nm, ['--defined-only', '--extern-only', '-j', path.join(buildDir, lib)],
+ { encoding: 'utf8', maxBuffer: 1 << 26 });
+ for (const name of out.split(/\r?\n/)) {
+ if (!/^(_?sp[A-Z]|Json_|_?spine_)/.test(name)) continue;
+ if (name.startsWith(`es${tag}_`) || name.startsWith(`spine${tag}_`)) continue;
+ escaped.push(`${lib}: ${name}`);
+ }
+ }
+ return { libs, escaped };
+}
+
+function main() {
+ const verifyAt = process.argv.indexOf('--verify');
+ if (verifyAt >= 0) {
+ const { libs, escaped } = verifyBuild(path.resolve(process.argv[verifyAt + 1] ?? '.'));
+ for (const e of escaped) console.error(`unprefixed: ${e}`);
+ if (libs.length === 0) { console.error('no Spine libraries in that directory'); process.exit(2); }
+ if (escaped.length) process.exit(1);
+ console.log(`spine symbols OK: ${libs.length} libraries, every Spine name prefixed by its release.`);
+ return;
+ }
+ const check = process.argv.includes('--check');
+ const t = tools();
+ mkdirSync(OUT_DIR, { recursive: true });
+ let stale = 0;
+ for (const version of spineCVersions()) {
+ const text = headerFor(version, symbolsOf(version, t));
+ const file = renameHeaderPath(version);
+ const current = existsSync(file) ? readFileSync(file, 'utf8') : null;
+ if (check) {
+ if (current !== text) { console.error(`stale: ${path.relative(root, file)}`); stale++; }
+ continue;
+ }
+ writeFileSync(file, text);
+ console.log(`${path.relative(root, file)}: ${text.split('\n').filter((l) => l.startsWith('#define')).length} names`);
+ }
+ if (stale) process.exit(1);
+}
+
+if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) main();