From 142b189305b8b5dd95ada0cb39fd1585b7ec0e46 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 25 Dec 2013 16:06:39 +0800 Subject: [PATCH] Some warning fixes. --- cocos/2d/CCActionInterval.cpp | 6 +++--- cocos/editor-support/spine/CCSkeleton.cpp | 2 +- cocos/editor-support/spine/SkeletonJson.cpp | 2 +- cocos/editor-support/spine/extension.cpp | 2 +- cocos/editor-support/spine/spine-cocos2dx.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index d35beacd81..7d4a1e0bbb 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -2053,7 +2053,7 @@ void Animate::startWithTarget(Node *target) if (_animation->getRestoreOriginalFrame()) { - _origFrame = sprite->getDisplayFrame(); + _origFrame = sprite->getSpriteFrame(); _origFrame->retain(); } _nextFrame = 0; @@ -2064,7 +2064,7 @@ void Animate::stop(void) { if (_animation->getRestoreOriginalFrame() && _target) { - static_cast(_target)->setDisplayFrame(_origFrame); + static_cast(_target)->setSpriteFrame(_origFrame); } ActionInterval::stop(); @@ -2097,7 +2097,7 @@ void Animate::update(float t) if( splitTime <= t ) { AnimationFrame* frame = frames.at(i); frameToDisplay = frame->getSpriteFrame(); - static_cast(_target)->setDisplayFrame(frameToDisplay); + static_cast(_target)->setSpriteFrame(frameToDisplay); const ValueMap& dict = frame->getUserInfo(); if ( !dict.empty() ) diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp index 70c342c53d..77e2243b7d 100644 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ b/cocos/editor-support/spine/CCSkeleton.cpp @@ -168,7 +168,7 @@ void Skeleton::draw () { textureAtlas = regionTextureAtlas; setFittedBlendingFunc(textureAtlas); - int quadCount = textureAtlas->getTotalQuads(); + ssize_t quadCount = textureAtlas->getTotalQuads(); if (textureAtlas->getCapacity() == quadCount) { textureAtlas->drawQuads(); textureAtlas->removeAllQuads(); diff --git a/cocos/editor-support/spine/SkeletonJson.cpp b/cocos/editor-support/spine/SkeletonJson.cpp index 81bbe9e617..352c492f91 100644 --- a/cocos/editor-support/spine/SkeletonJson.cpp +++ b/cocos/editor-support/spine/SkeletonJson.cpp @@ -65,7 +65,7 @@ void spSkeletonJson_dispose (spSkeletonJson* self) { void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* value1, const char* value2) { char message[256]; - int length; + size_t length = 0; FREE(self->error); strcpy(message, value1); length = strlen(value1); diff --git a/cocos/editor-support/spine/extension.cpp b/cocos/editor-support/spine/extension.cpp index 4c520e06fa..2a5ca375e1 100644 --- a/cocos/editor-support/spine/extension.cpp +++ b/cocos/editor-support/spine/extension.cpp @@ -62,7 +62,7 @@ char* _readFile (const char* path, int* length) { if (!file) return 0; fseek(file, 0, SEEK_END); - *length = ftell(file); + *length = (int)ftell(file); fseek(file, 0, SEEK_SET); data = MALLOC(char, *length); diff --git a/cocos/editor-support/spine/spine-cocos2dx.h b/cocos/editor-support/spine/spine-cocos2dx.h index c4e01fe5bb..f0b597be4b 100644 --- a/cocos/editor-support/spine/spine-cocos2dx.h +++ b/cocos/editor-support/spine/spine-cocos2dx.h @@ -39,6 +39,6 @@ #include #include -void spRegionAttachment_updateQuad (spRegionAttachment* self, spSlot* slot, cocos2d::ccV3F_C4B_T2F_Quad* quad, bool premultiplied = false); +void spRegionAttachment_updateQuad (spRegionAttachment* self, spSlot* slot, cocos2d::V3F_C4B_T2F_Quad* quad, bool premultiplied = false); #endif /* SPINE_COCOS2DX_H_ */