651 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
751ee5972c [cpp] 4.3 porting WIP 2025-07-05 20:29:01 +02:00
Mario Zechner
8ff8680035 [cpp] 4.3 porting WIP 2025-07-05 03:28:39 +02:00
Mario Zechner
9deb524a70 [cpp] 4.3 porting WIP 2025-07-05 03:16:24 +02:00
Mario Zechner
c04f89e8ee [cpp] 4.3 porting WIP 2025-07-05 02:10:45 +02:00
Mario Zechner
d7891870bf [cpp] 4.3 porting WIP 2025-07-04 23:21:04 +02:00
Mario Zechner
782620c737 [cpp] 4.3 porting WIP 2025-07-04 22:57:16 +02:00
Mario Zechner
ac2046c1a5 [cpp] 4.3 porting WIP 2025-07-04 22:37:58 +02:00
Mario Zechner
80bf16785f [cpp] 4.3 porting WIP 2025-07-04 22:18:50 +02:00
Mario Zechner
f24242e317 [cpp] 4.3 porting WIP 2025-07-04 22:16:35 +02:00
Mario Zechner
30738443e1 [cpp] 4.3 porting WIP 2025-07-04 22:08:04 +02:00
Mario Zechner
d6c5ddd558 [cpp] 4.3 porting WIP 2025-07-04 22:00:00 +02:00
Mario Zechner
3b1dd11003 [cpp] 4.3 porting WIP 2025-07-04 21:57:37 +02:00
Mario Zechner
fe20361d13 [cpp] 4.3 porting WIP 2025-07-04 21:48:13 +02:00
Mario Zechner
e3433c5903 [cpp] 4.3 porting WIP 2025-07-04 21:29:22 +02:00
Mario Zechner
dd1f1c7cfc [cpp] 4.3 porting WIP 2025-07-04 21:05:56 +02:00
Mario Zechner
a07bda1aa0 [cpp] 4.3 porting WIP 2025-07-04 20:50:37 +02:00
Mario Zechner
bef1cdb2be [cpp] 4.3 porting WIP 2025-07-04 20:47:57 +02:00
Mario Zechner
c3890eaa85 [cpp] 4.3 porting WIP 2025-07-04 20:44:13 +02:00
Mario Zechner
708a73bcee [cpp] 4.3 porting WIP 2025-07-04 20:40:22 +02:00
Mario Zechner
5b90c94926 [cpp] 4.3 porting WIP 2025-07-04 19:32:50 +02:00
Mario Zechner
e6bc6827cf [cpp] 4.3 porting WIP 2025-07-04 12:46:50 +02:00
Mario Zechner
9e9f52ad62 [cpp] 4.3 porting WIP 2025-07-02 16:43:42 +02:00
Mario Zechner
0f3d19d0d6 [cpp] 4.3 porting WIP 2025-07-02 16:21:39 +02:00
Mario Zechner
c1ba842c15 [cpp] 4.3 porting WIP 2025-07-02 16:16:52 +02:00
Mario Zechner
bfe1f856f7 [cpp] 4.3 porting WIP 2025-07-02 15:56:20 +02:00
Mario Zechner
b2305c55e1 [cpp] 4.3 porting WIP 2025-07-02 15:55:06 +02:00
Mario Zechner
3d94cce370 [cpp] 4.3 porting WIP 2025-07-02 15:52:04 +02:00
Mario Zechner
e9f41ada04 [cpp] 4.3 porting WIP 2025-07-02 15:51:06 +02:00
Mario Zechner
9ace07c194 [cpp] 4.3 porting WIP 2025-07-02 15:02:37 +02:00
Mario Zechner
f92576bbe9 [cpp] 4.3 porting WIP 2025-07-02 14:54:33 +02:00
Mario Zechner
3a2c986e2b [cpp] 4.3 porting WIP 2025-07-02 14:49:06 +02:00
Mario Zechner
d419a27986 [cpp] 4.3 porting WIP 2025-07-02 12:06:29 +02:00