From 93597a5858d5e5e3bfcf63c67438f9c06fa9e614 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 6 Jun 2013 14:22:51 +0800 Subject: [PATCH] [Spine] Using getContentSize to make spine-runtime supports the strategy of loading resources in cocos2d-x. --- extensions/spine/spine-cocos2dx.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/spine/spine-cocos2dx.cpp b/extensions/spine/spine-cocos2dx.cpp index bcb2394116..bfbc93d99d 100644 --- a/extensions/spine/spine-cocos2dx.cpp +++ b/extensions/spine/spine-cocos2dx.cpp @@ -35,8 +35,11 @@ void _AtlasPage_createTexture (AtlasPage* self, const char* path) { CCTextureAtlas* textureAtlas = CCTextureAtlas::createWithTexture(texture, 4); textureAtlas->retain(); self->rendererObject = textureAtlas; - self->width = texture->getPixelsWide(); - self->height = texture->getPixelsHigh(); + // Using getContentSize to make it supports the strategy of loading resources in cocos2d-x. + // self->width = texture->getPixelsWide(); + // self->height = texture->getPixelsHigh(); + self->width = texture->getContentSize().width; + self->height = texture->getContentSize().height; } void _AtlasPage_disposeTexture (AtlasPage* self) {