mirror of https://github.com/axmolengine/axmol.git
More warning fixes.
This commit is contained in:
parent
118fe45cce
commit
46153d8c34
|
@ -134,7 +134,7 @@ void PointArray::insertControlPoint(Point &controlPoint, ssize_t index)
|
||||||
|
|
||||||
Point PointArray::getControlPointAtIndex(ssize_t index)
|
Point PointArray::getControlPointAtIndex(ssize_t index)
|
||||||
{
|
{
|
||||||
index = static_cast<int>(MIN(_controlPoints->size()-1, MAX(index, 0)));
|
index = MIN(_controlPoints->size()-1, MAX(index, 0));
|
||||||
return *(_controlPoints->at(index));
|
return *(_controlPoints->at(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -501,7 +501,7 @@ void CCBAnimationManager::setAnimatedProperty(const std::string& propName, Node
|
||||||
}
|
}
|
||||||
else if (propName == "displayFrame")
|
else if (propName == "displayFrame")
|
||||||
{
|
{
|
||||||
static_cast<Sprite*>(pNode)->setDisplayFrame(static_cast<SpriteFrame*>(obj));
|
static_cast<Sprite*>(pNode)->setSpriteFrame(static_cast<SpriteFrame*>(obj));
|
||||||
}
|
}
|
||||||
else if (propName == "color")
|
else if (propName == "color")
|
||||||
{
|
{
|
||||||
|
@ -1002,7 +1002,7 @@ CCBSetSpriteFrame* CCBSetSpriteFrame::reverse() const
|
||||||
|
|
||||||
void CCBSetSpriteFrame::update(float time)
|
void CCBSetSpriteFrame::update(float time)
|
||||||
{
|
{
|
||||||
((Sprite*)_target)->setDisplayFrame(_spriteFrame);
|
static_cast<Sprite*>(_target)->setSpriteFrame(_spriteFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace cocosbuilder {
|
||||||
void SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) {
|
void SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) {
|
||||||
if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) {
|
if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) {
|
||||||
if(pSpriteFrame != NULL) {
|
if(pSpriteFrame != NULL) {
|
||||||
((Sprite *)pNode)->setDisplayFrame(pSpriteFrame);
|
((Sprite *)pNode)->setSpriteFrame(pSpriteFrame);
|
||||||
} else {
|
} else {
|
||||||
CCLOG("ERROR: SpriteFrame NULL");
|
CCLOG("ERROR: SpriteFrame NULL");
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,19 +80,19 @@ public:
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesBegan(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesBegan(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesMoved(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesMoved(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -312,7 +312,7 @@ const Rect& Layout::getClippingRect()
|
||||||
{
|
{
|
||||||
_handleScissor = true;
|
_handleScissor = true;
|
||||||
Point worldPos = convertToWorldSpace(Point::ZERO);
|
Point worldPos = convertToWorldSpace(Point::ZERO);
|
||||||
AffineTransform t = nodeToWorldTransform();
|
AffineTransform t = getNodeToWorldAffineTransform();
|
||||||
float scissorWidth = _size.width*t.a;
|
float scissorWidth = _size.width*t.a;
|
||||||
float scissorHeight = _size.height*t.d;
|
float scissorHeight = _size.height*t.d;
|
||||||
Rect parentClippingRect;
|
Rect parentClippingRect;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
void addJoint(PhysicsJointInfo& joint);
|
void addJoint(PhysicsJointInfo& joint);
|
||||||
void removeJoint(PhysicsJointInfo& joint);
|
void removeJoint(PhysicsJointInfo& joint);
|
||||||
void setGravity(const Vect& gravity);
|
void setGravity(const Vect& gravity);
|
||||||
inline bool isLocked() { return static_cast<bool>(_space->locked_private); }
|
inline bool isLocked() { return 0 == _space->locked_private ? false : true; }
|
||||||
inline void step(float delta) { cpSpaceStep(_space, delta); }
|
inline void step(float delta) { cpSpaceStep(_space, delta); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue