issue #5 : add include

This commit is contained in:
Walzer 2010-07-14 03:18:05 +00:00
parent 3e89679570
commit ee1a33867c
5 changed files with 22 additions and 21 deletions

View File

@ -45,8 +45,8 @@ CCNode::CCNode(void)
,m_fVertexZ(0.0f)
,m_pGrid(NULL)
,m_bIsVisible(true)
,m_iTag(kCCNodeTagInvalid)
,m_iZOrder(0)
,m_nTag(kCCNodeTagInvalid)
,m_nZOrder(0)
// lazy alloc
,m_pCamera(NULL)
// children (lazy allocs)
@ -94,14 +94,14 @@ void CCNode::arrayMakeObjectsPerformSelector(NSMutableArray * pArray, callbackFu
/// zOrder getter
int CCNode::getZOrder()
{
return m_iZOrder;
return m_nZOrder;
}
/// zOrder setter : private method
/// used internally to alter the zOrder variable. DON'T call this method manually
void CCNode::setZOrder(int z)
{
m_iZOrder = z;
m_nZOrder = z;
}
/// ertexZ getter
@ -333,13 +333,13 @@ void CCNode::setIsRelativeAnchorPoint(bool newValue)
/// tag getter
int CCNode::getTag()
{
return m_iTag;
return m_nTag;
}
/// tag setter
void CCNode::setTag(int var)
{
m_iTag = var;
m_nTag = var;
}
/// userData getter
@ -424,7 +424,7 @@ CCNode* CCNode::getChildByTag(int aTag)
for( it = m_pChildren->begin(); it != m_pChildren->end(); it++)
{
pNode = static_cast<CCNode*>(*it);
if(pNode && pNode->m_iTag == aTag)
if(pNode && pNode->m_nTag == aTag)
return pNode;
}
}
@ -445,7 +445,7 @@ CCNode * CCNode::addChild(CCNode *child, int zOrder, int tag)
this->insertChild(child, zOrder);
child->m_iTag = tag;
child->m_nTag = tag;
child->setParent(this);
@ -457,13 +457,13 @@ CCNode * CCNode::addChild(CCNode *child, int zOrder, int tag)
CCNode * CCNode::addChild(CCNode *child, int zOrder)
{
NSAssert( child != NULL, "Argument must be non-nil");
return this->addChild(child, zOrder, child->m_iTag);
return this->addChild(child, zOrder, child->m_nTag);
}
CCNode * CCNode::addChild(CCNode *child)
{
NSAssert( child != NULL, "Argument must be non-nil");
return this->addChild(child, child->m_iZOrder, child->m_iTag);
return this->addChild(child, child->m_nZOrder, child->m_nTag);
}
void CCNode::removeFromParentAndCleanup(bool cleanup)
@ -563,7 +563,7 @@ void CCNode::insertChild(CCNode* child, int z)
{
pNode = static_cast<CCNode*>(*it);
if ( pNode && pNode->m_iZOrder > z )
if ( pNode && pNode->m_nZOrder > z )
{
added = true;
m_pChildren->insertObjectAtIndex(child, index);

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#define __COCOA_SELECTOR_PROTOCOL_H__
#include "ccTypes.h"
#include "cocoa/NSObject.h"
#include "NSObject.h"
class CCNode;

View File

@ -42,9 +42,9 @@ class CCAtlasNode : public CCNode, public CCRGBAProtocol, public CCTextureProtoc
protected:
// chars per row
int m_iItemsPerRow;
int m_nItemsPerRow;
// chars per column
int m_iItemsPerColumn;
int m_nItemsPerColumn;
// texture coordinate x increment
float m_fTexStepX;
@ -52,9 +52,9 @@ protected:
float m_fTexStepY;
// width of each char
int m_iItemWidth;
int m_nItemWidth;
// height of each char
int m_iItemHeight;
int m_nItemHeight;
ccColor3B m_tColorUnmodified;
bool m_bOpacityModifyRGB;

View File

@ -136,7 +136,7 @@ Features:
class CCMultiplexLayer : public CCLayer
{
protected:
unsigned int m_iEnabledLayer;
unsigned int m_nEnabledLayer;
NSMutableArray * m_pLayers;
public:

View File

@ -28,11 +28,12 @@ THE SOFTWARE.
#include <GLES/gl.h>
#include "Cocos2dDefine.h"
#include "CCCamera.h"
#include "ccMacros.h"
#include "../cocoa/CGGeometry.h"
#include "../cocoa/NSMutableArray.h"
#include "CCCamera.h"
#include "../cocoa/selector_protocol.h"
#include "../effects/CCGrid.h"
#include "ccMacros.h"
enum {
kCCNodeTagInvalid = -1,
@ -98,7 +99,7 @@ class CCNode : public NSObject, public SelectorProtocol
// variable property
/** The z order of the node relative to it's "brothers": children of the same parent */
CCX_PROPERTY_READONLY(int, m_iZOrder, ZOrder)
CCX_PROPERTY_READONLY(int, m_nZOrder, ZOrder)
/** The real openGL Z vertex.
Differences between openGL Z vertex and cocos2d Z order:
@ -171,7 +172,7 @@ class CCNode : public NSObject, public SelectorProtocol
CCX_PROPERTY(bool, m_bIsRelativeAnchorPoint, IsRelativeAnchorPoint)
/** A tag used to identify the node easily */
CCX_PROPERTY(int, m_iTag, Tag)
CCX_PROPERTY(int, m_nTag, Tag)
/** A custom user data pointer */
CCX_PROPERTY(void *, m_pUserData, UserData)