From a627b4372d5c2091fcfb2b13dde0516b2a4e8ec1 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 12 Apr 2018 10:23:41 +0200 Subject: [PATCH] Updated export script for spine-sfml-c/cpp --- examples/export/runtimes.sh | 109 +++++++++++++------ spine-c/spine-c/src/spine/SkeletonBinary.c | 4 +- spine-ts/webgl/example/assets/spineboy.atlas | 2 +- 3 files changed, 78 insertions(+), 37 deletions(-) diff --git a/examples/export/runtimes.sh b/examples/export/runtimes.sh index 35f15ffbf..8a04b1393 100755 --- a/examples/export/runtimes.sh +++ b/examples/export/runtimes.sh @@ -20,7 +20,6 @@ cp -r ../spineboy/export/*.skel ../../spine-libgdx/spine-libgdx-tests/assets/spi cp -r ../spineboy/export/*-pma.* ../../spine-libgdx/spine-libgdx-tests/assets/spineboy/ rm -rf ../../spine-libgdx/spine-libgdx-tests/assets/coin/* -mkdir ../../spine-libgdx/spine-libgdx-tests/assets/coin/ cp -f ../coin/export/*.json ../../spine-libgdx/spine-libgdx-tests/assets/coin/ cp -f ../coin/export/*.skel ../../spine-libgdx/spine-libgdx-tests/assets/coin/ cp -f ../coin/export/*-pma.* ../../spine-libgdx/spine-libgdx-tests/assets/coin/ @@ -141,47 +140,89 @@ cp -f ../stretchyman/export/stretchyman-pro.json ../../spine-love/data cp -f ../stretchyman/export/stretchyman.atlas ../../spine-love/data cp -f ../stretchyman/export/stretchyman.png ../../spine-love/data -echo "spine-sfml" +echo "spine-sfml-c" rm -f ../../spine-sfml/data/* -cp -f ../coin/export/coin-pro.json ../../spine-sfml/data/ -cp -f ../coin/export/coin-pro.skel ../../spine-sfml/data/ -cp -f ../coin/export/coin.atlas ../../spine-sfml/data/ -cp -f ../coin/export/coin.png ../../spine-sfml/data/ +cp -f ../coin/export/coin-pro.json ../../spine-sfml/c/data/ +cp -f ../coin/export/coin-pro.skel ../../spine-sfml/c/data/ +cp -f ../coin/export/coin.atlas ../../spine-sfml/c/data/ +cp -f ../coin/export/coin.png ../../spine-sfml/c/data/ -cp -f ../goblins/export/goblins-pro.json ../../spine-sfml/data/ -cp -f ../goblins/export/goblins-pro.skel ../../spine-sfml/data/ -cp -f ../goblins/export/goblins.atlas ../../spine-sfml/data/ -cp -f ../goblins/export/goblins.png ../../spine-sfml/data/ +cp -f ../goblins/export/goblins-pro.json ../../spine-sfml/c/data/ +cp -f ../goblins/export/goblins-pro.skel ../../spine-sfml/c/data/ +cp -f ../goblins/export/goblins.atlas ../../spine-sfml/c/data/ +cp -f ../goblins/export/goblins.png ../../spine-sfml/c/data/ -cp -f ../raptor/export/raptor-pro.json ../../spine-sfml/data/ -cp -f ../raptor/export/raptor-pro.skel ../../spine-sfml/data/ -cp -f ../raptor/export/raptor.atlas ../../spine-sfml/data/ -cp -f ../raptor/export/raptor.png ../../spine-sfml/data/ +cp -f ../raptor/export/raptor-pro.json ../../spine-sfml/c/data/ +cp -f ../raptor/export/raptor-pro.skel ../../spine-sfml/c/data/ +cp -f ../raptor/export/raptor.atlas ../../spine-sfml/c/data/ +cp -f ../raptor/export/raptor.png ../../spine-sfml/c/data/ -cp -f ../spineboy/export/spineboy-ess.json ../../spine-sfml/data/ -cp -f ../spineboy/export/spineboy-ess.skel ../../spine-sfml/data/ -cp -f ../spineboy/export/spineboy.atlas ../../spine-sfml/data/ -cp -f ../spineboy/export/spineboy.png ../../spine-sfml/data/ +cp -f ../spineboy/export/spineboy-ess.json ../../spine-sfml/c/data/ +cp -f ../spineboy/export/spineboy-ess.skel ../../spine-sfml/c/data/ +cp -f ../spineboy/export/spineboy.atlas ../../spine-sfml/c/data/ +cp -f ../spineboy/export/spineboy.png ../../spine-sfml/c/data/ -cp -f ../tank/export/tank-pro.json ../../spine-sfml/data/ -cp -f ../tank/export/tank-pro.skel ../../spine-sfml/data/ -cp -f ../tank/export/tank.atlas ../../spine-sfml/data/ -cp -f ../tank/export/tank.png ../../spine-sfml/data/ +cp -f ../tank/export/tank-pro.json ../../spine-sfml/c/data/ +cp -f ../tank/export/tank-pro.skel ../../spine-sfml/c/data/ +cp -f ../tank/export/tank.atlas ../../spine-sfml/c/data/ +cp -f ../tank/export/tank.png ../../spine-sfml/c/data/ -cp -f ../vine/export/vine-pro.json ../../spine-sfml/data/ -cp -f ../vine/export/vine-pro.skel ../../spine-sfml/data/ -cp -f ../vine/export/vine.atlas ../../spine-sfml/data/ -cp -f ../vine/export/vine.png ../../spine-sfml/data/ +cp -f ../vine/export/vine-pro.json ../../spine-sfml/c/data/ +cp -f ../vine/export/vine-pro.skel ../../spine-sfml/c/data/ +cp -f ../vine/export/vine.atlas ../../spine-sfml/c/data/ +cp -f ../vine/export/vine.png ../../spine-sfml/c/data/ -cp -f ../stretchyman/export/stretchyman-pro.json ../../spine-sfml/data/ -cp -f ../stretchyman/export/stretchyman-pro.skel ../../spine-sfml/data/ -cp -f ../stretchyman/export/stretchyman.atlas ../../spine-sfml/data/ -cp -f ../stretchyman/export/stretchyman.png ../../spine-sfml/data/ +cp -f ../stretchyman/export/stretchyman-pro.json ../../spine-sfml/c/data/ +cp -f ../stretchyman/export/stretchyman-pro.skel ../../spine-sfml/c/data/ +cp -f ../stretchyman/export/stretchyman.atlas ../../spine-sfml/c/data/ +cp -f ../stretchyman/export/stretchyman.png ../../spine-sfml/c/data/ -cp -f ../owl/export/owl-pro.json ../../spine-sfml/data/ -cp -f ../owl/export/owl-pro.skel ../../spine-sfml/data/ -cp -f ../owl/export/owl.atlas ../../spine-sfml/data/ -cp -f ../owl/export/owl.png ../../spine-sfml/data/ +cp -f ../owl/export/owl-pro.json ../../spine-sfml/c/data/ +cp -f ../owl/export/owl-pro.skel ../../spine-sfml/c/data/ +cp -f ../owl/export/owl.atlas ../../spine-sfml/c/data/ +cp -f ../owl/export/owl.png ../../spine-sfml/c/data/ + +echo "spine-sfml-cpp" +rm -f ../../spine-sfml/cpp/data/* +cp -f ../coin/export/coin-pro.json ../../spine-sfml/cpp/data/ +cp -f ../coin/export/coin-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../coin/export/coin.atlas ../../spine-sfml/cpp/data/ +cp -f ../coin/export/coin.png ../../spine-sfml/cpp/data/ + +cp -f ../goblins/export/goblins-pro.json ../../spine-sfml/cpp/data/ +cp -f ../goblins/export/goblins-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../goblins/export/goblins.atlas ../../spine-sfml/cpp/data/ +cp -f ../goblins/export/goblins.png ../../spine-sfml/cpp/data/ + +cp -f ../raptor/export/raptor-pro.json ../../spine-sfml/cpp/data/ +cp -f ../raptor/export/raptor-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../raptor/export/raptor.atlas ../../spine-sfml/cpp/data/ +cp -f ../raptor/export/raptor.png ../../spine-sfml/cpp/data/ + +cp -f ../spineboy/export/spineboy-ess.json ../../spine-sfml/cpp/data/ +cp -f ../spineboy/export/spineboy-ess.skel ../../spine-sfml/cpp/data/ +cp -f ../spineboy/export/spineboy.atlas ../../spine-sfml/cpp/data/ +cp -f ../spineboy/export/spineboy.png ../../spine-sfml/cpp/data/ + +cp -f ../tank/export/tank-pro.json ../../spine-sfml/cpp/data/ +cp -f ../tank/export/tank-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../tank/export/tank.atlas ../../spine-sfml/cpp/data/ +cp -f ../tank/export/tank.png ../../spine-sfml/cpp/data/ + +cp -f ../vine/export/vine-pro.json ../../spine-sfml/cpp/data/ +cp -f ../vine/export/vine-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../vine/export/vine.atlas ../../spine-sfml/cpp/data/ +cp -f ../vine/export/vine.png ../../spine-sfml/cpp/data/ + +cp -f ../stretchyman/export/stretchyman-pro.json ../../spine-sfml/cpp/data/ +cp -f ../stretchyman/export/stretchyman-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../stretchyman/export/stretchyman.atlas ../../spine-sfml/cpp/data/ +cp -f ../stretchyman/export/stretchyman.png ../../spine-sfml/cpp/data/ + +cp -f ../owl/export/owl-pro.json ../../spine-sfml/cpp/data/ +cp -f ../owl/export/owl-pro.skel ../../spine-sfml/cpp/data/ +cp -f ../owl/export/owl.atlas ../../spine-sfml/cpp/data/ +cp -f ../owl/export/owl.png ../../spine-sfml/cpp/data/ echo "spine-starling" # DO NOT DELETE EVERYTHING IN SOURCE, ESPECIALLY goblins-mesh-starling.png/.xml diff --git a/spine-c/spine-c/src/spine/SkeletonBinary.c b/spine-c/spine-c/src/spine/SkeletonBinary.c index 373c3cbad..0893650c9 100644 --- a/spine-c/spine-c/src/spine/SkeletonBinary.c +++ b/spine-c/spine-c/src/spine/SkeletonBinary.c @@ -925,11 +925,11 @@ spSkeletonData* spSkeletonBinary_readSkeletonData (spSkeletonBinary* self, const /* TODO Avoid copying of slotName */ spSlotData* slotData = spSlotData_create(i, slotName, boneData); FREE(slotName); - readColor(input, &slotData->color.r, &slotData->color.g, &slotData->color.b, &slotData->color.a); + readColor(input, &slotData->color.r, &slotData->color.g, &slotData->color.b, &slotData->color.a); + a = readByte(input); r = readByte(input); g = readByte(input); b = readByte(input); - a = readByte(input); if (!(r == 0xff && g == 0xff && b == 0xff && a == 0xff)) { slotData->darkColor = spColor_create(); spColor_setFromFloats(slotData->darkColor, r / 255.0f, g / 255.0f, b / 255.0f, 1); diff --git a/spine-ts/webgl/example/assets/spineboy.atlas b/spine-ts/webgl/example/assets/spineboy.atlas index dcaa7682e..a97d6930f 100644 --- a/spine-ts/webgl/example/assets/spineboy.atlas +++ b/spine-ts/webgl/example/assets/spineboy.atlas @@ -1,5 +1,5 @@ -spineboy-pma.png +spineboy.png size: 1024,512 format: RGBA8888 filter: Linear,Linear