9 Commits

Author SHA1 Message Date
Mario Zechner
7b0bf128ff [cpp] Port AnimationState additive/hold rework, Skin placeholder rename, timeline API changes from spine-libgdx
- Replace MixBlend/MixDirection with bool fromSetup/add/out in all timeline apply() signatures
- Remove MixBlend.h and MixDirection.h (no longer used)
- Add Timeline::_additive and _instant fields
- Replace TrackEntry holdPrevious/interruptAlpha/mixBlend with additive/keepHold
- Rewrite AnimationState hold system with bitmask (Subsequent/First/Hold/HoldFirst)
- Rewrite applyMixingFrom alpha computation
- Rename Skin::AttachmentMap::Entry::_name to _placeholderName
- Fix SkeletonBinary::readLong() sign extension bug truncating 64-bit hashes
- Fix SkeletonSerializer sequence and bones null/empty parity with Java
- Add transition frame testing to HeadlessTest
- Port all doc updates from spine-libgdx
2026-03-24 21:09:50 +01:00
Mario Zechner
9749e52c05 [cpp] Port latest libgdx timeline and sequence follow-up fixes 2026-03-14 15:35:48 +01:00
Mario Zechner
6e582e724f [cpp][c] Port parser and sequence attachment changes from libgdx 2026-03-14 15:10:57 +01:00
Mario Zechner
861eac1c1b [c] References for non-nullable arguments and return types, pointers for nullable args and return types 2025-07-25 20:21:39 +02:00
Mario Zechner
6f81d43faa [cpp] Enhance circular reference display with deterministic object identifiers
Replace "<circular>" with meaningful reference strings using a hybrid approach:
- Objects with names: <EventData-walk>, <BoneData-head>, <Animation-run>
- Objects without names: <TrackEntry-1>, <Bone-2>, <SliderTimeline-3>

Each serialized object now includes "refString" as its first field, enabling
easy navigation from circular references to full object definitions.
2025-07-22 02:09:01 +02:00
Mario Zechner
b544dd99ed [formatters] C/C++ formatting 2025-07-15 22:56:12 +02:00
Mario Zechner
bd5b032619 [tests] ir-based serializer generator for C++ 2025-07-13 04:23:57 +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