From 3493de7fe82d3ce550d519d2d52c0236d78064ca Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 28 Oct 2022 10:40:38 +0200 Subject: [PATCH] Formatting --- spine-c/spine-c/src/spine/Animation.c | 2 +- .../spine-cpp/src/spine/SkeletonBinary.cpp | 2 +- spine-godot/spine_godot/SpineSkeleton.h | 2 +- spine-sfml/cpp/example/test.cpp | 56 +++++++++---------- .../Public/SpineSkeletonComponent.h | 5 +- 5 files changed, 35 insertions(+), 32 deletions(-) diff --git a/spine-c/spine-c/src/spine/Animation.c b/spine-c/spine-c/src/spine/Animation.c index 55dd1ddab..dfbf8de93 100644 --- a/spine-c/spine-c/src/spine/Animation.c +++ b/spine-c/spine-c/src/spine/Animation.c @@ -2016,7 +2016,7 @@ void _spSequenceTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float slotAttachment = slot->attachment; if (slotAttachment != self->attachment) { - if (slotAttachment == NULL) return; + if (slotAttachment == NULL) return; switch (slotAttachment->type) { case SP_ATTACHMENT_BOUNDING_BOX: case SP_ATTACHMENT_CLIPPING: diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index c3bdec691..e931e786e 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -174,7 +174,7 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons SlotData *slotData = new (__FILE__, __LINE__) SlotData(i, String(slotName, true), *boneData); readColor(input, slotData->getColor()); - unsigned char a = readByte(input); + unsigned char a = readByte(input); unsigned char r = readByte(input); unsigned char g = readByte(input); unsigned char b = readByte(input); diff --git a/spine-godot/spine_godot/SpineSkeleton.h b/spine-godot/spine_godot/SpineSkeleton.h index f4b7259ee..b8677d108 100644 --- a/spine-godot/spine_godot/SpineSkeleton.h +++ b/spine-godot/spine_godot/SpineSkeleton.h @@ -64,7 +64,7 @@ private: spine::Skeleton *skeleton; SpineSprite *sprite; spine::Vector bounds_vertex_buffer; - Ref last_skin; + Ref last_skin; public: SpineSkeleton(); diff --git a/spine-sfml/cpp/example/test.cpp b/spine-sfml/cpp/example/test.cpp index e228d7159..e54d07e02 100644 --- a/spine-sfml/cpp/example/test.cpp +++ b/spine-sfml/cpp/example/test.cpp @@ -38,41 +38,41 @@ using namespace spine; DebugExtension dbgExtension(SpineExtension::getInstance()); void test() { - SFMLTextureLoader textureLoader; - Atlas atlas("data/bomb.atlas", &textureLoader); - SkeletonBinary loader(&atlas); - SkeletonData *skeletonData = loader.readSkeletonDataFile("data/bomb.skel"); + SFMLTextureLoader textureLoader; + Atlas atlas("data/bomb.atlas", &textureLoader); + SkeletonBinary loader(&atlas); + SkeletonData *skeletonData = loader.readSkeletonDataFile("data/bomb.skel"); - SkeletonDrawable drawable(skeletonData); - drawable.setUsePremultipliedAlpha(true); - drawable.skeleton->setPosition(320, 590); - drawable.state->setAnimation(0, "expl", false); - drawable.skeleton->setSkin("mdl"); + SkeletonDrawable drawable(skeletonData); + drawable.setUsePremultipliedAlpha(true); + drawable.skeleton->setPosition(320, 590); + drawable.state->setAnimation(0, "expl", false); + drawable.skeleton->setSkin("mdl"); - sf::RenderWindow window(sf::VideoMode(640, 640), "Spine SFML - Test"); - window.setFramerateLimit(60); - sf::Event event; - sf::Clock deltaClock; - while (window.isOpen()) { - while (window.pollEvent(event)) - if (event.type == sf::Event::Closed) window.close(); + sf::RenderWindow window(sf::VideoMode(640, 640), "Spine SFML - Test"); + window.setFramerateLimit(60); + sf::Event event; + sf::Clock deltaClock; + while (window.isOpen()) { + while (window.pollEvent(event)) + if (event.type == sf::Event::Closed) window.close(); - float delta = deltaClock.getElapsedTime().asSeconds(); - deltaClock.restart(); + float delta = deltaClock.getElapsedTime().asSeconds(); + deltaClock.restart(); - drawable.update(delta); + drawable.update(delta); - window.clear(); - window.draw(drawable); - window.display(); - } + window.clear(); + window.draw(drawable); + window.display(); + } - delete skeletonData; + delete skeletonData; } int main() { - SpineExtension::setInstance(&dbgExtension); - test(); - dbgExtension.reportLeaks(); - return 0; + SpineExtension::setInstance(&dbgExtension); + test(); + dbgExtension.reportLeaks(); + return 0; } \ No newline at end of file diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h index de1294157..e6e92daaf 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h @@ -53,7 +53,10 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Spine) USpineSkeletonDataAsset *SkeletonData; - spine::Skeleton *GetSkeleton() { CheckState(); return skeleton; }; + spine::Skeleton *GetSkeleton() { + CheckState(); + return skeleton; + }; UFUNCTION(BlueprintPure, Category = "Components|Spine|Skeleton") void GetSkins(TArray &Skins);