This commit is contained in:
natural-law 2011-07-12 17:47:24 +08:00
commit d4e575c4b2
2 changed files with 8 additions and 6 deletions
cocos2dx/cocoa
tests/tests/TransitionsTest

View File

@ -39,7 +39,7 @@ namespace cocos2d
@return A Core Graphics structure that represents a rectangle.
If the string is not well-formed, the function returns CCRectZero.
*/
CCRect CCRectFromString(const char* pszContent);
CCRect CC_DLL CCRectFromString(const char* pszContent);
/**
@brief Returns a Core Graphics point structure corresponding to the data in a given string.
@ -51,7 +51,7 @@ namespace cocos2d
@return A Core Graphics structure that represents a point.
If the string is not well-formed, the function returns CCPointZero.
*/
CCPoint CCPointFromString(const char* pszContent);
CCPoint CC_DLL CCPointFromString(const char* pszContent);
/**
@brief Returns a Core Graphics size structure corresponding to the data in a given string.
@ -63,7 +63,7 @@ namespace cocos2d
@return A Core Graphics structure that represents a size.
If the string is not well-formed, the function returns CCSizeZero.
*/
CCSize CCSizeFromString(const char* pszContent);
CCSize CC_DLL CCSizeFromString(const char* pszContent);
}
#endif // __PLATFOMR_CCNS_H__

View File

@ -127,6 +127,7 @@ class PageTransitionForward : public CCTransitionPageTurn
public:
static CCTransitionScene* transitionWithDuration(ccTime t, CCScene* s)
{
CCDirector::sharedDirector()->setDepthTest(true);
return CCTransitionPageTurn::transitionWithDuration(t, s, false);
}
};
@ -136,6 +137,7 @@ class PageTransitionBackward : public CCTransitionPageTurn
public:
static CCTransitionScene* transitionWithDuration(ccTime t, CCScene* s)
{
CCDirector::sharedDirector()->setDepthTest(true);
return CCTransitionPageTurn::transitionWithDuration(t, s, true);
}
};
@ -186,6 +188,9 @@ static int s_nSceneIdx = 0;
CCTransitionScene* createTransition(int nIndex, ccTime t, CCScene* s)
{
// fix bug #486, without setDepthTest(false), FlipX,Y will flickers
CCDirector::sharedDirector()->setDepthTest(false);
switch(nIndex)
{
case 0: return CCTransitionJumpZoom::transitionWithDuration(t, s);
@ -274,9 +279,6 @@ void TransitionsTestScene::runThisTest()
addChild(pLayer);
pLayer->release();
// fix bug #486, without setDepthTest(false), FlipX,Y will flickers
CCDirector::sharedDirector()->setDepthTest(false);
CCDirector::sharedDirector()->replaceScene(this);
}