From 10ad175c8ac87c82488917701230a5d17425c883 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 8 Jul 2025 21:09:34 +0200 Subject: [PATCH] [cpp] Remove spine:: namespace prefix everywhere. --- spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp | 6 +- .../spine-cpp/include/spine/AnimationState.h | 2 +- spine-cpp/spine-cpp/include/spine/Array.h | 4 +- spine-cpp/spine-cpp/include/spine/Log.h | 57 -------- spine-cpp/spine-cpp/include/spine/PosedData.h | 10 +- spine-cpp/spine-cpp/include/spine/RTTI.h | 20 +-- .../include/spine/SequenceTimeline.h | 2 +- .../spine-cpp/include/spine/SkeletonData.h | 4 +- .../spine-cpp/src/spine/AnimationState.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Event.cpp | 28 ++-- spine-cpp/spine-cpp/src/spine/EventData.cpp | 30 +++-- spine-cpp/spine-cpp/src/spine/Extension.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Json.cpp | 6 +- spine-cpp/spine-cpp/src/spine/Log.cpp | 125 ------------------ .../spine-cpp/src/spine/MeshAttachment.cpp | 2 +- .../spine-cpp/src/spine/RegionAttachment.cpp | 2 +- .../spine-cpp/src/spine/SkeletonBinary.cpp | 2 +- .../spine-cpp/src/spine/SkeletonBounds.cpp | 12 +- .../spine-cpp/src/spine/SkeletonData.cpp | 4 +- 19 files changed, 71 insertions(+), 249 deletions(-) delete mode 100644 spine-cpp/spine-cpp/include/spine/Log.h delete mode 100644 spine-cpp/spine-cpp/src/spine/Log.cpp diff --git a/spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp b/spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp index 1ada34879..2f28b2d58 100644 --- a/spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp +++ b/spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp @@ -101,7 +101,7 @@ static void initExtensions() { } } -spine::SpineExtension *spine::getDefaultExtension() { +SpineExtension *getDefaultExtension() { initExtensions(); return defaultExtension; } @@ -1228,7 +1228,7 @@ void spine_skeleton_update_cache(spine_skeleton skeleton) { void spine_skeleton_update_world_transform(spine_skeleton skeleton, spine_physics physics) { if (skeleton == nullptr) return; Skeleton *_skeleton = (Skeleton *) skeleton; - _skeleton->updateWorldTransform((spine::Physics) physics); + _skeleton->updateWorldTransform((Physics) physics); } void spine_skeleton_update_world_transform_bone(spine_skeleton skeleton, spine_physics physics, spine_bone parent) { @@ -1236,7 +1236,7 @@ void spine_skeleton_update_world_transform_bone(spine_skeleton skeleton, spine_p if (parent == nullptr) return; Skeleton *_skeleton = (Skeleton *) skeleton; Bone *_bone = (Bone *) parent; - _skeleton->updateWorldTransform((spine::Physics) physics, _bone); + _skeleton->updateWorldTransform((Physics) physics, _bone); } void spine_skeleton_set_to_setup_pose(spine_skeleton skeleton) { diff --git a/spine-cpp/spine-cpp/include/spine/AnimationState.h b/spine-cpp/spine-cpp/include/spine/AnimationState.h index 87f99efd6..e0d2eec90 100644 --- a/spine-cpp/spine-cpp/include/spine/AnimationState.h +++ b/spine-cpp/spine-cpp/include/spine/AnimationState.h @@ -593,7 +593,7 @@ namespace spine { void computeHold(TrackEntry *entry); - void setAttachment(Skeleton &skeleton, spine::Slot &slot, const String &attachmentName, bool attachments); + void setAttachment(Skeleton &skeleton, Slot &slot, const String &attachmentName, bool attachments); }; } diff --git a/spine-cpp/spine-cpp/include/spine/Array.h b/spine-cpp/spine-cpp/include/spine/Array.h index b3b281194..abbeca948 100644 --- a/spine-cpp/spine-cpp/include/spine/Array.h +++ b/spine-cpp/spine-cpp/include/spine/Array.h @@ -86,7 +86,7 @@ namespace spine { _capacity = (int) (_size * 1.75f); } if (_capacity < 8) _capacity = 8; - _buffer = spine::SpineExtension::realloc(_buffer, _capacity, __FILE__, __LINE__); + _buffer = SpineExtension::realloc(_buffer, _capacity, __FILE__, __LINE__); } if (oldSize < _size) { for (size_t i = oldSize; i < _size; i++) { @@ -115,7 +115,7 @@ namespace spine { T valueCopy = inValue; _capacity = (int) (_size * 1.75f); if (_capacity < 8) _capacity = 8; - _buffer = spine::SpineExtension::realloc(_buffer, _capacity, __FILE__, __LINE__); + _buffer = SpineExtension::realloc(_buffer, _capacity, __FILE__, __LINE__); construct(_buffer + _size++, valueCopy); } else { construct(_buffer + _size++, inValue); diff --git a/spine-cpp/spine-cpp/include/spine/Log.h b/spine-cpp/spine-cpp/include/spine/Log.h deleted file mode 100644 index 689bd63a8..000000000 --- a/spine-cpp/spine-cpp/include/spine/Log.h +++ /dev/null @@ -1,57 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_DEBUG_LOG_H -#define SPINE_DEBUG_LOG_H - -#include - -namespace spine { - SP_API void spDebug_printSkeletonData(SkeletonData *skeletonData); - - SP_API void spDebug_printAnimation(Animation *animation); - - SP_API void spDebug_printTimeline(Timeline *timeline); - - SP_API void spDebug_printBoneDatas(Array &boneDatas); - - SP_API void spDebug_printBoneData(BoneData *boneData); - - SP_API void spDebug_printSkeleton(Skeleton *skeleton); - - SP_API void spDebug_printBones(Array &bones); - - SP_API void spDebug_printBone(Bone *bone); - - SP_API void spDebug_printFloats(float *values, int numFloats); - - SP_API void spDebug_printFloats(Array &values); -} - -#endif diff --git a/spine-cpp/spine-cpp/include/spine/PosedData.h b/spine-cpp/spine-cpp/include/spine/PosedData.h index 386e4653b..5b2914751 100644 --- a/spine-cpp/spine-cpp/include/spine/PosedData.h +++ b/spine-cpp/spine-cpp/include/spine/PosedData.h @@ -63,11 +63,11 @@ namespace spine { friend class Slot; public: - PosedData(const spine::String& name); + PosedData(const String& name); virtual ~PosedData(); /// The constraint's name, which is unique across all constraints in the skeleton of the same type. - const spine::String& getName() const { return _name; }; + const String& getName() const { return _name; }; /// When true, Skeleton::updateWorldTransform(Physics) only updates this constraint if the Skeleton::getSkin() /// contains this constraint. @@ -77,11 +77,11 @@ namespace spine { void setSkinRequired(bool skinRequired) { _skinRequired = skinRequired; }; protected: - spine::String _name; + String _name; bool _skinRequired; }; - inline PosedData::PosedData(const spine::String& name) : _name(name), _skinRequired(false) { + inline PosedData::PosedData(const String& name) : _name(name), _skinRequired(false) { } inline PosedData::~PosedData() { @@ -124,7 +124,7 @@ namespace spine { P _setup; public: - PosedDataGeneric(const spine::String& name): PosedData(name), _setup() { + PosedDataGeneric(const String& name): PosedData(name), _setup() { } virtual ~PosedDataGeneric() {}; diff --git a/spine-cpp/spine-cpp/include/spine/RTTI.h b/spine-cpp/spine-cpp/include/spine/RTTI.h index d540513f6..35ce15975 100644 --- a/spine-cpp/spine-cpp/include/spine/RTTI.h +++ b/spine-cpp/spine-cpp/include/spine/RTTI.h @@ -66,24 +66,24 @@ namespace spine { #define RTTI_DECL_NOPARENT \ public: \ -static const spine::RTTI rtti; \ -virtual const spine::RTTI& getRTTI() const; +static const RTTI rtti; \ +virtual const RTTI& getRTTI() const; #define RTTI_DECL \ public: \ -static const spine::RTTI rtti; \ -virtual const spine::RTTI& getRTTI() const override; +static const RTTI rtti; \ +virtual const RTTI& getRTTI() const override; #define RTTI_IMPL_NOPARENT(name) \ -const spine::RTTI name::rtti(#name); \ -const spine::RTTI& name::getRTTI() const { return rtti; } +const RTTI name::rtti(#name); \ +const RTTI& name::getRTTI() const { return rtti; } #define RTTI_IMPL(name, parent) \ -const spine::RTTI name::rtti(#name, parent::rtti); \ -const spine::RTTI& name::getRTTI() const { return rtti; } +const RTTI name::rtti(#name, parent::rtti); \ +const RTTI& name::getRTTI() const { return rtti; } #define RTTI_IMPL_MULTI(name, parent, ...) \ -const spine::RTTI name::rtti(#name, parent::rtti, &__VA_ARGS__::rtti); \ -const spine::RTTI& name::getRTTI() const { return rtti; } +const RTTI name::rtti(#name, parent::rtti, &__VA_ARGS__::rtti); \ +const RTTI& name::getRTTI() const { return rtti; } #endif /* Spine_RTTI_h */ diff --git a/spine-cpp/spine-cpp/include/spine/SequenceTimeline.h b/spine-cpp/spine-cpp/include/spine/SequenceTimeline.h index 4452cc1b4..f71b70c6c 100644 --- a/spine-cpp/spine-cpp/include/spine/SequenceTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/SequenceTimeline.h @@ -47,7 +47,7 @@ namespace spine { RTTI_DECL public: - explicit SequenceTimeline(size_t frameCount, int slotIndex, spine::Attachment *attachment); + explicit SequenceTimeline(size_t frameCount, int slotIndex, Attachment *attachment); virtual ~SequenceTimeline(); diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonData.h b/spine-cpp/spine-cpp/include/spine/SkeletonData.h index f5fda87ea..b83f8d2eb 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonData.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonData.h @@ -83,7 +83,7 @@ namespace spine { Skin *findSkin(const String &skinName); /// @return May be NULL. - spine::EventData *findEvent(const String &eventDataName); + EventData *findEvent(const String &eventDataName); /// @return May be NULL. Animation *findAnimation(const String &animationName); @@ -123,7 +123,7 @@ namespace spine { void setDefaultSkin(Skin *inValue); /// The skeleton's events. - Array &getEvents(); + Array &getEvents(); /// The skeleton's animations. Array &getAnimations(); diff --git a/spine-cpp/spine-cpp/src/spine/AnimationState.cpp b/spine-cpp/spine-cpp/src/spine/AnimationState.cpp index ef933c494..d35e0a1e7 100644 --- a/spine-cpp/spine-cpp/src/spine/AnimationState.cpp +++ b/spine-cpp/spine-cpp/src/spine/AnimationState.cpp @@ -46,7 +46,7 @@ using namespace spine; -void dummyOnAnimationEventFunc(AnimationState *state, spine::EventType type, TrackEntry *entry, Event *event = NULL) { +void dummyOnAnimationEventFunc(AnimationState *state, EventType type, TrackEntry *entry, Event *event = NULL) { SP_UNUSED(state); SP_UNUSED(type); SP_UNUSED(entry); diff --git a/spine-cpp/spine-cpp/src/spine/Event.cpp b/spine-cpp/spine-cpp/src/spine/Event.cpp index e3011a496..d0fb113cd 100644 --- a/spine-cpp/spine-cpp/src/spine/Event.cpp +++ b/spine-cpp/spine-cpp/src/spine/Event.cpp @@ -31,7 +31,9 @@ #include -spine::Event::Event(float time, const spine::EventData &data) : _data(data), +using namespace spine; + +Event::Event(float time, const EventData &data) : _data(data), _time(time), _intValue(data.getIntValue()), _floatValue(data.getFloatValue()), @@ -40,51 +42,51 @@ spine::Event::Event(float time, const spine::EventData &data) : _data(data), _balance(data.getBalance()) { } -const spine::EventData &spine::Event::getData() { +const EventData &Event::getData() { return _data; } -float spine::Event::getTime() { +float Event::getTime() { return _time; } -int spine::Event::getInt() { +int Event::getInt() { return _intValue; } -void spine::Event::setInt(int inValue) { +void Event::setInt(int inValue) { _intValue = inValue; } -float spine::Event::getFloat() { +float Event::getFloat() { return _floatValue; } -void spine::Event::setFloat(float inValue) { +void Event::setFloat(float inValue) { _floatValue = inValue; } -const spine::String &spine::Event::getString() { +const String &Event::getString() { return _stringValue; } -void spine::Event::setString(const spine::String &inValue) { +void Event::setString(const String &inValue) { _stringValue = inValue; } -float spine::Event::getVolume() { +float Event::getVolume() { return _volume; } -void spine::Event::setVolume(float inValue) { +void Event::setVolume(float inValue) { _volume = inValue; } -float spine::Event::getBalance() { +float Event::getBalance() { return _balance; } -void spine::Event::setBalance(float inValue) { +void Event::setBalance(float inValue) { _balance = inValue; } diff --git a/spine-cpp/spine-cpp/src/spine/EventData.cpp b/spine-cpp/spine-cpp/src/spine/EventData.cpp index df7204112..ca40fa9d0 100644 --- a/spine-cpp/spine-cpp/src/spine/EventData.cpp +++ b/spine-cpp/spine-cpp/src/spine/EventData.cpp @@ -31,7 +31,9 @@ #include -spine::EventData::EventData(const spine::String &name) : _name(name), +using namespace spine; + +EventData::EventData(const String &name) : _name(name), _intValue(0), _floatValue(0), _stringValue(), @@ -42,55 +44,55 @@ spine::EventData::EventData(const spine::String &name) : _name(name), } /// The name of the event, which is unique within the skeleton. -const spine::String &spine::EventData::getName() const { +const String &EventData::getName() const { return _name; } -int spine::EventData::getIntValue() const { +int EventData::getIntValue() const { return _intValue; } -void spine::EventData::setIntValue(int inValue) { +void EventData::setIntValue(int inValue) { _intValue = inValue; } -float spine::EventData::getFloatValue() const { +float EventData::getFloatValue() const { return _floatValue; } -void spine::EventData::setFloatValue(float inValue) { +void EventData::setFloatValue(float inValue) { _floatValue = inValue; } -const spine::String &spine::EventData::getStringValue() const { +const String &EventData::getStringValue() const { return _stringValue; } -void spine::EventData::setStringValue(const spine::String &inValue) { +void EventData::setStringValue(const String &inValue) { this->_stringValue = inValue; } -const spine::String &spine::EventData::getAudioPath() const { +const String &EventData::getAudioPath() const { return _audioPath; } -void spine::EventData::setAudioPath(const spine::String &inValue) { +void EventData::setAudioPath(const String &inValue) { _audioPath = inValue; } -float spine::EventData::getVolume() const { +float EventData::getVolume() const { return _volume; } -void spine::EventData::setVolume(float inValue) { +void EventData::setVolume(float inValue) { _volume = inValue; } -float spine::EventData::getBalance() const { +float EventData::getBalance() const { return _balance; } -void spine::EventData::setBalance(float inValue) { +void EventData::setBalance(float inValue) { _balance = inValue; } diff --git a/spine-cpp/spine-cpp/src/spine/Extension.cpp b/spine-cpp/spine-cpp/src/spine/Extension.cpp index 4f47e066a..bf87c5b19 100644 --- a/spine-cpp/spine-cpp/src/spine/Extension.cpp +++ b/spine-cpp/spine-cpp/src/spine/Extension.cpp @@ -43,7 +43,7 @@ void SpineExtension::setInstance(SpineExtension *inValue) { } SpineExtension *SpineExtension::getInstance() { - if (!_instance) _instance = spine::getDefaultExtension(); + if (!_instance) _instance = getDefaultExtension(); assert(_instance); return _instance; diff --git a/spine-cpp/spine-cpp/src/spine/Json.cpp b/spine-cpp/spine-cpp/src/spine/Json.cpp index 125226076..53123340e 100644 --- a/spine-cpp/spine-cpp/src/spine/Json.cpp +++ b/spine-cpp/spine-cpp/src/spine/Json.cpp @@ -90,7 +90,7 @@ int Json::getInt(Json *value, const char *name, int defaultValue) { return value ? value->_valueInt : defaultValue; } -bool Json::getBoolean(spine::Json *value, const char *name, bool defaultValue) { +bool Json::getBoolean(Json *value, const char *name, bool defaultValue) { value = getItem(value, name); if (value) { if (value->_valueString) return strcmp(value->_valueString, "true") == 0; @@ -127,8 +127,8 @@ Json::Json(const char *value) : _next(NULL), } Json::~Json() { - spine::Json *curr = NULL; - spine::Json *next = _child; + Json *curr = NULL; + Json *next = _child; do { curr = next; if (curr) { diff --git a/spine-cpp/spine-cpp/src/spine/Log.cpp b/spine-cpp/spine-cpp/src/spine/Log.cpp deleted file mode 100644 index bde609ff5..000000000 --- a/spine-cpp/spine-cpp/src/spine/Log.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated April 5, 2025. Replaces all prior versions. - * - * Copyright (c) 2013-2025, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include - -#include - -using namespace spine; - -void spine::spDebug_printSkeletonData(SkeletonData *skeletonData) { - int i, n; - spDebug_printBoneDatas(skeletonData->getBones()); - - for (i = 0, n = (int) skeletonData->getAnimations().size(); i < n; i++) { - spDebug_printAnimation(skeletonData->getAnimations()[i]); - } -} - -void _spDebug_printTimelineBase(Timeline *timeline) { - printf(" Timeline %s:\n", timeline->getRTTI().getClassName()); - printf(" frame count: %zu\n", timeline->getFrameCount()); - printf(" frame entries: %zu\n", timeline->getFrameEntries()); - printf(" frames: "); - spDebug_printFloats(timeline->getFrames()); - printf("\n"); -} - -void _spDebug_printCurveTimeline(CurveTimeline *timeline) { - _spDebug_printTimelineBase(timeline); - printf(" curves: "); - spDebug_printFloats(timeline->getCurves()); - printf("\n"); -} - -void spine::spDebug_printTimeline(Timeline *timeline) { - if (timeline->getRTTI().instanceOf(CurveTimeline::rtti)) - _spDebug_printCurveTimeline(static_cast(timeline)); - else - _spDebug_printTimelineBase(timeline); -} - -void spine::spDebug_printAnimation(Animation *animation) { - int i, n; - printf("Animation %s: %zu timelines\n", animation->getName().buffer(), animation->getTimelines().size()); - - for (i = 0, n = (int) animation->getTimelines().size(); i < n; i++) { - Timeline *timeline = animation->getTimelines()[i]; - spDebug_printTimeline(timeline); - } -} - -void spine::spDebug_printBoneDatas(Array &boneDatas) { - int i, n; - for (i = 0, n = (int) boneDatas.size(); i < n; i++) { - spDebug_printBoneData(boneDatas[i]); - } -} - -void spine::spDebug_printBoneData(BoneData *boneData) { - BoneLocal &setupPose = boneData->getSetupPose(); - printf("Bone data %s: %f, %f, %f, %f, %f, %f %f\n", boneData->getName().buffer(), setupPose.getRotation(), - setupPose.getScaleX(), setupPose.getScaleY(), setupPose.getX(), setupPose.getY(), setupPose.getShearX(), - setupPose.getShearY()); -} - -void spine::spDebug_printSkeleton(Skeleton *skeleton) { - spDebug_printBones(skeleton->getBones()); -} - -void spine::spDebug_printBones(Array &bones) { - int i, n; - for (i = 0, n = (int) bones.size(); i < n; i++) { - spDebug_printBone(bones[i]); - } -} - -void spine::spDebug_printBone(Bone *bone) { - BonePose &pose = bone->getAppliedPose(); - printf("Bone %s: %f, %f, %f, %f, %f, %f, %f\n", bone->getData().getName().buffer(), pose.getRotation(), pose.getScaleX(), - pose.getScaleY(), pose.getX(), pose.getY(), pose.getShearX(), pose.getShearY()); -} - -void spine::spDebug_printFloats(float *values, int numFloats) { - int i; - printf("(%i) [", numFloats); - for (i = 0; i < numFloats; i++) { - printf("%f, ", values[i]); - } - printf("]"); -} - -void spine::spDebug_printFloats(Array &values) { - int i, n; - printf("(%zu) [", values.size()); - for (i = 0, n = (int) values.size(); i < n; i++) { - printf("%f, ", values[i]); - } - printf("]"); -} diff --git a/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp b/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp index 97fec28ac..95f878a61 100644 --- a/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp @@ -210,7 +210,7 @@ void MeshAttachment::setHeight(float inValue) { _height = inValue; } -spine::Color &MeshAttachment::getColor() { +Color &MeshAttachment::getColor() { return _color; } diff --git a/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp b/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp index db8af513c..cd5770e27 100644 --- a/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp @@ -252,7 +252,7 @@ Array &RegionAttachment::getUVs() { return _uvs; } -spine::Color &RegionAttachment::getColor() { +Color &RegionAttachment::getColor() { return _color; } diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index aefcb7236..5b3adb49e 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -1309,7 +1309,7 @@ Animation *SkeletonBinary::readAnimation(DataInput &input, const String &name, S float time = input.readFloat(); int modeAndIndex = input.readInt(); float delay = input.readFloat(); - timeline->setFrame(frame, time, (spine::SequenceMode)(modeAndIndex & 0xf), modeAndIndex >> 4, delay); + timeline->setFrame(frame, time, (SequenceMode)(modeAndIndex & 0xf), modeAndIndex >> 4, delay); } timelines.add(timeline); break; diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp index 78a1774c1..4bcad8cd4 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp @@ -68,7 +68,7 @@ void SkeletonBounds::update(Skeleton &skeleton, bool updateAabb) { BoundingBoxAttachment *boundingBox = static_cast(attachment); _boundingBoxes.add(boundingBox); - spine::Polygon *polygonP = _polygonPool.obtain(); + Polygon *polygonP = _polygonPool.obtain(); _polygons.add(polygonP); Polygon &polygon = *polygonP; @@ -122,7 +122,7 @@ bool SkeletonBounds::aabbIntersectsSkeleton(SkeletonBounds &bounds) { return _minX < bounds._maxX && _maxX > bounds._minX && _minY < bounds._maxY && _maxY > bounds._minY; } -bool SkeletonBounds::containsPoint(spine::Polygon *polygon, float x, float y) { +bool SkeletonBounds::containsPoint(Polygon *polygon, float x, float y) { Array &vertices = polygon->_vertices; int nn = polygon->_count; @@ -154,7 +154,7 @@ BoundingBoxAttachment *SkeletonBounds::intersectsSegment(float x1, float y1, flo return NULL; } -bool SkeletonBounds::intersectsSegment(spine::Polygon *polygon, float x1, float y1, float x2, float y2) { +bool SkeletonBounds::intersectsSegment(Polygon *polygon, float x1, float y1, float x2, float y2) { Array &vertices = polygon->_vertices; size_t nn = polygon->_count; @@ -180,7 +180,7 @@ bool SkeletonBounds::intersectsSegment(spine::Polygon *polygon, float x1, float return false; } -spine::Polygon *SkeletonBounds::getPolygon(BoundingBoxAttachment *attachment) { +Polygon *SkeletonBounds::getPolygon(BoundingBoxAttachment *attachment) { int index = _boundingBoxes.indexOf(attachment); return index == -1 ? NULL : _polygons[index]; } @@ -190,7 +190,7 @@ BoundingBoxAttachment *SkeletonBounds::getBoundingBox(Polygon *polygon) { return index == -1 ? NULL : _boundingBoxes[index]; } -Array &SkeletonBounds::getPolygons() { +Array &SkeletonBounds::getPolygons() { return _polygons; } @@ -229,7 +229,7 @@ void SkeletonBounds::aabbCompute() { float maxY = FLT_MIN; for (size_t i = 0, n = _polygons.size(); i < n; ++i) { - spine::Polygon *polygon = _polygons[i]; + Polygon *polygon = _polygons[i]; Array &vertices = polygon->_vertices; for (int ii = 0, nn = polygon->_count; ii < nn; ii += 2) { float x = vertices[ii]; diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp index b1d03a304..9e778b883 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp @@ -90,7 +90,7 @@ Skin *SkeletonData::findSkin(const String &skinName) { return ArrayUtils::findWithName(_skins, skinName); } -spine::EventData *SkeletonData::findEvent(const String &eventDataName) { +EventData *SkeletonData::findEvent(const String &eventDataName) { return ArrayUtils::findWithName(_events, eventDataName); } @@ -142,7 +142,7 @@ void SkeletonData::setDefaultSkin(Skin *inValue) { _defaultSkin = inValue; } -Array &SkeletonData::getEvents() { +Array &SkeletonData::getEvents() { return _events; }