Kaynağa Gözat

[cpp] Fix rendererObject assignment in sequence loading code

Mario Zechner 1 yıl önce
ebeveyn
işleme
e9aab1c94e

+ 0 - 1
spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp

@@ -50,7 +50,6 @@ namespace spine {
 			String path = sequence->getPath(basePath, i);
 			regions[i] = atlas->findRegion(path);
 			if (!regions[i]) return false;
-			regions[i]->rendererObject = regions[i];
 		}
 		return true;
 	}

+ 0 - 1
spine-sfml/cpp/example/main.cpp

@@ -787,7 +787,6 @@ int main() {
 	testcase(spineboy, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.62f);
 	testcase(ikDemo, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.6f);
 	testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine-pma.atlas", 0.5f);
-	testcase(dragon, "data/dragon-ess.json", "data/dragon-ess.skel", "data/dragon-pma.atlas", 0.6f);
 	testcase(owl, "data/owl-pro.json", "data/owl-pro.skel", "data/owl-pma.atlas", 0.5f);
 	testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin-pma.atlas", 0.5f);
 	testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor-pma.atlas", 0.5f);

+ 2 - 2
spine-sfml/cpp/src/spine/spine-sfml.cpp

@@ -90,13 +90,13 @@ void SkeletonDrawable::draw(RenderTarget &target, RenderStates states) const {
     if (!skeletonRenderer) skeletonRenderer = new (__FILE__, __LINE__) SkeletonRenderer();
     RenderCommand *command = skeletonRenderer->render(*skeleton);
     while (command) {
-        Texture *texture = (Texture *)command->texture;
-        Vector2u size = texture->getSize();
         Vertex vertex;
         float *positions = command->positions;
         float *uvs = command->uvs;
         uint32_t *colors = command->colors;
         uint16_t *indices = command->indices;
+        Texture *texture = (Texture *)command->texture;
+        Vector2u size = texture->getSize();
         for (int i = 0, n = command->numIndices; i < n; ++i) {
             int ii = indices[i];
             int index = ii << 1;