[cpp] 4.3 porting WIP

This commit is contained in:
Mario Zechner 2025-07-07 22:57:37 +02:00
parent 7add48c8f9
commit 65d0eec7c5
9 changed files with 23 additions and 8 deletions

View File

@ -68,8 +68,6 @@ namespace spine {
template<class T, class D, class P>
class SP_API ConstraintGeneric : public PosedGeneric<D, P, P>, public PosedActive, public Constraint {
RTTI_DECL
public:
ConstraintGeneric(D &data) : PosedGeneric<D, P, P>(data), PosedActive(), Constraint() {
}

View File

@ -97,7 +97,7 @@ namespace spine {
SequenceMode_pingpongReverse = 6
};
SequenceMode SequenceMode_valueOf(const String &value) {
inline SequenceMode SequenceMode_valueOf(const String &value) {
if (value == "hold") return SequenceMode_hold;
if (value == "once") return SequenceMode_once;
if (value == "loop") return SequenceMode_loop;

View File

@ -79,6 +79,8 @@ namespace spine {
/// Returns true if this slot has a dark color.
bool hasDarkColor();
void setHasDarkColor(bool hasDarkColor);
/// The current attachment for the slot, or null if the slot has no attachment.
Attachment* getAttachment();

View File

@ -31,7 +31,7 @@
#define SPINE_VERSION_H_
#define SPINE_MAJOR_VERSION 4
#define SPINE_MINOR_VERSION 2
#define SPINE_VERSION_STRING "4.2"
#define SPINE_MINOR_VERSION 3
#define SPINE_VERSION_STRING "4.3"
#endif

View File

@ -31,4 +31,6 @@
using namespace spine;
RTTI_IMPL_NOPARENT(ConstraintTimeline)
RTTI_IMPL_NOPARENT(ConstraintTimeline)
ConstraintTimeline::ConstraintTimeline(int constraintIndex) : _constraintIndex(constraintIndex) {}

View File

@ -680,8 +680,8 @@ Attachment *SkeletonJson::readAttachment(Json *map, Skin *skin, int slotIndex, c
if (Json::getInt(map, "hull", 0)) mesh->setHullLength(Json::getInt(map, "hull", 0) << 1);
Vector<unsigned short> edges;
if (!Json::asArray(Json::getItem(map, "edges"), edges)) return NULL;
mesh->_edges.clearAndAddAll(edges);
Json::asArray(Json::getItem(map, "edges"), edges);
if (edges.size() > 0) mesh->_edges.clearAndAddAll(edges);
return mesh;
}
case AttachmentType_Path: {

View File

@ -61,6 +61,10 @@ bool SlotPose::hasDarkColor() {
return _hasDarkColor;
}
void SlotPose::setHasDarkColor(bool hasDarkColor) {
_hasDarkColor = hasDarkColor;
}
Attachment *SlotPose::getAttachment() {
return _attachment;
}

7
spine-libgdx/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.import.gradle.enabled": true,
"java.import.gradle.wrapper.enabled": true,
"java.import.gradle.offline.enabled": false,
"java.server.launchMode": "Standard"
}

View File

@ -1,3 +1,5 @@
rootProject.name = 'spine-libgdx-root'
// includeBuild "../../libgdx"
include ":spine-libgdx"
include ":spine-libgdx-tests"