Skip to content

Commit 76a95f6

Browse files
author
Ming
committed
1 parent 75ad173 commit 76a95f6

22 files changed

+315
-335
lines changed

cocos2dx/CCConfiguration.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ class CCConfiguration : public NSObject
4747
public:
4848
CCConfiguration(void);
4949

50-
// OpenGL Max texture size.
50+
/** OpenGL Max texture size. */
5151
inline int getMaxTextureSize(void)
5252
{
5353
return m_nMaxTextureSize;
5454
}
5555

56-
// OpenGL Max Modelview Stack Depth
56+
/** OpenGL Max Modelview Stack Depth */
5757
inline int getMaxModelviewStackDepth(void)
5858
{
5959
return m_nMaxModelviewStackDepth;
@@ -71,7 +71,7 @@ class CCConfiguration : public NSObject
7171
return m_bSupportsNPOT;
7272
}
7373

74-
// Whether or not PVR Texture Compressed is supported
74+
/** Whether or not PVR Texture Compressed is supported */
7575
inline bool isSupportsPVRTC(void)
7676
{
7777
return m_bSupportsPVRTC;
@@ -93,13 +93,13 @@ class CCConfiguration : public NSObject
9393
return m_bSupportsDiscardFramebuffer;
9494
}
9595

96-
// returns whether or not an OpenGL is supported
96+
/** returns whether or not an OpenGL is supported */
9797
bool checkForGLExtension(const std::string &searchName);
9898

9999
bool init(void);
100100

101101
public:
102-
// returns a shared instance of the CCConfiguration
102+
/** returns a shared instance of the CCConfiguration */
103103
static CCConfiguration* sharedConfiguration(void);
104104
};
105105
}//namespace cocos2d

cocos2dx/effects/CCGrid.h

-9
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ namespace cocos2d
5858
inline CGPoint getStep(void) { return m_obStep; }
5959
inline void setStep(CGPoint step) { m_obStep = step; }
6060

61-
/** texture used, retain */
62-
// inline CCTexture2D* getTexture(void) { return m_pTexture; }
63-
// inline void setTexture(CCTexture2D *pTexture)
64-
// {
65-
// CCX_SAFE_RETAIN(pTexture);
66-
// CCX_SAFE_RELEASE(m_pTexture);
67-
// m_pTexture = pTexture;
68-
// }
69-
7061
/** is texture flipped */
7162
inline bool isTextureFlipped(void) { return m_bIsTextureFlipped; }
7263
void setIsTextureFlipped(bool bFlipped);

cocos2dx/include/CCAction.h

+35-34
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,30 @@ class CCX_DLL CCAction : public NSObject
6767
//! * 0.5 means that the action is in the middle
6868
//! * 1 means that the action is over
6969
virtual void update(ccTime time);
70-
70+
71+
inline CCNode* getTarget(void) { return m_pTarget; }
7172
/** The "target". The action will modify the target properties.
72-
The target will be set with the 'startWithTarget' method.
73-
When the 'stop' method is called, target will be set to nil.
74-
The target is 'assigned', it is not 'retained'.
75-
*/
76-
CCNode* getTarget(void) { return m_pTarget; }
77-
73+
The target will be set with the 'startWithTarget' method.
74+
When the 'stop' method is called, target will be set to nil.
75+
The target is 'assigned', it is not 'retained'.
76+
*/
77+
inline void setTarget(CCNode *pTarget) { m_pTarget = pTarget; }
78+
79+
inline CCNode* getOriginalTarget(void) { return m_pOriginalTarget; }
7880
/** The original target, since target can be nil.
79-
Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
80-
@since v0.8.2
81+
Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
82+
The target is 'assigned', it is not 'retained'.
83+
@since v0.8.2
8184
*/
82-
CCNode* getOriginalTarget(void) { return m_pOriginalTarget; }
85+
inline void setOriginalTarget(CCNode *pOriginalTarget) { m_pOriginalTarget = pOriginalTarget; }
8386

84-
// The action tag. An identifier of the action
85-
int getTag(void) { return m_nTag; }
86-
void setTag(int nTag) { m_nTag = nTag; }
87+
/** The action tag. An identifier of the action */
88+
inline int getTag(void) { return m_nTag; }
89+
//! The tag is 'assigned', it is not 'retained'.
90+
inline void setTag(int nTag) { m_nTag = nTag; }
8791

8892
public:
89-
// Allocates and initializes the action
93+
/** Allocates and initializes the action */
9094
static CCAction* action();
9195

9296
protected:
@@ -107,10 +111,10 @@ class CCX_DLL CCFiniteTimeAction : public CCAction
107111
CCFiniteTimeAction(){}
108112
virtual ~CCFiniteTimeAction(){}
109113
//! duration in seconds of the action
110-
ccTime getDuration(void) { return m_fDuration; }
111-
void setDuration(ccTime duration) { m_fDuration = duration; }
114+
inline ccTime getDuration(void) { return m_fDuration; }
115+
inline void setDuration(ccTime duration) { m_fDuration = duration; }
112116

113-
// returns a reversed action
117+
/** returns a reversed action */
114118
virtual CCFiniteTimeAction* reverse(void);
115119
protected:
116120
//! duration in seconds
@@ -131,13 +135,12 @@ class CCX_DLL CCSpeed : public CCAction
131135
CCSpeed(){}
132136
virtual ~CCSpeed(void);
133137

134-
// alter the speed of the inner function in runtime
135-
float getSpeed(void) { return m_fSpeed; }
136-
void setSpeed(float fSpeed) { m_fSpeed = fSpeed; }
138+
inline float getSpeed(void) { return m_fSpeed; }
139+
/** alter the speed of the inner function in runtime */
140+
inline void setSpeed(float fSpeed) { m_fSpeed = fSpeed; }
137141

138-
// initializes the action
142+
/** initializes the action */
139143
bool initWithAction(CCIntervalAction *pAction, float fRate);
140-
/* CCSpeed* initWithAction(CCRepeatForever *pAction, float fRate);*/
141144

142145
virtual NSObject* copyWithZone(NSZone *pZone);
143146
virtual void startWithTarget(CCNode* pTarget);
@@ -147,20 +150,18 @@ class CCX_DLL CCSpeed : public CCAction
147150
virtual CCIntervalAction* reverse(void);
148151

149152
public:
150-
// creates the action
153+
/** creates the action */
151154
static CCSpeed* actionWithAction(CCIntervalAction *pAction, float fRate);
152-
/*static CCSpeed* actionWithAction(CCRepeatForever *pAction, float fRate);*/
153155

154156
protected:
155157
float m_fSpeed;
156158
CCIntervalAction *m_pOther;
157-
/*CCRepeatForever *m_pRepeat;*/
158159
};
159160

160161
/** CCFollow is an action that "follows" a node.
161162
162163
Eg:
163-
[layer runAction: [CCFollow actionWithTarget:hero]];
164+
layer->runAction(CCFollow::actionWithTarget(hero));
164165
165166
Instead of using CCCamera as a "follower", use this action instead.
166167
@since v0.99.2
@@ -174,15 +175,15 @@ class CCX_DLL CCFollow : public CCAction
174175
public:
175176
CCFollow(){}
176177
virtual ~CCFollow(void);
178+
179+
inline bool isBoundarySet(void) { return m_bBoundarySet; }
180+
/** alter behavior - turn on/off boundary */
181+
inline void setBoudarySet(bool bValue) { m_bBoundarySet = bValue; }
177182

178-
// alter behavior - turn on/off boundary
179-
bool isBoundarySet(void) { return m_bBoundarySet; }
180-
void setBoudarySet(bool bValue) { m_bBoundarySet = bValue; }
181-
182-
// initializes the action
183+
/** initializes the action */
183184
bool initWithTarget(CCNode *pFollowedNode);
184185

185-
// initializes the action with a set boundary
186+
/** initializes the action with a set boundary */
186187
bool initWithTarget(CCNode *pFollowedNode, CGRect rect);
187188

188189
virtual NSObject* copyWithZone(NSZone *pZone);
@@ -191,10 +192,10 @@ class CCX_DLL CCFollow : public CCAction
191192
virtual void stop(void);
192193

193194
public:
194-
// creates the action with no boundary set
195+
/** creates the action with no boundary set */
195196
static CCFollow* actionWithTarget(CCNode *pFollowedNode);
196197

197-
// creates the action with a set boundary
198+
/** creates the action with a set boundary */
198199
static CCFollow* actionWithTarget(CCNode *pFollowedNode, CGRect rect);
199200

200201
protected:

cocos2dx/include/CCActionManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class CCX_DLL CCActionManager : public NSObject, public SelectorProtocol
117117
virtual void selectorProtocolRelease(void);
118118

119119
public:
120-
// returns a shared instance of the CCActionManager
120+
/** returns a shared instance of the CCActionManager */
121121
static CCActionManager* getSharedManager(void);
122122

123123
protected:

cocos2dx/include/CCCamera.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,30 @@ class CCX_DLL CCCamera : public NSObject
5454

5555
char * description(void);
5656

57-
// sets the dirty value
57+
/** sets the dirty value */
5858
inline void setDirty(bool bValue) { m_bDirty = bValue; }
59-
// get the dirty value
59+
/** get the dirty value */
6060
inline bool getDirty(void) { return m_bDirty; }
6161

62-
// sets the camera in the defaul position
62+
/** sets the camera in the default position */
6363
void restore(void);
64-
// Sets the camera using gluLookAt using its eye, center and up_vector
64+
/** Sets the camera using gluLookAt using its eye, center and up_vector */
6565
void locate(void);
66-
// sets the eye values
66+
/** sets the eye values */
6767
void setEyeXYZ(float fEyeX, float fEyeY, float fEyeZ);
68-
// sets the center values
68+
/** sets the center values */
6969
void setCenterXYZ(float fCenterX, float fCenterY, float fCenterZ);
70-
// sets the up values
70+
/** sets the up values */
7171
void setUpXYZ(float fUpX, float fUpY, float fUpZ);
7272

73-
// get the eye vector values
73+
/** get the eye vector values */
7474
void getEyeXYZ(float *pEyeX, float *pEyeY, float *pEyeZ);
75-
// get the center vector values
75+
/** get the center vector values */
7676
void getCenterXYZ(float *pCenterX, float *pCenterY, float *pCenterZ);
77-
// get the up vector values
77+
/** get the up vector values */
7878
void getUpXYZ(float *pUpX, float *pUpY, float *pUpZ);
7979
public:
80-
// returns the Z eye
80+
/** returns the Z eye */
8181
static float getZEye();
8282

8383
private:

0 commit comments

Comments
 (0)