From 92e44f1c783dafc133ff0011ba46575809ff042f Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 17 Apr 2012 16:14:32 +0800 Subject: [PATCH] Updated ios project configuration. --- .../CCControlExtension/CCControlSlider.cpp | 18 +++++++++--------- .../CCControlExtension/CCControlUtils.cpp | 8 ++++---- .../project.pbxproj.REMOVED.git-id | 2 +- .../CCControlButtonTest.cpp | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cocos2dx/extensions/CCControlExtension/CCControlSlider.cpp b/cocos2dx/extensions/CCControlExtension/CCControlSlider.cpp index 9aa6370eb8..e47ae4a8e6 100644 --- a/cocos2dx/extensions/CCControlExtension/CCControlSlider.cpp +++ b/cocos2dx/extensions/CCControlExtension/CCControlSlider.cpp @@ -111,8 +111,8 @@ CCControlSlider* CCControlSlider::sliderWithSprites(CCSprite * backgroundSprite, void CCControlSlider::setValue(float value) { //clamp between the two bounds - value=max(value, m_minimumValue); - value=min(value, m_maximumValue); + value=MAX(value, m_minimumValue); + value=MIN(value, m_maximumValue); //if we're snapping if (m_snappingInterval>=0) @@ -180,16 +180,16 @@ CCControlSlider* CCControlSlider::sliderWithSprites(CCSprite * backgroundSprite, return true; } -void CCControlSlider::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) -{ +void CCControlSlider::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) +{ CCPoint location = getTouchLocationInControl(pTouch); - sliderMoved(location); -} + sliderMoved(location); +} -void CCControlSlider::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) -{ +void CCControlSlider::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) +{ CCPoint location = getTouchLocationInControl(pTouch); - sliderEnded(CCPointZero); + sliderEnded(CCPointZero); } void CCControlSlider::sliderBegan(CCPoint location) diff --git a/cocos2dx/extensions/CCControlExtension/CCControlUtils.cpp b/cocos2dx/extensions/CCControlExtension/CCControlUtils.cpp index c6b352dedb..691d246f15 100644 --- a/cocos2dx/extensions/CCControlExtension/CCControlUtils.cpp +++ b/cocos2dx/extensions/CCControlExtension/CCControlUtils.cpp @@ -135,11 +135,11 @@ CCRect CCControlUtils::CCRectUnion(const CCRect& src1, const CCRect& src2) { CCRect result; - float x1 = min(CCRect::CCRectGetMinX(src1), CCRect::CCRectGetMinX(src2)); - float y1 = min(CCRect::CCRectGetMinY(src1), CCRect::CCRectGetMinY(src2)); + float x1 = MIN(CCRect::CCRectGetMinX(src1), CCRect::CCRectGetMinX(src2)); + float y1 = MIN(CCRect::CCRectGetMinY(src1), CCRect::CCRectGetMinY(src2)); - float x2 = max(CCRect::CCRectGetMaxX(src1), CCRect::CCRectGetMaxX(src2)); - float y2 = max(CCRect::CCRectGetMaxY(src1), CCRect::CCRectGetMaxY(src2)); + float x2 = MAX(CCRect::CCRectGetMaxX(src1), CCRect::CCRectGetMaxX(src2)); + float y2 = MAX(CCRect::CCRectGetMaxY(src1), CCRect::CCRectGetMaxY(src2)); result.origin=ccp(x1,x2); result.size=CCSizeMake(x2-x1, y2-y1); diff --git a/tests/test.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id b/tests/test.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id index 61c40a8718..c85eacec1d 100644 --- a/tests/test.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/tests/test.ios/test.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -b9cda1260ba870cf512eba65876376a4b0f6c7df \ No newline at end of file +bcd7cf5cfb02c02d077222016fec6b77a05ad107 \ No newline at end of file diff --git a/tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp b/tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp index deff363c3d..8081dfca46 100644 --- a/tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp +++ b/tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp @@ -23,7 +23,7 @@ * */ -#include "ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.h" +#include "CCControlButtonTest.h" bool CCControlButtonTest_HelloVariableSize::init() {