26 Commits

Author SHA1 Message Date
Mario Zechner
aac98324f2 [cpp][c] Clean up AtlasRegion, TextureRegion to use _ field prefixes and getters/setters instead of public fields 2025-07-14 21:13:56 +02:00
Mario Zechner
eaff42c840 [cpp] Fix primitive type array reading in SkeletonJson/SkeletonBinary 2025-07-13 04:43:05 +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
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
NathanSweet
5aa58c5a9b spine-cpp is no longer supported. Use spine-c. 2013-04-02 02:48:12 +02:00
NathanSweet
42d072ae8d Simplified Timeline interface. 2013-03-25 12:49:02 +01:00
NathanSweet
75fc36eab6 Simplified all loading methods to take path, stream, or pointers. 2013-03-25 12:33:21 +01:00
NathanSweet
3aab744395 Utility methods to read from file and other minor improvements. 2013-03-22 16:18:03 +01:00
NathanSweet
6899b5249c Added AnimationState.
Fixed bug with keeping attachments visisble when setting new skin.
Clean up. Always more clean up can be done, freaking C++...
2013-03-22 14:22:35 +01:00
NathanSweet
6e9bcfd1d5 License headers for source files. 2013-03-20 14:58:59 +01:00
NathanSweet
d3949288f8 Separated SFML from spine-cpp. 2013-03-20 14:08:54 +01:00
NathanSweet
43018798ab Look in skin before default skin. 2013-03-15 02:25:15 +01:00
NathanSweet
a1ad55f8a1 Documented memory ownership.
Clean up and minor improvements.
2013-03-15 01:41:24 +01:00
Victor Savu
b0f8468ddc initialize variable 2013-03-13 00:40:18 +02:00
Victor Savu
67aa830511 fix use after free
the string created by value.substr(index * 2, 2) is deleted after c_str()
but before strtoul executes. The solution is to use a temporary string
to store the value.
2013-03-13 00:40:18 +02:00
Victor Savu
f77459983f use the states provided
This allows animations to be scaled/moved easily
2013-03-13 00:40:18 +02:00
NathanSweet
695db31d71 libgdx runtime, attachment loader instead of resolver.
Other minor fixes.
2013-03-12 23:20:38 +01:00
Sean Chapel
4e61263551 Fixes issue with visual studio not defining M_PI in math.h. Fixed all compiler warnings. 2013-02-26 11:03:11 -08:00
damucz
325d3265b9 memory leaks 2013-02-23 23:18:37 +01:00
NathanSweet
31b07f8625 Clean up 2013-02-22 23:37:36 +01:00
NathanSweet
6710c1e9c9 cpp, loading, applying and animating with SFML is working. 2013-02-22 20:04:32 +01:00
NathanSweet
268933242f cpp, skeleton loading and rendering with SFML. 2013-02-22 14:52:25 +01:00
NathanSweet
5efed09862 Texture atlas data loader, libgdx format. 2013-02-22 03:08:06 +01:00
NathanSweet
6887e51457 Clean up 2013-02-21 01:46:56 +01:00
NathanSweet
03a64be6ef Initial C++ generic runtime. 2013-02-20 01:25:52 +01:00