Skip to content

Commit ea23549

Browse files
committed
Merge pull request cocos2d#14614 from mogemimi/fix-doc-and-comment-typo
Fix typo in documentation and comments
2 parents b1480c3 + f280a31 commit ea23549

24 files changed

+35
-35
lines changed

cocos/2d/CCFontAtlasCache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CC_DLL FontAtlasCache
5454
*/
5555
static void purgeCachedData();
5656

57-
/** Release current FNT texutre and reload it.
57+
/** Release current FNT texture and reload it.
5858
CAUTION : All component use this font texture should be reset font name, though the file name is same!
5959
otherwise, it will cause program crash!
6060
*/

cocos/2d/CCLabel.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ bool Label::setBMFontFilePath(const std::string& bmfontFilePath, const Vec2& ima
586586
return false;
587587
}
588588

589-
//asign the default fontSize
589+
//assign the default fontSize
590590
if (fabs(fontSize) < FLT_EPSILON) {
591591
FontFNT *bmFont = (FontFNT*)newAtlas->getFont();
592592
if (bmFont) {
@@ -1939,7 +1939,7 @@ float Label::getRenderingFontSize()const
19391939
fontSize = this->getTTFConfig().fontSize;
19401940
}else if(_currentLabelType == LabelType::STRING_TEXTURE){
19411941
fontSize = _systemFontSize;
1942-
}else{ //FIXME: find a way to caculate char map font size
1942+
}else{ //FIXME: find a way to calculate char map font size
19431943
fontSize = this->getLineHeight();
19441944
}
19451945
return fontSize;

cocos/2d/CCRenderTexture.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ Image* RenderTexture::newImage(bool fliimage)
496496
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO);
497497
glBindFramebuffer(GL_FRAMEBUFFER, _FBO);
498498

499-
// TODO: move this to configration, so we don't check it every time
499+
// TODO: move this to configuration, so we don't check it every time
500500
/* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers.
501501
*/
502502
if (Configuration::getInstance()->checkForGLExtension("GL_QCOM"))
@@ -581,7 +581,7 @@ void RenderTexture::onBegin()
581581
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO);
582582
glBindFramebuffer(GL_FRAMEBUFFER, _FBO);
583583

584-
// TODO: move this to configration, so we don't check it every time
584+
// TODO: move this to configuration, so we don't check it every time
585585
/* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers.
586586
*/
587587
if (Configuration::getInstance()->checkForGLExtension("GL_QCOM"))

cocos/3d/CCMesh.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ class CC_DLL Mesh : public Ref
9696
int getVertexSizeInBytes() const;
9797

9898
/**
99-
* set texture (diffuse), which is responsible for the main apearence. It is also means main textrue, you can also call setTexture(texPath, NTextureData::Usage::Diffuse)
99+
* set texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call setTexture(texPath, NTextureData::Usage::Diffuse)
100100
* @param texPath texture path
101101
*/
102102
void setTexture(const std::string& texPath);
103103
/**
104-
* set texture (diffuse), which is responsible for the main apearence. It is also means main textrue, you can also call setTexture(texPath, NTextureData::Usage::Diffuse)
104+
* set texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call setTexture(texPath, NTextureData::Usage::Diffuse)
105105
* @param tex texture to be set
106106
*/
107107
void setTexture(Texture2D* tex);
@@ -118,14 +118,14 @@ class CC_DLL Mesh : public Ref
118118
*/
119119
void setTexture(const std::string& texPath, NTextureData::Usage usage);
120120
/**
121-
* Get texture (diffuse), which is responsible for the main apearence. It is also means main textrue, you can also call getTexture(NTextureData::Usage::Diffuse)
121+
* Get texture (diffuse), which is responsible for the main appearance. It is also means main texture, you can also call getTexture(NTextureData::Usage::Diffuse)
122122
* @return Texture used, return the texture of first mesh if multiple meshes exist
123123
*/
124124
Texture2D* getTexture() const;
125125
/**
126-
* Get textrue
126+
* Get texture
127127
* @param usage Usage of returned texture
128-
* @return The texture of this usage, return the textrue of first mesh if multiple meshes exist
128+
* @return The texture of this usage, return the texture of first mesh if multiple meshes exist
129129
*/
130130
Texture2D* getTexture(NTextureData::Usage usage);
131131

@@ -230,7 +230,7 @@ class CC_DLL Mesh : public Ref
230230
void checkTexture();
231231

232232
/**
233-
* set enable check texture, check texture each frame if eanble is true. It is false by default
233+
* set enable check texture, check texture each frame if enable is true. It is false by default
234234
*/
235235
void setEnableCheckTexture(bool enableCheckTexture) { _enableCheckTexture = enableCheckTexture; }
236236
/**

cocos/3d/CCMeshSkin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Skeleton3D;
4343

4444
/**
4545
* @brief MeshSkin, A class maintain a collection of bones that affect Mesh vertex.
46-
* And it is responsible for computing matrix palletes that used by skin mesh rendering.
46+
* And it is responsible for computing matrix palettes that used by skin mesh rendering.
4747
* @js NA
4848
* @lua NA
4949
*/

cocos/3d/CCObjLoader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Copyright 2012-2015, Syoyo Fujita.
33
//
4-
// Licensed under 2-clause BSD liecense.
4+
// Licensed under 2-clause BSD license.
55
//
66

77
//

cocos/3d/CCObjLoader.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Copyright 2012-2015, Syoyo Fujita.
33
//
4-
// Licensed under 2-clause BSD liecense.
4+
// Licensed under 2-clause BSD license.
55
//
66
//https://github.com/syoyo/tinyobjloader
77
#ifndef _TINY_OBJ_LOADER_H

cocos/3d/CCTerrain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class CC_DLL Terrain : public Node
265265

266266
/**
267267
*QuadTree
268-
* @breif use to hierarchically frustum culling and set LOD
268+
* @brief use to hierarchically frustum culling and set LOD
269269
**/
270270
struct CC_DLL QuadTree
271271
{

cocos/audio/ios/CDAudioManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ typedef enum {
120120
-(void) load:(NSString*) filePath;
121121
/** Plays the audio source */
122122
-(void) play;
123-
/** Stops playing the audio soruce */
123+
/** Stops playing the audio source */
124124
-(void) stop;
125125
/** Pauses the audio source */
126126
-(void) pause;

cocos/audio/ios/CDAudioManager.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ -(void) dealloc {
6161
}
6262

6363
-(void) load:(NSString*) filePath {
64-
//We have alread loaded a file previously, check if we are being asked to load the same file
64+
//We have already loaded a file previously, check if we are being asked to load the same file
6565
if (state == kLAS_Init || ![filePath isEqualToString:audioSourceFilePath]) {
6666
CDLOGINFO(@"Denshion::CDLongAudioSource - Loading new audio source %@",filePath);
6767
//New file
@@ -627,7 +627,7 @@ -(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandl
627627
- (void) applicationWillResignActive {
628628
_resigned = YES;
629629

630-
//Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume
630+
//Set the audio session to one that allows sharing so that other audio won't be clobbered on resume
631631
[self audioSessionSetCategory:AVAudioSessionCategoryAmbient];
632632

633633
switch (_resignBehavior) {

cocos/audio/mac/CDAudioManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ typedef enum {
119119
-(void) load:(NSString*) filePath;
120120
/** Plays the audio source */
121121
-(void) play;
122-
/** Stops playing the audio soruce */
122+
/** Stops playing the audio source */
123123
-(void) stop;
124124
/** Pauses the audio source */
125125
-(void) pause;

cocos/audio/mac/CDAudioManager.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ -(void) dealloc {
6060
}
6161

6262
-(void) load:(NSString*) filePath {
63-
//We have alread loaded a file previously, check if we are being asked to load the same file
63+
//We have already loaded a file previously, check if we are being asked to load the same file
6464
if (state == kLAS_Init || ![filePath isEqualToString:audioSourceFilePath]) {
6565
CDLOGINFO(@"Denshion::CDLongAudioSource - Loading new audio source %@",filePath);
6666
//New file
@@ -621,7 +621,7 @@ -(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandl
621621
- (void) applicationWillResignActive {
622622
_resigned = YES;
623623

624-
//Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume
624+
//Set the audio session to one that allows sharing so that other audio won't be clobbered on resume
625625
[self audioSessionSetCategory:AVAudioSessionCategoryAmbient];
626626

627627
switch (_resignBehavior) {

cocos/audio/win32/MciPlayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void MciPlayer::Resume()
143143
{
144144
if (strExt == ".mid")
145145
{
146-
// midi not supprt MCI_RESUME, should get the position and use MCI_FROM
146+
// midi not support MCI_RESUME, should get the position and use MCI_FROM
147147
MCI_STATUS_PARMS mciStatusParms;
148148
MCI_PLAY_PARMS mciPlayParms;
149149
mciStatusParms.dwItem = MCI_STATUS_POSITION;

cocos/audio/winrt/Audio.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Audio
122122
void Start();
123123
void Render();
124124

125-
// This flag can be used to tell when the audio system is experiencing critial errors.
125+
// This flag can be used to tell when the audio system is experiencing critical errors.
126126
// XAudio2 gives a critical error when the user unplugs their headphones, and a new
127127
// speaker configuration is generated.
128128
void SetEngineExperiencedCriticalError()

cocos/base/CCDirector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ void Director::setNextDeltaTimeZero(bool nextDeltaTimeZero)
445445
//
446446
// FIXME TODO
447447
// Matrix code MUST NOT be part of the Director
448-
// MUST BE moved outide.
448+
// MUST BE moved outside.
449449
// Why the Director must have this code ?
450450
//
451451
void Director::initMatrixStack()

cocos/base/ZipUtils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ typedef struct unz_file_info_s unz_file_info;
225225
* Zip file - reader helper class.
226226
*
227227
* It will cache the file list of a particular zip file with positions inside an archive,
228-
* so it would be much faster to read some particular files or to check their existance.
228+
* so it would be much faster to read some particular files or to check their existence.
229229
*
230230
* @since v2.0.5
231231
*/
@@ -258,7 +258,7 @@ typedef struct unz_file_info_s unz_file_info;
258258
/**
259259
* Check does a file exists or not in zip file
260260
*
261-
* @param fileName File to be checked on existance
261+
* @param fileName File to be checked on existence
262262
* @return true whenever file exists, false otherwise
263263
*
264264
* @since v2.0.5

cocos/base/ccUTF8.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool isCJKUnicode(char16_t ch)
8989
|| (ch >= 0xAC00 && ch <= 0xD7AF) // Hangul Syllables
9090
|| (ch >= 0xF900 && ch <= 0xFAFF) // CJK Compatibility Ideographs
9191
|| (ch >= 0xFE30 && ch <= 0xFE4F) // CJK Compatibility Forms
92-
|| (ch >= 0x31C0 && ch <= 0x4DFF); // Other exiensions
92+
|| (ch >= 0x31C0 && ch <= 0x4DFF); // Other extensions
9393
}
9494

9595
void trimUTF16Vector(std::vector<char16_t>& str)

cocos/math/Vec2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
NS_CC_MATH_BEGIN
2626

27-
// returns true if segment A-B intersects with segment C-D. S->E is the ovderlap part
27+
// returns true if segment A-B intersects with segment C-D. S->E is the overlap part
2828
bool isOneDimensionSegmentOverlap(float A, float B, float C, float D, float *S, float * E)
2929
{
3030
float ABmin = std::min(A, B);

cocos/renderer/CCGroupCommand.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class GroupCommandManager : public Ref
5757

5858
/**
5959
GroupCommand is used to group several command together, and more, it can be nested.
60-
So it is used to generate the hierarchy for the rendcommands. Evey group command will be assigned by a group ID.
60+
So it is used to generate the hierarchy for the rendcommands. Every group command will be assigned by a group ID.
6161
*/
6262
class CC_DLL GroupCommand : public RenderCommand
6363
{

cocos/renderer/CCPass.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ class CC_DLL Pass : public RenderState
5757
GLProgramState* getGLProgramState() const;
5858

5959
/** Binds the GLProgramState and the RenderState.
60-
This method must be called before call the actuall draw call.
60+
This method must be called before call the actual draw call.
6161
*/
6262
void bind(const Mat4& modelView);
6363
void bind(const Mat4& modelView, bool bindAttributes);
6464

6565
/** Unbinds the Pass.
66-
This method must be called AFTER calling the actuall draw call
66+
This method must be called AFTER calling the actual draw call
6767
*/
6868
void unbind();
6969

cocos/renderer/CCRenderState.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ RenderState::StateBlock* RenderState::StateBlock::create()
197197
}
198198

199199
//
200-
// The defaults are based on GamePlay3D defaults, with the following chagnes
200+
// The defaults are based on GamePlay3D defaults, with the following changes
201201
// _depthWriteEnabled is FALSE
202202
// _depthTestEnabled is TRUE
203203
// _blendEnabled is TRUE

cocos/renderer/CCRenderer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ void Renderer::drawBatchedTriangles()
869869
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _filledIndex, _indices, GL_STATIC_DRAW);
870870
}
871871

872-
//Start drawing verties in batch
872+
//Start drawing vertices in batch
873873
for(const auto& cmd : _batchedCommands)
874874
{
875875
auto newMaterialID = cmd->getMaterialID();

cocos/renderer/CCTextureCache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class CC_DLL TextureCache : public Ref
207207
void setDirty(bool dirty) { _dirty = dirty; }
208208
bool isDirty() const { return _dirty; }
209209

210-
/** Reload texuture from a new file.
210+
/** Reload texture from a new file.
211211
* This function is mainly for editor, won't suggest use it in game for performance reason.
212212
*
213213
* @param srcName Original texture file name.

cocos/renderer/CCTrianglesCommand.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CC_DLL TrianglesCommand : public RenderCommand
5454
/**The number of indices.*/
5555
ssize_t indexCount;
5656
};
57-
/**Construtor.*/
57+
/**Constructor.*/
5858
TrianglesCommand();
5959
/**Destructor.*/
6060
~TrianglesCommand();

0 commit comments

Comments
 (0)