10521 Commits

Author SHA1 Message Date
Mario Zechner
eaff42c840 [cpp] Fix primitive type array reading in SkeletonJson/SkeletonBinary 2025-07-13 04:43:05 +02:00
Mario Zechner
bd5b032619 [tests] ir-based serializer generator for C++ 2025-07-13 04:23:57 +02:00
Mario Zechner
4bf777a658 [tests] serializer ir generator, ir-based java serializer generator 2025-07-13 03:31:20 +02:00
Mario Zechner
102b030db3 [tests] More improvements to serializer generator. 2025-07-13 02:52:50 +02:00
Mario Zechner
429ed9dd3b [tests] Complete C++ SkeletonSerializer auto-generation from Java
- Implement comprehensive C++ serializer generator (tests/generate-cpp-serializer.ts)
- Direct transformation of Java SkeletonSerializer to C++ header-only implementation
- Handle all C++-specific API differences:
  * Field access patterns (obj.field → obj->field, private fields → obj->_field)
  * Null check removal for reference-returning methods (getBones, getEdges)
  * Nested array null check elimination (getVertices, getDrawOrders)
  * Enum serialization via switch statements replacing .name() calls
  * Custom function replacement system for C++-specific implementations
- Add specialized C++ implementations:
  * writeColor: handle public Color fields (r,g,b,a without underscore)
  * writeSkin: iterate AttachmentMap::Entries and call writeSkinEntry
  * writeSkinEntry: handle AttachmentMap::Entry instead of Java SkinEntry
- Auto-generate both pointer and reference versions of all write methods
- Create JsonWriter.h as header-only port of Java JsonWriter
- Update HeadlessTest.cpp to use generated SkeletonSerializer
- Add comprehensive type analysis and enum mapping from analysis-result.json
- Implement exclusion system for filtering unwanted types/methods
- Fix Java generator nested array null checks that were incorrectly hardcoded

Generated C++ serializer produces identical JSON output to Java reference implementation.
2025-07-13 02:06:44 +02:00
Mario Zechner
3183c0b383 [tests] Auto-generation of Java SkeletonSerializer 2025-07-12 02:24:14 +02:00
Mario Zechner
73a17e88c9 [tests] DebugPrinter -> HeadlessTest 2025-07-11 14:16:24 +02:00
Mario Zechner
99f9aca731 [ts] VS Code debug-printer launch config. 2025-07-11 13:51:58 +02:00
Mario Zechner
6dffb3ea90 [libgdx] Fix VS Code launch config for debug-printer 2025-07-11 13:46:37 +02:00
Mario Zechner
d973417106 [tests] Fix locale in all debug printers, add tests/README.md, build if sources changed in compare-with-reference-impl.ts 2025-07-11 13:17:15 +02:00
Mario Zechner
4e3d2be023 [c][cpp][libgdx] Launch configs for debug-printer 2025-07-11 12:33:02 +02:00
Davide Tantillo
21b9efc8c7 [ts][pixi-v7][pixi-v8] Allow asset loaders to be explicitly requested. Close #2876, #2744.
This allows to easily load assets from base64 or blob.
2025-07-11 11:46:26 +02:00
Davide Tantillo
40685bb6c6 [ts][webcomponents] Avoid recreating texture when image is passed through cache. 2025-07-11 11:37:39 +02:00
Davide Tantillo
2e5a099ef4 [ts][webcomponents] Sharable cache for AssetManager. 2025-07-11 11:37:35 +02:00
Davide Tantillo
85de53624e [ts][webcomponents] Avoid useless UWT, if skeleton scale does not change. 2025-07-11 11:37:26 +02:00
Mario Zechner
9ee4d6c40e [libgdx] Add DebugPrinter program, add runDebugPrinter task to build.gradle 2025-07-11 11:03:04 +02:00
Mario Zechner
497f4382b1 [c] Fix String reference returns in ir-generator, add debug-printer scaffold for runtime comparison tests 2025-07-11 11:01:25 +02:00
Mario Zechner
cc4f11fded [cpp] Simplify directory structure, add DebugPrinter program
- spine-cpp/spine-cpp was moved into spine-cpp directory, so spine-cpp/spine-cpp/src -> spine-cpp/src, spine-cpp/spine-cpp/include -> spine-cpp/include
- Added scaffold for DebugPrinter to be used by runtime comparison tests
- Added build.sh
2025-07-11 11:00:44 +02:00
Mario Zechner
f9fad00936 [c][cpp] Fix DataInput.read() to return unsigned int, fixes SkeletonBinary parsing. Remove findXXXConstraint methods from SkeletonData. 2025-07-11 02:48:54 +02:00
Mario Zechner
ab9f6f6099 [c] Update todo with items for bugs/features 2025-07-11 02:24:21 +02:00
Mario Zechner
9c06cef2be [c][cpp] Fix ir-generator, Update type hierarchy in C++
- ir-generator did not handle const String& parameters correctly
- Type hierarchy of Bone, Constraint was incorrect. Bone didn't extend Update, thus fetching RTTI in updateCache failed at runtime.
2025-07-11 02:17:12 +02:00
Mario Zechner
c651e74924 [c] Removed old spine-c, removed spine-cpp-lite, replaced with new spine-c 2025-07-10 19:28:37 +02:00
Mario Zechner
a5029e13e0 [c] Refactoring docs, to be removed 2025-07-10 19:26:48 +02:00
Mario Zechner
d399ac158c [c] Fix allocation of imagePaths in Atlas wrapper 2025-07-10 04:50:58 +02:00
Mario Zechner
8f831bd245 [c] More fixes to C wrapper generator, everything compiles, smoke test works 2025-07-10 04:44:35 +02:00
Mario Zechner
dcc0e20361 [c] Fixed C wrapper generator 2025-07-10 04:22:20 +02:00
Mario Zechner
b1e5ed1c25 [cpp] Various fixes for c wrapper generation 2025-07-10 00:33:36 +02:00
Mario Zechner
e1577829dd [cpp] Add Array(capacity) constructor 2025-07-09 20:22:35 +02:00
Mario Zechner
b9424e0745 Temporary docs/ to keep track of refactoring work 2025-07-09 19:12:38 +02:00
Mario Zechner
cd24e558e2 [c] Split Enum and ClassOrStruct 2025-07-09 19:10:37 +02:00
Mario Zechner
dbd2c2bb37 Improve spine-c-new codegen array scanner and type handling
- Fix array scanner to properly handle primitive pointer types (e.g., Array<float*>)
- Add comprehensive multi-level pointer detection and error reporting
- Improve const type checking to prevent false positives
- Extract reusable warnings collector for consistent error formatting
- Add checks for problematic array types (const elements, template parameters)
- Sort array specializations by category (primitives, enums, pointers)
- Export isPrimitive function and ArraySpecialization interface
- Move array type regex to module level for performance
- Fix discriminated union types for Exclusion and Member interfaces
2025-07-09 11:26:12 +02:00
Mario Zechner
e324cf5cb1 [c] Port type extractor to TypeScript and improve codegen
- Ported extract-spine-cpp-types.js to TypeScript in type-extractor.ts
- Improved type interfaces with discriminated unions for better type safety
- Added proper isConst tracking for const-qualified methods
- Fixed exclusions to check method.isConst instead of return type
- Removed special type mappings (utf8, spine_void) - primitives pass through unchanged
- Made toCTypeName strict with proper error handling
- Documented all conversion functions with examples
- Excluded SpineObject from extraction (matches JS behavior)
- Removed original JS extractor as it's now replaced by TypeScript version

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-09 02:27:20 +02:00
Mario Zechner
22ea76db1b [c] Port type extractor to TypeScript and improve codegen
- Ported extract-spine-cpp-types.js to TypeScript in type-extractor.ts
- Improved type interfaces with discriminated unions for better type safety
- Added proper isConst tracking for const-qualified methods
- Fixed exclusions to check method.isConst instead of return type
- Removed special type mappings (utf8, spine_void) - primitives pass through unchanged
- Made toCTypeName strict with proper error handling
- Documented all conversion functions with examples
- Excluded SpineObject from extraction (matches JS behavior)
- Removed original JS extractor as it's now replaced by TypeScript version

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-09 01:50:41 +02:00
Mario Zechner
0a33247f44 Fix exclusions.ts: discriminated union type, correct const method handling 2025-07-08 23:38:43 +02:00
Mario Zechner
4fd23d3abe [c] Codegen improvements. 2025-07-08 23:34:17 +02:00
Mario Zechner
759434e461 [c] Fix abstract type detection and improve codegen filtering
- Always set isAbstract to boolean in extract-spine-cpp-types.js
- Check for inherited pure virtual methods after inheritance pass
- Include abstract classes but skip create() function generation
- Only exclude template classes from code generation
- Extract const/non-const conflict checking into separate function
- Remove unused OpaqueTypeGenerator and helper functions
2025-07-08 23:08:48 +02:00
Mario Zechner
fdbb180409 Refined plan for: spine-bool-stdbool 2025-07-08 22:11:31 +02:00
Mario Zechner
10ad175c8a [cpp] Remove spine:: namespace prefix everywhere. 2025-07-08 21:09:34 +02:00
Mario Zechner
9d384c50ed [cpp] Rename Vector -> Array, ContainerUtil > ArrayUtils 2025-07-08 20:38:45 +02:00
Mario Zechner
c75fd64189 [cpp] First pass of C wrapper generator and generated sources, WIP 2025-07-08 14:34:10 +02:00
Mario Zechner
46410f4b8a [cpp] Added type extractor script to be used by C wrapper generator. 2025-07-08 13:42:25 +02:00
Mario Zechner
b69e2ca708 [libgdx] Update Eclipse and Gradle source/target compat to Java 17 2025-07-08 01:41:13 +02:00
Mario Zechner
829b6f4733 [libgdx] Remove .vscode/settings.json 2025-07-08 01:14:34 +02:00
Mario Zechner
06eccd47dd [libgdx] Update gradle wrapper to 8.12, delete Eclipse files on gradle build configuration 2025-07-08 00:02:57 +02:00
Mario Zechner
65d0eec7c5 [cpp] 4.3 porting WIP 2025-07-07 22:57:37 +02:00
Mario Zechner
7add48c8f9 [cpp] 4.3 porting WIP 2025-07-07 22:04:00 +02:00
Mario Zechner
5aeceb27c9 [cpp] 4.3 porting WIP 2025-07-07 21:58:42 +02:00
Mario Zechner
972a1bc8fc [cpp] 4.3 porting WIP 2025-07-07 21:37:55 +02:00
Mario Zechner
e7c4a3eef0 [cpp] 4.3 porting WIP 2025-07-07 19:15:16 +02:00
Mario Zechner
844e410d6b Updated .gitignore 2025-07-07 11:55:39 +02:00