Skip to content

Commit 01644cb

Browse files
committed
Merge pull request #14569 from mogemimi/fix-docs-typo
Fix typos in documentation
2 parents d8f44f5 + be213bf commit 01644cb

19 files changed

+29
-29
lines changed

cocos/2d/CCActionCatmullRom.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class CC_DLL CardinalSplineTo : public ActionInterval
173173
* @code
174174
* When this function bound to js or lua,the input params are changed.
175175
* In js: var create(var t,var table)
176-
* In lua: lcaol create(local t, local table)
176+
* In lua: local create(local t, local table)
177177
* @endcode
178178
*/
179179
static CardinalSplineTo* create(float duration, PointArray* points, float tension);
@@ -249,7 +249,7 @@ class CC_DLL CardinalSplineBy : public CardinalSplineTo
249249
* @code
250250
* When this function bound to js or lua,the input params are changed.
251251
* In js: var create(var t,var table).
252-
* In lua: lcaol create(local t, local table).
252+
* In lua: local create(local t, local table).
253253
* @param duration In seconds.
254254
* @param point An PointArray.
255255
* @param tension Goodness of fit.
@@ -285,7 +285,7 @@ class CC_DLL CatmullRomTo : public CardinalSplineTo
285285
* @code
286286
* When this function bound to js or lua,the input params are changed.
287287
* In js: var create(var dt,var table).
288-
* In lua: lcaol create(local dt, local table).
288+
* In lua: local create(local dt, local table).
289289
* @endcode
290290
*/
291291
static CatmullRomTo* create(float dt, PointArray* points);
@@ -318,7 +318,7 @@ class CC_DLL CatmullRomBy : public CardinalSplineBy
318318
* @code
319319
* When this function bound to js or lua,the input params are changed.
320320
* In js: var create(var dt,var table).
321-
* In lua: lcaol create(local dt, local table).
321+
* In lua: local create(local dt, local table).
322322
* @endcode
323323
*/
324324
static CatmullRomBy* create(float dt, PointArray* points);

cocos/2d/CCActionInterval.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ class CC_DLL Spawn : public ActionInterval
394394
/** Creates the Spawn action.
395395
*
396396
* @param action1 The first spawned action.
397-
* @param action2 THe second spawned action.
397+
* @param action2 The second spawned action.
398398
* @return An autoreleased Spawn object.
399399
* @js NA
400400
*/
@@ -877,7 +877,7 @@ class CC_DLL BezierBy : public ActionInterval
877877
* @code
878878
* When this function bound to js or lua,the input params are changed.
879879
* in js: var create(var t,var table)
880-
* in lua: lcaol create(local t, local table)
880+
* in lua: local create(local t, local table)
881881
* @endcode
882882
*/
883883
static BezierBy* create(float t, const ccBezierConfig& c);
@@ -926,7 +926,7 @@ class CC_DLL BezierTo : public BezierBy
926926
* @code
927927
* when this function bound to js or lua,the input params are changed
928928
* in js: var create(var t,var table)
929-
* in lua: lcaol create(local t, local table)
929+
* in lua: local create(local t, local table)
930930
* @endcode
931931
*/
932932
static BezierTo* create(float t, const ccBezierConfig& c);

cocos/2d/CCAtlasNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol
139139
ssize_t _quadsToDraw;
140140
/** Color uniform. */
141141
GLint _uniformColor;
142-
/** This varible is only used for LabelAtlas FPS display. So plz don't modify its value. */
142+
/** This variable is only used for LabelAtlas FPS display. So plz don't modify its value. */
143143
bool _ignoreContentScaleFactor;
144144
/** Quad command. */
145145
QuadCommand _quadCommand;

cocos/2d/CCCameraBackgroundBrush.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class CC_DLL CameraBackgroundSkyBoxBrush : public CameraBackgroundBrush
227227
*/
228228
static CameraBackgroundSkyBoxBrush* create();
229229
/**
230-
* Set skybox texutre
230+
* Set skybox texture
231231
* @param texture Skybox texture
232232
*/
233233
void setTexture(TextureCube* texture);

cocos/2d/CCFastTMXLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class CC_DLL TMXLayer : public Node
276276
void updateTiles(const Rect& culledRect);
277277
Vec2 calculateLayerOffset(const Vec2& offset);
278278

279-
/* The layer recognizes some special properties, like cc_vertez */
279+
/* The layer recognizes some special properties, like cc_vertexz */
280280
void parseInternalProperties();
281281

282282
Mat4 tileToNodeTransform();

cocos/2d/CCNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ class CC_DLL Node : public Ref
18091809
std::string _name; ///<a string label, an user defined string to identify this node
18101810
size_t _hashOfName; ///<hash value of _name, used for speed in getChildByName
18111811

1812-
void *_userData; ///< A user assingned void pointer, Can be point to any cpp object
1812+
void *_userData; ///< A user assigned void pointer, Can be point to any cpp object
18131813
Ref *_userObject; ///< A user assigned Object
18141814

18151815
GLProgramState *_glProgramState; ///< OpenGL Program State

cocos/2d/CCSpriteBatchNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class CC_DLL SpriteBatchNode : public Node, public TextureProtocol
213213
virtual std::string getDescription() const override;
214214

215215
/** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
216-
* This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
216+
* This method should be called only when you are dealing with very big AtlasSprite and when most of the Sprite won't be updated.
217217
* For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont).
218218
*/
219219
void insertQuadFromSprite(Sprite *sprite, ssize_t index);
@@ -248,7 +248,7 @@ class CC_DLL SpriteBatchNode : public Node, public TextureProtocol
248248

249249
protected:
250250
/** Updates a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
251-
This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
251+
This method should be called only when you are dealing with very big AtlasSprite and when most of the Sprite won't be updated.
252252
For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont)
253253
*/
254254
void updateQuadFromSprite(Sprite *sprite, ssize_t index);

cocos/2d/CCTMXLayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class CC_DLL TMXLayer : public SpriteBatchNode
282282
// Override
283283
//
284284
/** TMXLayer doesn't support adding a Sprite manually.
285-
@warning addchild(z, tag); is not supported on TMXLayer. Instead of setTileGID.
285+
@warning addChild(z, tag); is not supported on TMXLayer. Instead of setTileGID.
286286
*/
287287
using SpriteBatchNode::addChild;
288288
virtual void addChild(Node * child, int zOrder, int tag) override;
@@ -305,7 +305,7 @@ class CC_DLL TMXLayer : public SpriteBatchNode
305305
Sprite* insertTileForGID(uint32_t gid, const Vec2& pos);
306306
Sprite* updateTileForGID(uint32_t gid, const Vec2& pos);
307307

308-
/* The layer recognizes some special properties, like cc_vertez */
308+
/* The layer recognizes some special properties, like cc_vertexz */
309309
void parseInternalProperties();
310310
void setupTileSprite(Sprite* sprite, Vec2 pos, int gid);
311311
Sprite* reusedTileWithRect(Rect rect);

cocos/base/CCAutoreleasePool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NS_CC_BEGIN
3737

3838

3939
/**
40-
* A pool for managing autorlease objects.
40+
* A pool for managing autorelease objects.
4141
* @js NA
4242
*/
4343
class CC_DLL AutoreleasePool

cocos/base/CCEventController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class EventController : public Event
6262
* @return An autoreleased EventController object.
6363
*/
6464
EventController(ControllerEventType type, Controller* controller, int keyCode);
65-
/** Create a EventController with controller event type, contrlloer and whether or not is connected.
65+
/** Create a EventController with controller event type, controller and whether or not is connected.
6666
*
6767
* @param type A given controller event type.
6868
* @param controller A given controller pointer.

cocos/base/CCProperties.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class CC_DLL Properties
521521
static bool parseAxisAngle(const char* str, Quaternion* out);
522522

523523
/**
524-
* Atempts to parse the specified string as an RGB color value.
524+
* Attempts to parse the specified string as an RGB color value.
525525
*
526526
* @param str The string to parse.
527527
* @param out The value to populate if successful.
@@ -531,7 +531,7 @@ class CC_DLL Properties
531531
static bool parseColor(const char* str, Vec3* out);
532532

533533
/**
534-
* Atempts to parse the specified string as an RGBA color value.
534+
* Attempts to parse the specified string as an RGBA color value.
535535
*
536536
* @param str The string to parse.
537537
* @param out The value to populate if successful.

cocos/base/CCScheduler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class CC_DLL Scheduler : public Ref
367367
*/
368368
bool isScheduled(const std::string& key, void *target);
369369

370-
/** Checks whether a selector for a given taget is scheduled.
370+
/** Checks whether a selector for a given target is scheduled.
371371
@param selector The selector to be checked.
372372
@param target The target of the callback.
373373
@return True if the specified selector is invoked, false if not.
@@ -475,7 +475,7 @@ class CC_DLL Scheduler : public Ref
475475
*/
476476
CC_DEPRECATED_ATTRIBUTE void unscheduleSelector(SEL_SCHEDULE selector, Ref *target) { unschedule(selector, target); };
477477

478-
/** Checks whether a selector for a given taget is scheduled.
478+
/** Checks whether a selector for a given target is scheduled.
479479
@deprecated Please use 'Scheduler::isScheduled' instead.
480480
@since v0.99.3
481481
@js NA

cocos/base/CCValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class CC_DLL Value
9696
/** Create a Value by a ValueMapIntKey object. It will use std::move internally. */
9797
explicit Value(ValueMapIntKey&& v);
9898

99-
/** Create a Value by anthoer Value object. */
99+
/** Create a Value by another Value object. */
100100
Value(const Value& other);
101101
/** Create a Value by a Value object. It will use std::move internally. */
102102
Value(Value&& other);

cocos/base/ZipUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ typedef struct unz_file_info_s unz_file_info;
169169
*
170170
* Splitting the key into 4 parts and calling the function from 4 different source
171171
* files increases the difficulty to reverse engineer the encryption key.
172-
* Be aware that encrpytion is *never* 100% secure and the key code
172+
* Be aware that encryption is *never* 100% secure and the key code
173173
* can be cracked by knowledgable persons.
174174
*
175175
* IMPORTANT: Be sure to call setPvrEncryptionKey or

cocos/base/ccTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ struct CC_DLL FontDefinition
556556
TextHAlignment _alignment;
557557
/// vertical alignment
558558
TextVAlignment _vertAlignment;
559-
/// renering box
559+
/// rendering box
560560
Size _dimensions;
561561
/// font color
562562
Color3B _fontFillColor;

cocos/deprecated/CCDeprecated.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ CC_DEPRECATED_ATTRIBUTE static inline Vec2 ccpFromSize(const Size& s)
261261
}
262262

263263
/** Run a math operation function on each point component
264-
* absf, fllorf, ceilf, roundf
264+
* absf, floorf, ceilf, roundf
265265
* any function that has the signature: float func(float);
266266
* For example: let's try to take the floor of x,y
267267
* ccpCompOp(p,floorf);

cocos/deprecated/CCDictionary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/****************************************************************************
22
Copyright (c) 2012 cocos2d-x.org
3-
opyright (c) 2013-2015 Chukong Technologies Inc.
3+
Copyright (c) 2013-2015 Chukong Technologies Inc.
44
55
http://www.cocos2d-x.org
66

cocos/math/Vec2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class CC_DLL Vec2
568568
}
569569

570570
/** Run a math operation function on each point component
571-
* absf, fllorf, ceilf, roundf
571+
* absf, floorf, ceilf, roundf
572572
* any function that has the signature: float func(float);
573573
* For example: let's try to take the floor of x,y
574574
* p.compOp(floorf);
@@ -662,7 +662,7 @@ class CC_DLL Vec2
662662
@param D the endpoint for the second line L2 = (C - D)
663663
@param S the range for a hitpoint in L1 (p = A + S*(B - A))
664664
@param T the range for a hitpoint in L2 (p = C + T*(D - C))
665-
@returns whether these two lines interects.
665+
@return whether these two lines intersects.
666666
667667
Note that to truly test intersection for segments we have to make
668668
sure that S & T lie within [0..1] and for rays, make sure S & T > 0

cocos/math/Vec3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class CC_DLL Vec3
275275
/**
276276
* Normalizes this vector.
277277
*
278-
* This method normalizes this Vect3 so that it is of
278+
* This method normalizes this Vec3 so that it is of
279279
* unit length (in other words, the length of the vector
280280
* after calling this method will be 1.0f). If the vector
281281
* already has unit length or if the length of the vector

0 commit comments

Comments
 (0)