mirror of https://github.com/axmolengine/axmol.git
Merge branch 'issue_418' of https://github.com/minggo/cocos2d-x into minggo-issue_418
This commit is contained in:
commit
adfad22b2e
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2010 Steve Oldmeadow
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,33 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef __CCCAMERA_ACTION_H__
|
|
||||||
#define __CCCAMERA_ACTION_H__
|
#ifndef __CCCAMERA_ACTION_H__
|
||||||
#include "CCActionInterval.h"
|
#define __CCCAMERA_ACTION_H__
|
||||||
|
#include "CCActionInterval.h"
|
||||||
namespace cocos2d {
|
|
||||||
|
namespace cocos2d {
|
||||||
class CCCamera;
|
class CCCamera;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -97,7 +98,7 @@ namespace cocos2d {
|
||||||
float m_fRadX;
|
float m_fRadX;
|
||||||
float m_fRadDeltaX;
|
float m_fRadDeltaX;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace cocos2d
|
} // namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCCAMERA_ACTION_H__
|
#endif //__CCCAMERA_ACTION_H__
|
|
@ -1,37 +1,38 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2009 Jason Booth
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef __ACTION_CCEASE_ACTION_H__
|
|
||||||
#define __ACTION_CCEASE_ACTION_H__
|
#ifndef __ACTION_CCEASE_ACTION_H__
|
||||||
|
#define __ACTION_CCEASE_ACTION_H__
|
||||||
#include "CCActionInterval.h"
|
|
||||||
|
#include "CCActionInterval.h"
|
||||||
namespace cocos2d {
|
|
||||||
|
namespace cocos2d {
|
||||||
class CCObject;
|
|
||||||
class CCZone;
|
class CCObject;
|
||||||
|
class CCZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Base class for Easing actions
|
@brief Base class for Easing actions
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +47,7 @@ public:
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
virtual void startWithTarget(CCNode *pTarget);
|
virtual void startWithTarget(CCNode *pTarget);
|
||||||
virtual void stop(void);
|
virtual void stop(void);
|
||||||
virtual void update(ccTime time);
|
virtual void update(ccTime time);
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -136,8 +137,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
|
static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -151,8 +152,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -166,8 +167,8 @@ public:
|
||||||
virtual void update(ccTime time);
|
virtual void update(ccTime time);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -182,8 +183,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
|
static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -197,8 +198,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -211,8 +212,8 @@ public:
|
||||||
virtual void update(ccTime time);
|
virtual void update(ccTime time);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -313,8 +314,8 @@ public:
|
||||||
ccTime bounceTime(ccTime time);
|
ccTime bounceTime(ccTime time);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -330,8 +331,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -347,8 +348,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -363,8 +364,8 @@ public:
|
||||||
virtual void update(ccTime time);
|
virtual void update(ccTime time);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -380,8 +381,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -397,8 +398,8 @@ public:
|
||||||
virtual CCActionInterval* reverse(void);
|
virtual CCActionInterval* reverse(void);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -413,8 +414,8 @@ public:
|
||||||
virtual void update(ccTime time);
|
virtual void update(ccTime time);
|
||||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
|
static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 On-Core
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 On-Core
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -249,15 +250,15 @@ namespace cocos2d {
|
||||||
void *m_pData;
|
void *m_pData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Calls a 'callback' with an object as the first argument.
|
@brief Calls a 'callback' with an object as the first argument.
|
||||||
O means Object.
|
O means Object.
|
||||||
@since v0.99.5
|
@since v0.99.5
|
||||||
*/
|
*/
|
||||||
class CC_DLL CCCallFuncO : public CCCallFunc
|
class CC_DLL CCCallFuncO : public CCCallFunc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCCallFuncO();
|
CCCallFuncO();
|
||||||
virtual ~CCCallFuncO();
|
virtual ~CCCallFuncO();
|
||||||
/** creates the action with the callback
|
/** creates the action with the callback
|
||||||
|
@ -269,14 +270,14 @@ namespace cocos2d {
|
||||||
|
|
||||||
typedef void (SelectorProtocol::*SEL_CallFuncO)(CCObject*);
|
typedef void (SelectorProtocol::*SEL_CallFuncO)(CCObject*);
|
||||||
*/
|
*/
|
||||||
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
|
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
|
||||||
// super methods
|
// super methods
|
||||||
virtual CCObject* copyWithZone(CCZone *pZone);
|
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||||
virtual void execute();
|
virtual void execute();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CCObject* m_pObject;
|
CCObject* m_pObject;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
Copyright (c) 2009 Valentin Milea
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (C) 2010 Lam Pham
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 On-Core
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __CCATLAS_NODE_H__
|
#ifndef __CCATLAS_NODE_H__
|
||||||
#define __CCATLAS_NODE_H__
|
#define __CCATLAS_NODE_H__
|
||||||
|
|
||||||
#include "CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
|
|
||||||
namespace cocos2d {
|
namespace cocos2d {
|
||||||
class CCTextureAtlas;
|
class CCTextureAtlas;
|
||||||
|
|
||||||
/** @brief CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and
|
/** @brief CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and
|
||||||
|
@ -84,13 +85,13 @@ public:
|
||||||
|
|
||||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||||
|
|
||||||
// CC Texture protocol
|
// CC Texture protocol
|
||||||
|
|
||||||
/** returns the used texture*/
|
/** returns the used texture*/
|
||||||
virtual CCTexture2D* getTexture(void);
|
virtual CCTexture2D* getTexture(void);
|
||||||
|
|
||||||
/** sets a new texture. it will be retained*/
|
/** sets a new texture. it will be retained*/
|
||||||
virtual void setTexture(CCTexture2D *texture);
|
virtual void setTexture(CCTexture2D *texture);
|
||||||
|
|
||||||
private :
|
private :
|
||||||
void calculateMaxItems();
|
void calculateMaxItems();
|
||||||
|
@ -98,7 +99,7 @@ private :
|
||||||
void updateOpacityModifyRGB();
|
void updateOpacityModifyRGB();
|
||||||
|
|
||||||
};
|
};
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif // __CCATLAS_NODE_H__
|
#endif // __CCATLAS_NODE_H__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,31 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCLABEL_ATLAS_H__
|
****************************************************************************/
|
||||||
#define __CCLABEL_ATLAS_H__
|
#ifndef __CCLABEL_ATLAS_H__
|
||||||
#include "CCAtlasNode.h"
|
#define __CCLABEL_ATLAS_H__
|
||||||
namespace cocos2d{
|
#include "CCAtlasNode.h"
|
||||||
|
namespace cocos2d{
|
||||||
|
|
||||||
/** @brief CCLabelAtlas is a subclass of CCAtlasNode.
|
/** @brief CCLabelAtlas is a subclass of CCAtlasNode.
|
||||||
|
|
||||||
|
@ -50,10 +51,10 @@ namespace cocos2d{
|
||||||
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
|
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
|
||||||
static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
||||||
|
|
||||||
|
|
||||||
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas.
|
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas.
|
||||||
@deprecated Will be removed in 1.0.1. Use "labelWithString:" instead
|
@deprecated Will be removed in 1.0.1. Use "labelWithString:" instead
|
||||||
*/
|
*/
|
||||||
static CCLabelAtlas * labelAtlasWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
static CCLabelAtlas * labelAtlasWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
||||||
|
|
||||||
/** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
|
/** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
|
||||||
|
@ -71,6 +72,6 @@ namespace cocos2d{
|
||||||
// the first char in the charmap
|
// the first char in the charmap
|
||||||
char m_cMapStartChar;
|
char m_cMapStartChar;
|
||||||
};
|
};
|
||||||
}// namespace cocos2d
|
}// namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCLABEL_ATLAS_H__
|
#endif //__CCLABEL_ATLAS_H__
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCBITMAP_FONT_ATLAS_H__
|
****************************************************************************/
|
||||||
#define __CCBITMAP_FONT_ATLAS_H__
|
#ifndef __CCBITMAP_FONT_ATLAS_H__
|
||||||
#include "CCSpriteBatchNode.h"
|
#define __CCBITMAP_FONT_ATLAS_H__
|
||||||
namespace cocos2d{
|
#include "CCSpriteBatchNode.h"
|
||||||
|
namespace cocos2d{
|
||||||
|
|
||||||
struct _KerningHashElement;
|
struct _KerningHashElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@struct ccBMFontDef
|
@struct ccBMFontDef
|
||||||
BMFont definition
|
BMFont definition
|
||||||
*/
|
*/
|
||||||
typedef struct _BMFontDef {
|
typedef struct _BMFontDef {
|
||||||
|
@ -45,7 +46,7 @@ namespace cocos2d{
|
||||||
int xAdvance;
|
int xAdvance;
|
||||||
} ccBMFontDef;
|
} ccBMFontDef;
|
||||||
|
|
||||||
/** @struct ccBMFontPadding
|
/** @struct ccBMFontPadding
|
||||||
BMFont padding
|
BMFont padding
|
||||||
@since v0.8.2
|
@since v0.8.2
|
||||||
*/
|
*/
|
||||||
|
@ -157,9 +158,9 @@ namespace cocos2d{
|
||||||
/** creates a bitmap font altas with an initial string and the FNT file */
|
/** creates a bitmap font altas with an initial string and the FNT file */
|
||||||
static CCLabelBMFont * labelWithString(const char *str, const char *fntFile);
|
static CCLabelBMFont * labelWithString(const char *str, const char *fntFile);
|
||||||
|
|
||||||
/** creates a BMFont label with an initial string and the FNT file
|
/** creates a BMFont label with an initial string and the FNT file
|
||||||
@deprecated Will be removed in 1.0.1. Use "labelWithString" instead.
|
@deprecated Will be removed in 1.0.1. Use "labelWithString" instead.
|
||||||
@since v0.99.5
|
@since v0.99.5
|
||||||
*/
|
*/
|
||||||
static CCLabelBMFont * bitmapFontAtlasWithString(const char *str, const char *fntFile);
|
static CCLabelBMFont * bitmapFontAtlasWithString(const char *str, const char *fntFile);
|
||||||
|
|
||||||
|
@ -189,14 +190,14 @@ namespace cocos2d{
|
||||||
/** Purges the FNT config cache
|
/** Purges the FNT config cache
|
||||||
*/
|
*/
|
||||||
void FNTConfigRemoveCache( void );
|
void FNTConfigRemoveCache( void );
|
||||||
|
|
||||||
/** CCBitmapFontAtlas
|
/** CCBitmapFontAtlas
|
||||||
@deprecated Use CCLabelBMFont instead. Will be removed 1.0.1
|
@deprecated Use CCLabelBMFont instead. Will be removed 1.0.1
|
||||||
*/
|
*/
|
||||||
class CCBitmapFontAtlas : public CCLabelBMFont
|
class CCBitmapFontAtlas : public CCLabelBMFont
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
}// namespace cocos2d
|
}// namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||||
|
|
|
@ -1,31 +1,32 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCLABEL_H__
|
****************************************************************************/
|
||||||
#define __CCLABEL_H__
|
#ifndef __CCLABEL_H__
|
||||||
#include "CCSprite.h"
|
#define __CCLABEL_H__
|
||||||
#include "CCTexture2D.h"
|
#include "CCSprite.h"
|
||||||
|
#include "CCTexture2D.h"
|
||||||
|
|
||||||
namespace cocos2d{
|
namespace cocos2d{
|
||||||
|
|
||||||
/** @brief CCLabelTTF is a subclass of CCTextureNode that knows how to render text labels
|
/** @brief CCLabelTTF is a subclass of CCTextureNode that knows how to render text labels
|
||||||
|
@ -63,7 +64,7 @@ namespace cocos2d{
|
||||||
float m_fFontSize;
|
float m_fFontSize;
|
||||||
std::string * m_pString;
|
std::string * m_pString;
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace cocos2d
|
} //namespace cocos2d
|
||||||
#endif //__CCLABEL_H__
|
#endif //__CCLABEL_H__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,43 +1,44 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCMENU_H_
|
****************************************************************************/
|
||||||
#define __CCMENU_H_
|
#ifndef __CCMENU_H_
|
||||||
|
#define __CCMENU_H_
|
||||||
#include "CCMenuItem.h"
|
|
||||||
#include "CCLayer.h"
|
#include "CCMenuItem.h"
|
||||||
|
#include "CCLayer.h"
|
||||||
namespace cocos2d{
|
|
||||||
|
namespace cocos2d{
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
kCCMenuStateWaiting,
|
kCCMenuStateWaiting,
|
||||||
kCCMenuStateTrackingTouch
|
kCCMenuStateTrackingTouch
|
||||||
} tCCMenuState;
|
} tCCMenuState;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
//* priority used by the menu
|
//* priority used by the menu
|
||||||
kCCMenuTouchPriority = -128,
|
kCCMenuTouchPriority = -128,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief A CCMenu
|
/** @brief A CCMenu
|
||||||
|
@ -127,6 +128,6 @@ namespace cocos2d{
|
||||||
GLubyte m_cOpacity;
|
GLubyte m_cOpacity;
|
||||||
ccColor3B m_tColor;
|
ccColor3B m_tColor;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif//__CCMENU_H_
|
#endif//__CCMENU_H_
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef __CCMENU_ITEM_H__
|
|
||||||
#define __CCMENU_ITEM_H__
|
#ifndef __CCMENU_ITEM_H__
|
||||||
|
#define __CCMENU_ITEM_H__
|
||||||
|
|
||||||
#include "CCNode.h"
|
#include "CCNode.h"
|
||||||
#include "CCProtocols.h"
|
#include "CCProtocols.h"
|
||||||
#include "selector_protocol.h"
|
#include "selector_protocol.h"
|
||||||
|
|
||||||
namespace cocos2d{
|
namespace cocos2d{
|
||||||
|
|
||||||
class CCLabelTTF;
|
class CCLabelTTF;
|
||||||
class CCLabelAtlas;
|
class CCLabelAtlas;
|
||||||
|
@ -262,7 +263,7 @@ namespace cocos2d{
|
||||||
|
|
||||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__CCMENU_ITEM_H__
|
#endif //__CCMENU_ITEM_H__
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008, 2009 Jason Booth
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCMOTION_STREAK_H__
|
****************************************************************************/
|
||||||
#define __CCMOTION_STREAK_H__
|
#ifndef __CCMOTION_STREAK_H__
|
||||||
|
#define __CCMOTION_STREAK_H__
|
||||||
#include "CCNode.h"
|
|
||||||
#include "CCProtocols.h"
|
#include "CCNode.h"
|
||||||
|
#include "CCProtocols.h"
|
||||||
namespace cocos2d {
|
|
||||||
|
namespace cocos2d {
|
||||||
class CCRibbon;
|
|
||||||
|
class CCRibbon;
|
||||||
/**
|
/**
|
||||||
* @brief CCMotionStreak manages a Ribbon based on it's motion in absolute space.
|
* @brief CCMotionStreak manages a Ribbon based on it's motion in absolute space.
|
||||||
* You construct it with a fadeTime, minimum segment size, texture path, texture
|
* You construct it with a fadeTime, minimum segment size, texture path, texture
|
||||||
|
@ -69,8 +70,8 @@ protected:
|
||||||
float m_fSegThreshold;
|
float m_fSegThreshold;
|
||||||
float m_fWidth;
|
float m_fWidth;
|
||||||
CCPoint m_tLastLocation;
|
CCPoint m_tLastLocation;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace cocos2d
|
} // namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCMOTION_STREAK_H__
|
#endif //__CCMOTION_STREAK_H__
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
Copyright (c) 2009 Valentin Milea
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -171,10 +173,10 @@ namespace cocos2d {
|
||||||
*/
|
*/
|
||||||
CC_PROPERTY(CCSize, m_tContentSize, ContentSize)
|
CC_PROPERTY(CCSize, m_tContentSize, ContentSize)
|
||||||
|
|
||||||
/** The untransformed size of the node in Pixels
|
/** The untransformed size of the node in Pixels
|
||||||
The contentSize remains the same no matter the node is scaled or rotated.
|
The contentSize remains the same no matter the node is scaled or rotated.
|
||||||
All nodes has a size. Layer and Scene has the same size of the screen.
|
All nodes has a size. Layer and Scene has the same size of the screen.
|
||||||
@since v0.8
|
@since v0.8
|
||||||
*/
|
*/
|
||||||
CC_PROPERTY(CCSize, m_tContentSizeInPixels, ContentSizeInPixels)
|
CC_PROPERTY(CCSize, m_tContentSizeInPixels, ContentSizeInPixels)
|
||||||
|
|
||||||
|
@ -361,12 +363,12 @@ namespace cocos2d {
|
||||||
*/
|
*/
|
||||||
CCRect boundingBox(void);
|
CCRect boundingBox(void);
|
||||||
|
|
||||||
/** returns a "local" axis aligned bounding box of the node in pixels.
|
/** returns a "local" axis aligned bounding box of the node in pixels.
|
||||||
The returned box is relative only to its parent.
|
The returned box is relative only to its parent.
|
||||||
The returned box is in Points.
|
The returned box is in Points.
|
||||||
|
|
||||||
@since v0.99.5
|
@since v0.99.5
|
||||||
*/
|
*/
|
||||||
CCRect boundingBoxInPixels(void);
|
CCRect boundingBoxInPixels(void);
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
|
@ -473,44 +475,44 @@ namespace cocos2d {
|
||||||
|
|
||||||
// transformation methods
|
// transformation methods
|
||||||
|
|
||||||
/** Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
|
/** Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
|
||||||
The matrix is in Pixels.
|
The matrix is in Pixels.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCAffineTransform nodeToParentTransform(void);
|
CCAffineTransform nodeToParentTransform(void);
|
||||||
|
|
||||||
/** Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
|
/** Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
|
||||||
The matrix is in Pixels.
|
The matrix is in Pixels.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCAffineTransform parentToNodeTransform(void);
|
CCAffineTransform parentToNodeTransform(void);
|
||||||
|
|
||||||
/** Retrusn the world affine transform matrix. The matrix is in Pixels.
|
/** Retrusn the world affine transform matrix. The matrix is in Pixels.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCAffineTransform nodeToWorldTransform(void);
|
CCAffineTransform nodeToWorldTransform(void);
|
||||||
|
|
||||||
/** Returns the inverse world affine transform matrix. The matrix is in Pixels.
|
/** Returns the inverse world affine transform matrix. The matrix is in Pixels.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCAffineTransform worldToNodeTransform(void);
|
CCAffineTransform worldToNodeTransform(void);
|
||||||
|
|
||||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCPoint convertToNodeSpace(CCPoint worldPoint);
|
CCPoint convertToNodeSpace(CCPoint worldPoint);
|
||||||
/** Converts a Point to world space coordinates. The result is in Points.
|
/** Converts a Point to world space coordinates. The result is in Points.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCPoint convertToWorldSpace(CCPoint nodePoint);
|
CCPoint convertToWorldSpace(CCPoint nodePoint);
|
||||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||||
treating the returned/received node point as anchor relative.
|
treating the returned/received node point as anchor relative.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
|
CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
|
||||||
/** Converts a local Point to world space coordinates.The result is in Points.
|
/** Converts a local Point to world space coordinates.The result is in Points.
|
||||||
treating the returned/received node point as anchor relative.
|
treating the returned/received node point as anchor relative.
|
||||||
@since v0.7.1
|
@since v0.7.1
|
||||||
*/
|
*/
|
||||||
CCPoint convertToWorldSpaceAR(CCPoint nodePoint);
|
CCPoint convertToWorldSpaceAR(CCPoint nodePoint);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2007 Scott Lembcke
|
||||||
http://www.cocos2d-x.org
|
Copyright (c) 2010 Lam Pham
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
http://www.cocos2d-x.org
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
in the Software without restriction, including without limitation the rights
|
||||||
furnished to do so, subject to the following conditions:
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
The above copyright notice and this permission notice shall be included in
|
furnished to do so, subject to the following conditions:
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
all copies or substantial portions of the Software.
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
THE SOFTWARE.
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
****************************************************************************/
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
#ifndef __SUPPORT_CGPOINTEXTENSION_H__
|
****************************************************************************/
|
||||||
#define __SUPPORT_CGPOINTEXTENSION_H__
|
|
||||||
|
#ifndef __SUPPORT_CGPOINTEXTENSION_H__
|
||||||
|
#define __SUPPORT_CGPOINTEXTENSION_H__
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
CCPoint extensions based on Chipmunk's cpVect file.
|
CCPoint extensions based on Chipmunk's cpVect file.
|
||||||
|
@ -39,19 +41,19 @@ THE SOFTWARE.
|
||||||
- cpvadd( cpv(1,1), cpv(2,2) ); // way of the chipmunk
|
- cpvadd( cpv(1,1), cpv(2,2) ); // way of the chipmunk
|
||||||
- ccpAdd( cpv(1,1), cpv(2,2) ); // mixing chipmunk and cocos2d (avoid)
|
- ccpAdd( cpv(1,1), cpv(2,2) ); // mixing chipmunk and cocos2d (avoid)
|
||||||
- cpvadd( CCPointMake(1,1), CCPointMake(2,2) ); // mixing chipmunk and CG (avoid)
|
- cpvadd( CCPointMake(1,1), CCPointMake(2,2) ); // mixing chipmunk and CG (avoid)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CCGeometry.h"
|
#include "CCGeometry.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
namespace cocos2d {
|
namespace cocos2d {
|
||||||
|
|
||||||
/** Helper macro that creates a CCPoint
|
/** Helper macro that creates a CCPoint
|
||||||
@return CCPoint
|
@return CCPoint
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
*/
|
*/
|
||||||
#define ccp(__X__,__Y__) CCPointMake((float)__X__, (float)__Y__)
|
#define ccp(__X__,__Y__) CCPointMake((float)__X__, (float)__Y__)
|
||||||
|
|
||||||
/** Returns opposite of point.
|
/** Returns opposite of point.
|
||||||
@return CCPoint
|
@return CCPoint
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -60,8 +62,8 @@ static inline CCPoint
|
||||||
ccpNeg(const CCPoint v)
|
ccpNeg(const CCPoint v)
|
||||||
{
|
{
|
||||||
return ccp(-v.x, -v.y);
|
return ccp(-v.x, -v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculates sum of two points.
|
/** Calculates sum of two points.
|
||||||
@return CCPoint
|
@return CCPoint
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -80,8 +82,8 @@ static inline CCPoint
|
||||||
ccpSub(const CCPoint v1, const CCPoint v2)
|
ccpSub(const CCPoint v1, const CCPoint v2)
|
||||||
{
|
{
|
||||||
return ccp(v1.x - v2.x, v1.y - v2.y);
|
return ccp(v1.x - v2.x, v1.y - v2.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns point multiplied by given factor.
|
/** Returns point multiplied by given factor.
|
||||||
@return CCPoint
|
@return CCPoint
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -110,8 +112,8 @@ static inline CGFloat
|
||||||
ccpDot(const CCPoint v1, const CCPoint v2)
|
ccpDot(const CCPoint v1, const CCPoint v2)
|
||||||
{
|
{
|
||||||
return v1.x*v2.x + v1.y*v2.y;
|
return v1.x*v2.x + v1.y*v2.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculates cross product of two points.
|
/** Calculates cross product of two points.
|
||||||
@return CGFloat
|
@return CGFloat
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -140,8 +142,8 @@ static inline CCPoint
|
||||||
ccpRPerp(const CCPoint v)
|
ccpRPerp(const CCPoint v)
|
||||||
{
|
{
|
||||||
return ccp(v.y, -v.x);
|
return ccp(v.y, -v.x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculates the projection of v1 over v2.
|
/** Calculates the projection of v1 over v2.
|
||||||
@return CCPoint
|
@return CCPoint
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -170,8 +172,8 @@ static inline CCPoint
|
||||||
ccpUnrotate(const CCPoint v1, const CCPoint v2)
|
ccpUnrotate(const CCPoint v1, const CCPoint v2)
|
||||||
{
|
{
|
||||||
return ccp(v1.x*v2.x + v1.y*v2.y, v1.y*v2.x - v1.x*v2.y);
|
return ccp(v1.x*v2.x + v1.y*v2.y, v1.y*v2.x - v1.x*v2.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculates the square length of a CCPoint (not calling sqrt() )
|
/** Calculates the square length of a CCPoint (not calling sqrt() )
|
||||||
@return CGFloat
|
@return CGFloat
|
||||||
@since v0.7.2
|
@since v0.7.2
|
||||||
|
@ -301,9 +303,9 @@ CCPoint CC_DLL ccpRotateByAngle(CCPoint v, CCPoint pivot, float angle);
|
||||||
*/
|
*/
|
||||||
bool CC_DLL ccpLineIntersect(CCPoint p1, CCPoint p2,
|
bool CC_DLL ccpLineIntersect(CCPoint p1, CCPoint p2,
|
||||||
CCPoint p3, CCPoint p4,
|
CCPoint p3, CCPoint p4,
|
||||||
float *s, float *t);
|
float *s, float *t);
|
||||||
|
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif // __SUPPORT_CGPOINTEXTENSION_H__
|
#endif // __SUPPORT_CGPOINTEXTENSION_H__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2010 Lam Pham
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Jason Booth
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008, 2009 Jason Booth
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCRIBBON_H__
|
****************************************************************************/
|
||||||
#define __CCRIBBON_H__
|
#ifndef __CCRIBBON_H__
|
||||||
|
#define __CCRIBBON_H__
|
||||||
/*#include <GLES/egl.h>*/
|
|
||||||
#include "CCNode.h"
|
/*#include <GLES/egl.h>*/
|
||||||
#include "CCProtocols.h"
|
#include "CCNode.h"
|
||||||
|
#include "CCProtocols.h"
|
||||||
namespace cocos2d {
|
|
||||||
|
namespace cocos2d {
|
||||||
|
|
||||||
class CCRibbonSegment;
|
class CCRibbonSegment;
|
||||||
/**
|
/**
|
||||||
* @brief A CCRibbon is a dynamically generated list of polygons drawn as a single or series
|
* @brief A CCRibbon is a dynamically generated list of polygons drawn as a single or series
|
||||||
|
@ -56,11 +57,11 @@ class CC_DLL CCRibbon : public CCNode, public CCTextureProtocol
|
||||||
CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc)
|
CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc)
|
||||||
/** color used by the Ribbon (RGBA) */
|
/** color used by the Ribbon (RGBA) */
|
||||||
CC_PROPERTY(ccColor4B, m_tColor, Color)
|
CC_PROPERTY(ccColor4B, m_tColor, Color)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCRibbon() : m_pTexture(0), m_pSegments(0), m_pDeletedSegments(0){}
|
CCRibbon() : m_pTexture(0), m_pSegments(0), m_pDeletedSegments(0){}
|
||||||
virtual ~CCRibbon();
|
virtual ~CCRibbon();
|
||||||
|
|
||||||
/** creates the ribbon */
|
/** creates the ribbon */
|
||||||
static CCRibbon * ribbonWithWidth(float w, const char *path, float length, ccColor4B color, float fade);
|
static CCRibbon * ribbonWithWidth(float w, const char *path, float length, ccColor4B color, float fade);
|
||||||
/** init the ribbon */
|
/** init the ribbon */
|
||||||
|
@ -111,8 +112,8 @@ public:
|
||||||
bool init();
|
bool init();
|
||||||
void reset();
|
void reset();
|
||||||
void draw(float curTime, float fadeTime, ccColor4B color);
|
void draw(float curTime, float fadeTime, ccColor4B color);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace cocos2d
|
} // namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCRIBBON_H__
|
#endif //__CCRIBBON_H__
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
|
Copyright (C) 2009 Matt Oswald
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -157,19 +159,19 @@ namespace cocos2d
|
||||||
virtual void removeAllChildrenWithCleanup(bool cleanup);
|
virtual void removeAllChildrenWithCleanup(bool cleanup);
|
||||||
virtual void draw(void);
|
virtual void draw(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* IMPORTANT XXX IMPORTNAT:
|
/* IMPORTANT XXX IMPORTNAT:
|
||||||
* These 2 methods can't be part of CCTMXLayer since they call [super add...], and CCSpriteSheet#add SHALL not be called
|
* These 2 methods can't be part of CCTMXLayer since they call [super add...], and CCSpriteSheet#add SHALL not be called
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Adds a quad into the texture atlas but it won't be added into the children array.
|
/* Adds a quad into the texture atlas but it won't be added into the children array.
|
||||||
This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated.
|
This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated.
|
||||||
For example: a tile map (CCTMXMap) or a label with lots of characters (BitmapFontAtlas)
|
For example: a tile map (CCTMXMap) or a label with lots of characters (BitmapFontAtlas)
|
||||||
*/
|
*/
|
||||||
void addQuadFromSprite(CCSprite *sprite, unsigned int index);
|
void addQuadFromSprite(CCSprite *sprite, unsigned int index);
|
||||||
/* This is the opposite of "addQuadFromSprite.
|
/* This is the opposite of "addQuadFromSprite.
|
||||||
It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas
|
||||||
*/
|
*/
|
||||||
CCSpriteBatchNode * addSpriteWithoutQuad(CCSprite*child, unsigned int z, int aTag);
|
CCSpriteBatchNode * addSpriteWithoutQuad(CCSprite*child, unsigned int z, int aTag);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
Copyright (c) 2009 Jason Booth
|
||||||
|
Copyright (c) 2009 Robert J Payne
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
|
Copyright (C) 2009 Matt Oswald
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCTMX_LAYER_H__
|
****************************************************************************/
|
||||||
#define __CCTMX_LAYER_H__
|
#ifndef __CCTMX_LAYER_H__
|
||||||
#include "CCTMXObjectGroup.h"
|
#define __CCTMX_LAYER_H__
|
||||||
#include "CCAtlasNode.h"
|
#include "CCTMXObjectGroup.h"
|
||||||
#include "CCSpriteBatchNode.h"
|
#include "CCAtlasNode.h"
|
||||||
namespace cocos2d {
|
#include "CCSpriteBatchNode.h"
|
||||||
|
namespace cocos2d {
|
||||||
|
|
||||||
class CCTMXMapInfo;
|
class CCTMXMapInfo;
|
||||||
class CCTMXLayerInfo;
|
class CCTMXLayerInfo;
|
||||||
class CCTMXTilesetInfo;
|
class CCTMXTilesetInfo;
|
||||||
|
@ -36,7 +37,7 @@ namespace cocos2d {
|
||||||
/** @brief CCTMXLayer represents the TMX layer.
|
/** @brief CCTMXLayer represents the TMX layer.
|
||||||
|
|
||||||
It is a subclass of CCSpriteBatchNode. By default the tiles are rendered using a CCTextureAtlas.
|
It is a subclass of CCSpriteBatchNode. By default the tiles are rendered using a CCTextureAtlas.
|
||||||
If you modify a tile on runtime, then, that tile will become a CCSprite, otherwise no CCSprite objects are created.
|
If you modify a tile on runtime, then, that tile will become a CCSprite, otherwise no CCSprite objects are created.
|
||||||
The benefits of using CCSprite objects as tiles are:
|
The benefits of using CCSprite objects as tiles are:
|
||||||
- tiles (CCSprite) can be rotated/scaled/moved with a nice API
|
- tiles (CCSprite) can be rotated/scaled/moved with a nice API
|
||||||
|
|
||||||
|
@ -166,7 +167,7 @@ namespace cocos2d {
|
||||||
CCSprite *m_pReusedTile;
|
CCSprite *m_pReusedTile;
|
||||||
_ccCArray *m_pAtlasIndexArray;
|
_ccCArray *m_pAtlasIndexArray;
|
||||||
};
|
};
|
||||||
|
|
||||||
}// namespace cocos2d
|
}// namespace cocos2d
|
||||||
#endif //__CCTMX_LAYER_H__
|
#endif //__CCTMX_LAYER_H__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2010 Ricardo Quesada
|
||||||
|
Copyright (c) 2010 Neophit
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -145,7 +146,7 @@ public:
|
||||||
/** Initializes a texture from a string with font name and font size */
|
/** Initializes a texture from a string with font name and font size */
|
||||||
bool initWithString(const char *text, const char *fontName, float fontSize);
|
bool initWithString(const char *text, const char *fontName, float fontSize);
|
||||||
|
|
||||||
/** returns the content size of the texture in points */
|
/** returns the content size of the texture in points */
|
||||||
CCSize getContentSize(void);
|
CCSize getContentSize(void);
|
||||||
|
|
||||||
#ifdef _POWERVR_SUPPORT_
|
#ifdef _POWERVR_SUPPORT_
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ THE SOFTWARE.
|
||||||
#include "CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "ccConfig.h"
|
#include "ccConfig.h"
|
||||||
|
|
||||||
namespace cocos2d {
|
namespace cocos2d {
|
||||||
class CCTexture2D;
|
class CCTexture2D;
|
||||||
|
|
||||||
/** @brief A class that implements a Texture Atlas.
|
/** @brief A class that implements a Texture Atlas.
|
||||||
|
@ -146,7 +147,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void initIndices();
|
void initIndices();
|
||||||
};
|
};
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCTEXTURE_ATLAS_H__
|
#endif //__CCTEXTURE_ATLAS_H__
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef __CCTEXTURE_CACHE_H__
|
|
||||||
#define __CCTEXTURE_CACHE_H__
|
#ifndef __CCTEXTURE_CACHE_H__
|
||||||
|
#define __CCTEXTURE_CACHE_H__
|
||||||
#include <string>
|
|
||||||
|
#include <string>
|
||||||
#include "CCObject.h"
|
#include "CCObject.h"
|
||||||
#include "CCMutableDictionary.h"
|
#include "CCMutableDictionary.h"
|
||||||
|
|
||||||
namespace cocos2d {
|
namespace cocos2d {
|
||||||
class CCTexture2D;
|
class CCTexture2D;
|
||||||
class CCAsyncObject;
|
class CCAsyncObject;
|
||||||
class CCLock;
|
class CCLock;
|
||||||
|
@ -82,7 +83,7 @@ public:
|
||||||
* @since v0.8
|
* @since v0.8
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @todo void addImageAsync(const char* filename, CCObject*target, fpAsyncCallback func);
|
// @todo void addImageAsync(const char* filename, CCObject*target, fpAsyncCallback func);
|
||||||
|
|
||||||
/* Returns a Texture2D object given an CGImageRef image
|
/* Returns a Texture2D object given an CGImageRef image
|
||||||
* If the image was not previously loaded, it will create a new CCTexture2D object and it will return it.
|
* If the image was not previously loaded, it will create a new CCTexture2D object and it will return it.
|
||||||
|
@ -100,8 +101,8 @@ public:
|
||||||
*/
|
*/
|
||||||
CCTexture2D* addUIImage(CCImage *image, const char *key);
|
CCTexture2D* addUIImage(CCImage *image, const char *key);
|
||||||
|
|
||||||
/** Returns an already created texture. Returns nil if the texture doesn't exist.
|
/** Returns an already created texture. Returns nil if the texture doesn't exist.
|
||||||
@since v0.99.5
|
@since v0.99.5
|
||||||
*/
|
*/
|
||||||
CCTexture2D* textureForKey(const char* key);
|
CCTexture2D* textureForKey(const char* key);
|
||||||
/** Purges the dictionary of loaded textures.
|
/** Purges the dictionary of loaded textures.
|
||||||
|
@ -128,7 +129,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void removeTextureForKey(const char *textureKeyName);
|
void removeTextureForKey(const char *textureKeyName);
|
||||||
|
|
||||||
#if _POWERVR_SUPPORT_
|
#if _POWERVR_SUPPORT_
|
||||||
/** Returns a Texture2D object given an PVRTC RAW filename
|
/** Returns a Texture2D object given an PVRTC RAW filename
|
||||||
* If the file image was not previously loaded, it will create a new CCTexture2D
|
* If the file image was not previously loaded, it will create a new CCTexture2D
|
||||||
* object and it will return it. Otherwise it will return a reference of a previosly loaded image
|
* object and it will return it. Otherwise it will return a reference of a previosly loaded image
|
||||||
|
@ -145,8 +146,8 @@ public:
|
||||||
*/
|
*/
|
||||||
CCTexture2D* addPVRTCImage(const char* fileimage);
|
CCTexture2D* addPVRTCImage(const char* fileimage);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif //__CCTEXTURE_CACHE_H__
|
#endif //__CCTEXTURE_CACHE_H__
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
#ifndef __CCTILE_MAP_ATLAS__
|
****************************************************************************/
|
||||||
#define __CCTILE_MAP_ATLAS__
|
#ifndef __CCTILE_MAP_ATLAS__
|
||||||
#include <string>
|
#define __CCTILE_MAP_ATLAS__
|
||||||
#include <map>
|
#include <string>
|
||||||
#include "CCAtlasNode.h"
|
#include <map>
|
||||||
namespace cocos2d {
|
#include "CCAtlasNode.h"
|
||||||
|
namespace cocos2d {
|
||||||
typedef std::map<std::string, int> StringToIntegerDictionary;
|
|
||||||
typedef std::pair<std::string, int> StringToIntegerPair;
|
typedef std::map<std::string, int> StringToIntegerDictionary;
|
||||||
|
typedef std::pair<std::string, int> StringToIntegerPair;
|
||||||
struct sImageTGA;
|
struct sImageTGA;
|
||||||
/** @brief CCTileMapAtlas is a subclass of CCAtlasNode.
|
/** @brief CCTileMapAtlas is a subclass of CCAtlasNode.
|
||||||
|
|
||||||
|
@ -82,8 +83,8 @@ namespace cocos2d {
|
||||||
StringToIntegerDictionary *m_pPosToAtlasIndex;
|
StringToIntegerDictionary *m_pPosToAtlasIndex;
|
||||||
//! numbers of tiles to render
|
//! numbers of tiles to render
|
||||||
int m_nItemsToRender;
|
int m_nItemsToRender;
|
||||||
};
|
};
|
||||||
|
|
||||||
}// namespace cocos2d
|
}// namespace cocos2d
|
||||||
#endif //__CCTILE_MAP_ATLAS__
|
#endif //__CCTILE_MAP_ATLAS__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Valentin Milea
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Valentin Milea
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,43 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
****************************************************************************/
|
THE SOFTWARE.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef __CCTRANSITION_H__
|
|
||||||
#define __CCTRANSITION_H__
|
#ifndef __CCTRANSITION_H__
|
||||||
|
#define __CCTRANSITION_H__
|
||||||
#include "CCScene.h"
|
|
||||||
namespace cocos2d {
|
#include "CCScene.h"
|
||||||
|
namespace cocos2d {
|
||||||
//static creation function macro
|
|
||||||
//c/c++ don't support object creation of using class name
|
//static creation function macro
|
||||||
//so, all classes need creation method.
|
//c/c++ don't support object creation of using class name
|
||||||
|
//so, all classes need creation method.
|
||||||
#define DECLEAR_TRANSITIONWITHDURATION(_Type)\
|
#define DECLEAR_TRANSITIONWITHDURATION(_Type)\
|
||||||
static _Type* transitionWithDuration(ccTime t, CCScene* scene);
|
static _Type* transitionWithDuration(ccTime t, CCScene* scene);
|
||||||
|
|
||||||
class CCActionInterval;
|
class CCActionInterval;
|
||||||
class CCNode;
|
class CCNode;
|
||||||
|
|
||||||
/** @brief CCTransitionEaseScene can ease the actions of the scene protocol.
|
/** @brief CCTransitionEaseScene can ease the actions of the scene protocol.
|
||||||
@since v0.8.2
|
@since v0.8.2
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +49,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual CCActionInterval * easeActionWithAction(CCActionInterval * action) = 0;
|
virtual CCActionInterval * easeActionWithAction(CCActionInterval * action) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Orientation Type used by some transitions
|
/** Orientation Type used by some transitions
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -60,29 +61,29 @@ typedef enum {
|
||||||
kOrientationUpOver = 0,
|
kOrientationUpOver = 0,
|
||||||
/// A vertical orientation where the Bottom is nearer
|
/// A vertical orientation where the Bottom is nearer
|
||||||
kOrientationDownOver = 1,
|
kOrientationDownOver = 1,
|
||||||
} tOrientation;
|
} tOrientation;
|
||||||
|
|
||||||
/** @brief Base class for CCTransition scenes
|
/** @brief Base class for CCTransition scenes
|
||||||
*/
|
*/
|
||||||
class CC_DLL CCTransitionScene : public CCScene
|
class CC_DLL CCTransitionScene : public CCScene
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CCScene * m_pInScene;
|
CCScene * m_pInScene;
|
||||||
CCScene * m_pOutScene;
|
CCScene * m_pOutScene;
|
||||||
ccTime m_fDuration;
|
ccTime m_fDuration;
|
||||||
bool m_bIsInSceneOnTop;
|
bool m_bIsInSceneOnTop;
|
||||||
bool m_bIsSendCleanupToScene;
|
bool m_bIsSendCleanupToScene;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CCTransitionScene();
|
CCTransitionScene();
|
||||||
virtual ~CCTransitionScene();
|
virtual ~CCTransitionScene();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual void onExit();
|
virtual void onExit();
|
||||||
virtual void cleanup();
|
virtual void cleanup();
|
||||||
|
|
||||||
/** creates a base transition with duration and incoming scene */
|
/** creates a base transition with duration and incoming scene */
|
||||||
static CCTransitionScene * transitionWithDuration(ccTime t, CCScene *scene);
|
static CCTransitionScene * transitionWithDuration(ccTime t, CCScene *scene);
|
||||||
|
|
||||||
|
@ -93,15 +94,15 @@ public:
|
||||||
void finish(void);
|
void finish(void);
|
||||||
|
|
||||||
/** used by some transitions to hide the outter scene */
|
/** used by some transitions to hide the outter scene */
|
||||||
void hideOutShowIn(void);
|
void hideOutShowIn(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void sceneOrder();
|
virtual void sceneOrder();
|
||||||
private:
|
private:
|
||||||
void setNewScene(ccTime dt);
|
void setNewScene(ccTime dt);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief A CCTransition that supports orientation like.
|
/** @brief A CCTransition that supports orientation like.
|
||||||
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
|
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
|
||||||
*/
|
*/
|
||||||
|
@ -118,8 +119,8 @@ public:
|
||||||
static CCTransitionSceneOriented * transitionWithDuration(ccTime t,CCScene* scene, tOrientation orientation);
|
static CCTransitionSceneOriented * transitionWithDuration(ccTime t,CCScene* scene, tOrientation orientation);
|
||||||
/** initializes a transition with duration and incoming scene */
|
/** initializes a transition with duration and incoming scene */
|
||||||
virtual bool initWithDuration(ccTime t,CCScene* scene,tOrientation orientation);
|
virtual bool initWithDuration(ccTime t,CCScene* scene,tOrientation orientation);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief CCTransitionRotoZoom:
|
/** @brief CCTransitionRotoZoom:
|
||||||
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
|
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
|
||||||
*/
|
*/
|
||||||
|
@ -544,7 +545,7 @@ public:
|
||||||
public:
|
public:
|
||||||
DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeDown)
|
DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeDown)
|
||||||
};
|
};
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif // __CCTRANSITION_H__
|
#endif // __CCTRANSITION_H__
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,33 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
|
||||||
http://www.cocos2d-x.org
|
|
||||||
|
http://www.cocos2d-x.org
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
in the Software without restriction, including without limitation the rights
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
in the Software without restriction, including without limitation the rights
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
furnished to do so, subject to the following conditions:
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
THE SOFTWARE.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __CCPAGE_TURN_TRANSITION_H__
|
#ifndef __CCPAGE_TURN_TRANSITION_H__
|
||||||
#define __CCPAGE_TURN_TRANSITION_H__
|
#define __CCPAGE_TURN_TRANSITION_H__
|
||||||
|
|
||||||
#include "CCTransition.h"
|
#include "CCTransition.h"
|
||||||
namespace cocos2d {
|
namespace cocos2d {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief A transition which peels back the bottom right hand corner of a scene
|
@brief A transition which peels back the bottom right hand corner of a scene
|
||||||
|
@ -68,8 +69,8 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void sceneOrder();
|
virtual void sceneOrder();
|
||||||
};
|
};
|
||||||
}//namespace cocos2d
|
}//namespace cocos2d
|
||||||
|
|
||||||
#endif // __CCPAGE_TURN_TRANSITION_H__
|
#endif // __CCPAGE_TURN_TRANSITION_H__
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2009 Lam Pham
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Copyright (c) 2010 cocos2d-x.org
|
Copyright (c) 2010-2011 cocos2d-x.org
|
||||||
|
Copyright (c) 2008-2010 Ricardo Quesada
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue