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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,32 +1,33 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCCAMERA_ACTION_H__
|
||||
#define __CCCAMERA_ACTION_H__
|
||||
#include "CCActionInterval.h"
|
||||
|
||||
namespace cocos2d {
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCCAMERA_ACTION_H__
|
||||
#define __CCCAMERA_ACTION_H__
|
||||
#include "CCActionInterval.h"
|
||||
|
||||
namespace cocos2d {
|
||||
class CCCamera;
|
||||
|
||||
/**
|
||||
|
@ -97,7 +98,7 @@ namespace cocos2d {
|
|||
float m_fRadX;
|
||||
float m_fRadDeltaX;
|
||||
};
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
#endif //__CCCAMERA_ACTION_H__
|
|
@ -1,37 +1,38 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __ACTION_CCEASE_ACTION_H__
|
||||
#define __ACTION_CCEASE_ACTION_H__
|
||||
|
||||
#include "CCActionInterval.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCObject;
|
||||
class CCZone;
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2009 Jason Booth
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __ACTION_CCEASE_ACTION_H__
|
||||
#define __ACTION_CCEASE_ACTION_H__
|
||||
|
||||
#include "CCActionInterval.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCObject;
|
||||
class CCZone;
|
||||
|
||||
/**
|
||||
@brief Base class for Easing actions
|
||||
*/
|
||||
|
@ -46,7 +47,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
virtual void startWithTarget(CCNode *pTarget);
|
||||
virtual void stop(void);
|
||||
virtual void update(ccTime time);
|
||||
virtual void update(ccTime time);
|
||||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
|
@ -136,8 +137,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -151,8 +152,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
};
|
||||
|
@ -166,8 +167,8 @@ public:
|
|||
virtual void update(ccTime time);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
};
|
||||
|
@ -182,8 +183,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -197,8 +198,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -211,8 +212,8 @@ public:
|
|||
virtual void update(ccTime time);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -313,8 +314,8 @@ public:
|
|||
ccTime bounceTime(ccTime time);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -330,8 +331,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -347,8 +348,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -363,8 +364,8 @@ public:
|
|||
virtual void update(ccTime time);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -380,8 +381,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -397,8 +398,8 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
|
@ -413,8 +414,8 @@ public:
|
|||
virtual void update(ccTime time);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action */
|
||||
public:
|
||||
/** creates the action */
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -249,15 +250,15 @@ namespace cocos2d {
|
|||
void *m_pData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@brief Calls a 'callback' with an object as the first argument.
|
||||
O means Object.
|
||||
@since v0.99.5
|
||||
*/
|
||||
class CC_DLL CCCallFuncO : public CCCallFunc
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
@brief Calls a 'callback' with an object as the first argument.
|
||||
O means Object.
|
||||
@since v0.99.5
|
||||
*/
|
||||
class CC_DLL CCCallFuncO : public CCCallFunc
|
||||
{
|
||||
public:
|
||||
CCCallFuncO();
|
||||
virtual ~CCCallFuncO();
|
||||
/** creates the action with the callback
|
||||
|
@ -269,14 +270,14 @@ namespace cocos2d {
|
|||
|
||||
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
|
||||
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||
virtual void execute();
|
||||
|
||||
protected:
|
||||
CCObject* m_pObject;
|
||||
};
|
||||
virtual void execute();
|
||||
|
||||
protected:
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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.
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCATLAS_NODE_H__
|
||||
#define __CCATLAS_NODE_H__
|
||||
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
#include "ccTypes.h"
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
#include "ccTypes.h"
|
||||
|
||||
namespace cocos2d {
|
||||
namespace cocos2d {
|
||||
class CCTextureAtlas;
|
||||
|
||||
/** @brief CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and
|
||||
|
@ -84,13 +85,13 @@ public:
|
|||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
|
||||
// CC Texture protocol
|
||||
|
||||
/** returns the used texture*/
|
||||
virtual CCTexture2D* getTexture(void);
|
||||
|
||||
/** sets a new texture. it will be retained*/
|
||||
virtual void setTexture(CCTexture2D *texture);
|
||||
// CC Texture protocol
|
||||
|
||||
/** returns the used texture*/
|
||||
virtual CCTexture2D* getTexture(void);
|
||||
|
||||
/** sets a new texture. it will be retained*/
|
||||
virtual void setTexture(CCTexture2D *texture);
|
||||
|
||||
private :
|
||||
void calculateMaxItems();
|
||||
|
@ -98,7 +99,7 @@ private :
|
|||
void updateOpacityModifyRGB();
|
||||
|
||||
};
|
||||
}//namespace cocos2d
|
||||
}//namespace cocos2d
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCLABEL_ATLAS_H__
|
||||
#define __CCLABEL_ATLAS_H__
|
||||
#include "CCAtlasNode.h"
|
||||
namespace cocos2d{
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCLABEL_ATLAS_H__
|
||||
#define __CCLABEL_ATLAS_H__
|
||||
#include "CCAtlasNode.h"
|
||||
namespace cocos2d{
|
||||
|
||||
/** @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 */
|
||||
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.
|
||||
@deprecated Will be removed in 1.0.1. Use "labelWithString:" instead
|
||||
*/
|
||||
|
||||
/** 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
|
||||
*/
|
||||
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 */
|
||||
|
@ -71,6 +72,6 @@ namespace cocos2d{
|
|||
// the first char in the charmap
|
||||
char m_cMapStartChar;
|
||||
};
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCLABEL_ATLAS_H__
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCLABEL_ATLAS_H__
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCBITMAP_FONT_ATLAS_H__
|
||||
#define __CCBITMAP_FONT_ATLAS_H__
|
||||
#include "CCSpriteBatchNode.h"
|
||||
namespace cocos2d{
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCBITMAP_FONT_ATLAS_H__
|
||||
#define __CCBITMAP_FONT_ATLAS_H__
|
||||
#include "CCSpriteBatchNode.h"
|
||||
namespace cocos2d{
|
||||
|
||||
struct _KerningHashElement;
|
||||
|
||||
/**
|
||||
@struct ccBMFontDef
|
||||
@struct ccBMFontDef
|
||||
BMFont definition
|
||||
*/
|
||||
typedef struct _BMFontDef {
|
||||
|
@ -45,7 +46,7 @@ namespace cocos2d{
|
|||
int xAdvance;
|
||||
} ccBMFontDef;
|
||||
|
||||
/** @struct ccBMFontPadding
|
||||
/** @struct ccBMFontPadding
|
||||
BMFont padding
|
||||
@since v0.8.2
|
||||
*/
|
||||
|
@ -157,9 +158,9 @@ namespace cocos2d{
|
|||
/** creates a bitmap font altas with an initial string and the FNT file */
|
||||
static CCLabelBMFont * labelWithString(const char *str, const char *fntFile);
|
||||
|
||||
/** creates a BMFont label with an initial string and the FNT file
|
||||
@deprecated Will be removed in 1.0.1. Use "labelWithString" instead.
|
||||
@since v0.99.5
|
||||
/** creates a BMFont label with an initial string and the FNT file
|
||||
@deprecated Will be removed in 1.0.1. Use "labelWithString" instead.
|
||||
@since v0.99.5
|
||||
*/
|
||||
static CCLabelBMFont * bitmapFontAtlasWithString(const char *str, const char *fntFile);
|
||||
|
||||
|
@ -189,14 +190,14 @@ namespace cocos2d{
|
|||
/** Purges the FNT config cache
|
||||
*/
|
||||
void FNTConfigRemoveCache( void );
|
||||
|
||||
/** CCBitmapFontAtlas
|
||||
@deprecated Use CCLabelBMFont instead. Will be removed 1.0.1
|
||||
*/
|
||||
class CCBitmapFontAtlas : public CCLabelBMFont
|
||||
{
|
||||
};
|
||||
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||
|
||||
/** CCBitmapFontAtlas
|
||||
@deprecated Use CCLabelBMFont instead. Will be removed 1.0.1
|
||||
*/
|
||||
class CCBitmapFontAtlas : public CCLabelBMFont
|
||||
{
|
||||
};
|
||||
|
||||
}// namespace cocos2d
|
||||
|
||||
#endif //__CCBITMAP_FONT_ATLAS_H__
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCLABEL_H__
|
||||
#define __CCLABEL_H__
|
||||
#include "CCSprite.h"
|
||||
#include "CCTexture2D.h"
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCLABEL_H__
|
||||
#define __CCLABEL_H__
|
||||
#include "CCSprite.h"
|
||||
#include "CCTexture2D.h"
|
||||
|
||||
namespace cocos2d{
|
||||
|
||||
/** @brief CCLabelTTF is a subclass of CCTextureNode that knows how to render text labels
|
||||
|
@ -63,7 +64,7 @@ namespace cocos2d{
|
|||
float m_fFontSize;
|
||||
std::string * m_pString;
|
||||
};
|
||||
|
||||
} //namespace cocos2d
|
||||
#endif //__CCLABEL_H__
|
||||
|
||||
|
||||
} //namespace cocos2d
|
||||
#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
|
||||
|
||||
|
|
|
@ -1,43 +1,44 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMENU_H_
|
||||
#define __CCMENU_H_
|
||||
|
||||
#include "CCMenuItem.h"
|
||||
#include "CCLayer.h"
|
||||
|
||||
namespace cocos2d{
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMENU_H_
|
||||
#define __CCMENU_H_
|
||||
|
||||
#include "CCMenuItem.h"
|
||||
#include "CCLayer.h"
|
||||
|
||||
namespace cocos2d{
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kCCMenuStateWaiting,
|
||||
kCCMenuStateTrackingTouch
|
||||
kCCMenuStateWaiting,
|
||||
kCCMenuStateTrackingTouch
|
||||
} tCCMenuState;
|
||||
|
||||
enum {
|
||||
//* priority used by the menu
|
||||
kCCMenuTouchPriority = -128,
|
||||
enum {
|
||||
//* priority used by the menu
|
||||
kCCMenuTouchPriority = -128,
|
||||
};
|
||||
|
||||
/** @brief A CCMenu
|
||||
|
@ -127,6 +128,6 @@ namespace cocos2d{
|
|||
GLubyte m_cOpacity;
|
||||
ccColor3B m_tColor;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif//__CCMENU_H_
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMENU_ITEM_H__
|
||||
#define __CCMENU_ITEM_H__
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMENU_ITEM_H__
|
||||
#define __CCMENU_ITEM_H__
|
||||
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
#include "selector_protocol.h"
|
||||
|
||||
namespace cocos2d{
|
||||
#include "selector_protocol.h"
|
||||
|
||||
namespace cocos2d{
|
||||
|
||||
class CCLabelTTF;
|
||||
class CCLabelAtlas;
|
||||
|
@ -262,7 +263,7 @@ namespace cocos2d{
|
|||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif //__CCMENU_ITEM_H__
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMOTION_STREAK_H__
|
||||
#define __CCMOTION_STREAK_H__
|
||||
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCRibbon;
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008, 2009 Jason Booth
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCMOTION_STREAK_H__
|
||||
#define __CCMOTION_STREAK_H__
|
||||
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCRibbon;
|
||||
/**
|
||||
* @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
|
||||
|
@ -69,8 +70,8 @@ protected:
|
|||
float m_fSegThreshold;
|
||||
float m_fWidth;
|
||||
CCPoint m_tLastLocation;
|
||||
};
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
#endif //__CCMOTION_STREAK_H__
|
||||
};
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
#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
|
||||
|
||||
|
@ -171,10 +173,10 @@ namespace cocos2d {
|
|||
*/
|
||||
CC_PROPERTY(CCSize, m_tContentSize, ContentSize)
|
||||
|
||||
/** The untransformed size of the node in Pixels
|
||||
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.
|
||||
@since v0.8
|
||||
/** The untransformed size of the node in Pixels
|
||||
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.
|
||||
@since v0.8
|
||||
*/
|
||||
CC_PROPERTY(CCSize, m_tContentSizeInPixels, ContentSizeInPixels)
|
||||
|
||||
|
@ -361,12 +363,12 @@ namespace cocos2d {
|
|||
*/
|
||||
CCRect boundingBox(void);
|
||||
|
||||
/** 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 in Points.
|
||||
|
||||
@since v0.99.5
|
||||
*/
|
||||
/** 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 in Points.
|
||||
|
||||
@since v0.99.5
|
||||
*/
|
||||
CCRect boundingBoxInPixels(void);
|
||||
|
||||
// actions
|
||||
|
@ -473,44 +475,44 @@ namespace cocos2d {
|
|||
|
||||
// transformation methods
|
||||
|
||||
/** Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
|
||||
The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
/** Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
|
||||
The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCAffineTransform nodeToParentTransform(void);
|
||||
|
||||
/** Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
|
||||
The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
/** Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
|
||||
The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCAffineTransform parentToNodeTransform(void);
|
||||
|
||||
/** Retrusn the world affine transform matrix. The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
/** Retrusn the world affine transform matrix. The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCAffineTransform nodeToWorldTransform(void);
|
||||
|
||||
/** Returns the inverse world affine transform matrix. The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
/** Returns the inverse world affine transform matrix. The matrix is in Pixels.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCAffineTransform worldToNodeTransform(void);
|
||||
|
||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||
@since v0.7.1
|
||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCPoint convertToNodeSpace(CCPoint worldPoint);
|
||||
/** Converts a Point to world space coordinates. The result is in Points.
|
||||
@since v0.7.1
|
||||
/** Converts a Point to world space coordinates. The result is in Points.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCPoint convertToWorldSpace(CCPoint nodePoint);
|
||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||
treating the returned/received node point as anchor relative.
|
||||
@since v0.7.1
|
||||
/** Converts a Point to node (local) space coordinates. The result is in Points.
|
||||
treating the returned/received node point as anchor relative.
|
||||
@since v0.7.1
|
||||
*/
|
||||
CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
|
||||
/** Converts a local Point to world space coordinates.The result is in Points.
|
||||
treating the returned/received node point as anchor relative.
|
||||
@since v0.7.1
|
||||
/** Converts a local Point to world space coordinates.The result is in Points.
|
||||
treating the returned/received node point as anchor relative.
|
||||
@since v0.7.1
|
||||
*/
|
||||
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
|
||||
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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__
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2007 Scott Lembcke
|
||||
Copyright (c) 2010 Lam Pham
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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__
|
||||
|
||||
/**
|
||||
@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
|
||||
- ccpAdd( cpv(1,1), cpv(2,2) ); // mixing chipmunk and cocos2d (avoid)
|
||||
- cpvadd( CCPointMake(1,1), CCPointMake(2,2) ); // mixing chipmunk and CG (avoid)
|
||||
*/
|
||||
|
||||
#include "CCGeometry.h"
|
||||
|
||||
#include <math.h>
|
||||
namespace cocos2d {
|
||||
|
||||
*/
|
||||
|
||||
#include "CCGeometry.h"
|
||||
|
||||
#include <math.h>
|
||||
namespace cocos2d {
|
||||
|
||||
/** Helper macro that creates a CCPoint
|
||||
@return CCPoint
|
||||
@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.
|
||||
@return CCPoint
|
||||
@since v0.7.2
|
||||
|
@ -60,8 +62,8 @@ static inline CCPoint
|
|||
ccpNeg(const CCPoint v)
|
||||
{
|
||||
return ccp(-v.x, -v.y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Calculates sum of two points.
|
||||
@return CCPoint
|
||||
@since v0.7.2
|
||||
|
@ -80,8 +82,8 @@ static inline CCPoint
|
|||
ccpSub(const CCPoint v1, const CCPoint v2)
|
||||
{
|
||||
return ccp(v1.x - v2.x, v1.y - v2.y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Returns point multiplied by given factor.
|
||||
@return CCPoint
|
||||
@since v0.7.2
|
||||
|
@ -110,8 +112,8 @@ static inline CGFloat
|
|||
ccpDot(const CCPoint v1, const CCPoint v2)
|
||||
{
|
||||
return v1.x*v2.x + v1.y*v2.y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Calculates cross product of two points.
|
||||
@return CGFloat
|
||||
@since v0.7.2
|
||||
|
@ -140,8 +142,8 @@ static inline CCPoint
|
|||
ccpRPerp(const CCPoint v)
|
||||
{
|
||||
return ccp(v.y, -v.x);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Calculates the projection of v1 over v2.
|
||||
@return CCPoint
|
||||
@since v0.7.2
|
||||
|
@ -170,8 +172,8 @@ static inline CCPoint
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Calculates the square length of a CCPoint (not calling sqrt() )
|
||||
@return CGFloat
|
||||
@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,
|
||||
CCPoint p3, CCPoint p4,
|
||||
float *s, float *t);
|
||||
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif // __SUPPORT_CGPOINTEXTENSION_H__
|
||||
|
||||
float *s, float *t);
|
||||
|
||||
}//namespace cocos2d
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCRIBBON_H__
|
||||
#define __CCRIBBON_H__
|
||||
|
||||
/*#include <GLES/egl.h>*/
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008, 2009 Jason Booth
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCRIBBON_H__
|
||||
#define __CCRIBBON_H__
|
||||
|
||||
/*#include <GLES/egl.h>*/
|
||||
#include "CCNode.h"
|
||||
#include "CCProtocols.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCRibbonSegment;
|
||||
/**
|
||||
* @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)
|
||||
/** color used by the Ribbon (RGBA) */
|
||||
CC_PROPERTY(ccColor4B, m_tColor, Color)
|
||||
|
||||
|
||||
public:
|
||||
CCRibbon() : m_pTexture(0), m_pSegments(0), m_pDeletedSegments(0){}
|
||||
virtual ~CCRibbon();
|
||||
|
||||
|
||||
/** creates the ribbon */
|
||||
static CCRibbon * ribbonWithWidth(float w, const char *path, float length, ccColor4B color, float fade);
|
||||
/** init the ribbon */
|
||||
|
@ -111,8 +112,8 @@ public:
|
|||
bool init();
|
||||
void reset();
|
||||
void draw(float curTime, float fadeTime, ccColor4B color);
|
||||
};
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
};
|
||||
|
||||
} // namespace cocos2d
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -157,19 +159,19 @@ namespace cocos2d
|
|||
virtual void removeAllChildrenWithCleanup(bool cleanup);
|
||||
virtual void draw(void);
|
||||
|
||||
protected:
|
||||
/* IMPORTANT XXX IMPORTNAT:
|
||||
* 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.
|
||||
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)
|
||||
*/
|
||||
void addQuadFromSprite(CCSprite *sprite, unsigned int index);
|
||||
/* 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
|
||||
*/
|
||||
protected:
|
||||
/* IMPORTANT XXX IMPORTNAT:
|
||||
* 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.
|
||||
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)
|
||||
*/
|
||||
void addQuadFromSprite(CCSprite *sprite, unsigned int index);
|
||||
/* 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
|
||||
*/
|
||||
CCSpriteBatchNode * addSpriteWithoutQuad(CCSprite*child, unsigned int z, int aTag);
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,33 +1,34 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTMX_LAYER_H__
|
||||
#define __CCTMX_LAYER_H__
|
||||
#include "CCTMXObjectGroup.h"
|
||||
#include "CCAtlasNode.h"
|
||||
#include "CCSpriteBatchNode.h"
|
||||
namespace cocos2d {
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2009-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTMX_LAYER_H__
|
||||
#define __CCTMX_LAYER_H__
|
||||
#include "CCTMXObjectGroup.h"
|
||||
#include "CCAtlasNode.h"
|
||||
#include "CCSpriteBatchNode.h"
|
||||
namespace cocos2d {
|
||||
|
||||
class CCTMXMapInfo;
|
||||
class CCTMXLayerInfo;
|
||||
class CCTMXTilesetInfo;
|
||||
|
@ -36,7 +37,7 @@ namespace cocos2d {
|
|||
/** @brief CCTMXLayer represents the TMX layer.
|
||||
|
||||
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:
|
||||
- tiles (CCSprite) can be rotated/scaled/moved with a nice API
|
||||
|
||||
|
@ -166,7 +167,7 @@ namespace cocos2d {
|
|||
CCSprite *m_pReusedTile;
|
||||
_ccCArray *m_pAtlasIndexArray;
|
||||
};
|
||||
|
||||
}// namespace cocos2d
|
||||
#endif //__CCTMX_LAYER_H__
|
||||
|
||||
|
||||
}// namespace cocos2d
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -145,7 +146,7 @@ public:
|
|||
/** Initializes a texture from a string with font name and font size */
|
||||
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);
|
||||
|
||||
#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
|
||||
|
||||
|
@ -30,7 +31,7 @@ THE SOFTWARE.
|
|||
#include "CCObject.h"
|
||||
#include "ccConfig.h"
|
||||
|
||||
namespace cocos2d {
|
||||
namespace cocos2d {
|
||||
class CCTexture2D;
|
||||
|
||||
/** @brief A class that implements a Texture Atlas.
|
||||
|
@ -146,7 +147,7 @@ public:
|
|||
private:
|
||||
void initIndices();
|
||||
};
|
||||
}//namespace cocos2d
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif //__CCTEXTURE_ATLAS_H__
|
||||
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTEXTURE_CACHE_H__
|
||||
#define __CCTEXTURE_CACHE_H__
|
||||
|
||||
#include <string>
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTEXTURE_CACHE_H__
|
||||
#define __CCTEXTURE_CACHE_H__
|
||||
|
||||
#include <string>
|
||||
#include "CCObject.h"
|
||||
#include "CCMutableDictionary.h"
|
||||
|
||||
namespace cocos2d {
|
||||
namespace cocos2d {
|
||||
class CCTexture2D;
|
||||
class CCAsyncObject;
|
||||
class CCLock;
|
||||
|
@ -82,7 +83,7 @@ public:
|
|||
* @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
|
||||
* 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);
|
||||
|
||||
/** Returns an already created texture. Returns nil if the texture doesn't exist.
|
||||
@since v0.99.5
|
||||
/** Returns an already created texture. Returns nil if the texture doesn't exist.
|
||||
@since v0.99.5
|
||||
*/
|
||||
CCTexture2D* textureForKey(const char* key);
|
||||
/** Purges the dictionary of loaded textures.
|
||||
|
@ -128,7 +129,7 @@ public:
|
|||
*/
|
||||
void removeTextureForKey(const char *textureKeyName);
|
||||
|
||||
#if _POWERVR_SUPPORT_
|
||||
#if _POWERVR_SUPPORT_
|
||||
/** Returns a Texture2D object given an PVRTC RAW filename
|
||||
* 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
|
||||
|
@ -145,8 +146,8 @@ public:
|
|||
*/
|
||||
CCTexture2D* addPVRTCImage(const char* fileimage);
|
||||
#endif
|
||||
};
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif //__CCTEXTURE_CACHE_H__
|
||||
|
||||
};
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif //__CCTEXTURE_CACHE_H__
|
||||
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTILE_MAP_ATLAS__
|
||||
#define __CCTILE_MAP_ATLAS__
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "CCAtlasNode.h"
|
||||
namespace cocos2d {
|
||||
|
||||
typedef std::map<std::string, int> StringToIntegerDictionary;
|
||||
typedef std::pair<std::string, int> StringToIntegerPair;
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTILE_MAP_ATLAS__
|
||||
#define __CCTILE_MAP_ATLAS__
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "CCAtlasNode.h"
|
||||
namespace cocos2d {
|
||||
|
||||
typedef std::map<std::string, int> StringToIntegerDictionary;
|
||||
typedef std::pair<std::string, int> StringToIntegerPair;
|
||||
struct sImageTGA;
|
||||
/** @brief CCTileMapAtlas is a subclass of CCAtlasNode.
|
||||
|
||||
|
@ -82,8 +83,8 @@ namespace cocos2d {
|
|||
StringToIntegerDictionary *m_pPosToAtlasIndex;
|
||||
//! numbers of tiles to render
|
||||
int m_nItemsToRender;
|
||||
};
|
||||
|
||||
}// namespace cocos2d
|
||||
#endif //__CCTILE_MAP_ATLAS__
|
||||
|
||||
};
|
||||
|
||||
}// namespace cocos2d
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,42 +1,43 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTRANSITION_H__
|
||||
#define __CCTRANSITION_H__
|
||||
|
||||
#include "CCScene.h"
|
||||
namespace cocos2d {
|
||||
|
||||
//static creation function macro
|
||||
//c/c++ don't support object creation of using class name
|
||||
//so, all classes need creation method.
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCTRANSITION_H__
|
||||
#define __CCTRANSITION_H__
|
||||
|
||||
#include "CCScene.h"
|
||||
namespace cocos2d {
|
||||
|
||||
//static creation function macro
|
||||
//c/c++ don't support object creation of using class name
|
||||
//so, all classes need creation method.
|
||||
#define DECLEAR_TRANSITIONWITHDURATION(_Type)\
|
||||
static _Type* transitionWithDuration(ccTime t, CCScene* scene);
|
||||
|
||||
class CCActionInterval;
|
||||
class CCNode;
|
||||
|
||||
static _Type* transitionWithDuration(ccTime t, CCScene* scene);
|
||||
|
||||
class CCActionInterval;
|
||||
class CCNode;
|
||||
|
||||
/** @brief CCTransitionEaseScene can ease the actions of the scene protocol.
|
||||
@since v0.8.2
|
||||
*/
|
||||
|
@ -48,7 +49,7 @@ public:
|
|||
*/
|
||||
virtual CCActionInterval * easeActionWithAction(CCActionInterval * action) = 0;
|
||||
};
|
||||
|
||||
|
||||
/** Orientation Type used by some transitions
|
||||
*/
|
||||
typedef enum {
|
||||
|
@ -60,29 +61,29 @@ typedef enum {
|
|||
kOrientationUpOver = 0,
|
||||
/// A vertical orientation where the Bottom is nearer
|
||||
kOrientationDownOver = 1,
|
||||
} tOrientation;
|
||||
|
||||
} tOrientation;
|
||||
|
||||
/** @brief Base class for CCTransition scenes
|
||||
*/
|
||||
class CC_DLL CCTransitionScene : public CCScene
|
||||
{
|
||||
|
||||
protected:
|
||||
*/
|
||||
class CC_DLL CCTransitionScene : public CCScene
|
||||
{
|
||||
|
||||
protected:
|
||||
CCScene * m_pInScene;
|
||||
CCScene * m_pOutScene;
|
||||
ccTime m_fDuration;
|
||||
bool m_bIsInSceneOnTop;
|
||||
bool m_bIsSendCleanupToScene;
|
||||
|
||||
public:
|
||||
|
||||
CCTransitionScene();
|
||||
virtual ~CCTransitionScene();
|
||||
virtual void draw();
|
||||
virtual void onEnter();
|
||||
virtual void onExit();
|
||||
virtual void cleanup();
|
||||
|
||||
bool m_bIsSendCleanupToScene;
|
||||
|
||||
public:
|
||||
|
||||
CCTransitionScene();
|
||||
virtual ~CCTransitionScene();
|
||||
virtual void draw();
|
||||
virtual void onEnter();
|
||||
virtual void onExit();
|
||||
virtual void cleanup();
|
||||
|
||||
/** creates a base transition with duration and incoming scene */
|
||||
static CCTransitionScene * transitionWithDuration(ccTime t, CCScene *scene);
|
||||
|
||||
|
@ -93,15 +94,15 @@ public:
|
|||
void finish(void);
|
||||
|
||||
/** used by some transitions to hide the outter scene */
|
||||
void hideOutShowIn(void);
|
||||
|
||||
protected:
|
||||
void hideOutShowIn(void);
|
||||
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
private:
|
||||
void setNewScene(ccTime dt);
|
||||
|
||||
};
|
||||
|
||||
private:
|
||||
void setNewScene(ccTime dt);
|
||||
|
||||
};
|
||||
|
||||
/** @brief A CCTransition that supports orientation like.
|
||||
* Possible orientation: LeftOver, RightOver, UpOver, DownOver
|
||||
*/
|
||||
|
@ -118,8 +119,8 @@ public:
|
|||
static CCTransitionSceneOriented * transitionWithDuration(ccTime t,CCScene* scene, tOrientation orientation);
|
||||
/** initializes a transition with duration and incoming scene */
|
||||
virtual bool initWithDuration(ccTime t,CCScene* scene,tOrientation orientation);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/** @brief CCTransitionRotoZoom:
|
||||
Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
|
||||
*/
|
||||
|
@ -544,7 +545,7 @@ public:
|
|||
public:
|
||||
DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeDown)
|
||||
};
|
||||
}//namespace cocos2d
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif // __CCTRANSITION_H__
|
||||
|
||||
|
|
|
@ -1,32 +1,33 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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.
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2011 cocos2d-x.org
|
||||
Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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 __CCPAGE_TURN_TRANSITION_H__
|
||||
#define __CCPAGE_TURN_TRANSITION_H__
|
||||
|
||||
#ifndef __CCPAGE_TURN_TRANSITION_H__
|
||||
#define __CCPAGE_TURN_TRANSITION_H__
|
||||
|
||||
#include "CCTransition.h"
|
||||
namespace cocos2d {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
@brief A transition which peels back the bottom right hand corner of a scene
|
||||
|
@ -68,8 +69,8 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
};
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif // __CCPAGE_TURN_TRANSITION_H__
|
||||
|
||||
};
|
||||
}//namespace cocos2d
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue