Skip to content

Commit

Permalink
Fix minor typos in comments and docs (cocos2d#17294)
Browse files Browse the repository at this point in the history
  • Loading branch information
mogemimi authored and minggo committed Feb 7, 2017
1 parent e2ad894 commit 75d2e76
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
8 changes: 4 additions & 4 deletions cocos/2d/CCDrawNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ bool DrawNode::init()
// color
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
// texcood
// texcoord
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));

Expand All @@ -236,7 +236,7 @@ bool DrawNode::init()
// color
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
// texcood
// texcoord
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));

Expand Down Expand Up @@ -346,7 +346,7 @@ void DrawNode::onDraw(const Mat4 &transform, uint32_t /*flags*/)
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices));
// color
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
// texcood
// texcoord
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
}

Expand Down Expand Up @@ -389,7 +389,7 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t /*flags*/)
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, vertices));
// color
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, colors));
// texcood
// texcoord
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
}

Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ bool Label::alignText()
{
return true;
}
// optimize for one-texture-only sceneario
// optimize for one-texture-only scenario
// if multiple textures, then we should count how many chars
// are per texture
if (_batchNodes.size()==1)
Expand Down
2 changes: 1 addition & 1 deletion cocos/editor-support/cocostudio/CCDataReaderHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CC_STUDIO_DLL DataReaderHelper : cocos2d::Ref

/**
* Translate XML export from Dragon Bone flash tool to datas, and save them.
* When you add a new xml, the data already saved will be keeped.
* When you add a new xml, the data already saved will be kept.
*
* @param xmlPath The cache of the xml
*/
Expand Down
4 changes: 2 additions & 2 deletions cocos/network/SocketIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ class CC_DLL SocketIO
*/
virtual void onMessage(SIOClient* client, const std::string& data) { CCLOG("SIODelegate onMessage fired with data: %s", data.c_str()); };
/**
* Pure virtual callback function, this function should be overrided by the subclass.
* Pure virtual callback function, this function should be overridden by the subclass.
*
* This function would be called when the related SIOClient object disconnect or receive disconnect signal.
*
* @param client the connected SIOClient object.
*/
virtual void onClose(SIOClient* client) = 0;
/**
* Pure virtual callback function, this function should be overrided by the subclass.
* Pure virtual callback function, this function should be overridden by the subclass.
*
* This function would be called when the related SIOClient object receive error signal or didn't connect the endpoint but do some network operation, eg.,send and emit,etc.
*
Expand Down
4 changes: 2 additions & 2 deletions cocos/renderer/CCGLProgram.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class CC_DLL GLProgram : public Ref
*/

/** @{
Create or Initializes the GLProgram with a vertex and fragment with bytes array, with shader headers defination(eg. #version ... or #extension ...), with compileTimeDefines(eg. #define ...).
Create or Initializes the GLProgram with a vertex and fragment with bytes array, with shader headers definition(eg. #version ... or #extension ...), with compileTimeDefines(eg. #define ...).
* @js initWithString.
* @lua initWithString.
*/
Expand All @@ -391,7 +391,7 @@ class CC_DLL GLProgram : public Ref
*/

/** @{
Create or Initializes the GLProgram with a vertex and fragment with contents of filenames, with shader headers defination(eg. #version ... or #extension ...), with compileTimeDefines(eg. #define ...).
Create or Initializes the GLProgram with a vertex and fragment with contents of filenames, with shader headers definition(eg. #version ... or #extension ...), with compileTimeDefines(eg. #define ...).
* @js init
* @lua init
*/
Expand Down
2 changes: 1 addition & 1 deletion cocos/scripting/js-bindings/manual/ScriptingCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class CC_JS_DLL ScriptingCore : public cocos2d::ScriptEngineProtocol
JSObject* getGlobalObject() { return _global->get(); }

/**@~english
* Checks whether a C++ function is overrided in js prototype chain
* Checks whether a C++ function is overridden in js prototype chain
* @param obj @~english The js object
* @param name @~english The function name
* @param native @~english The native function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ CCLabelAtlas.create = CCLabelAtlasDeprecated.create


---------------------------
--global functions wil be deprecated, begin
--global functions will be deprecated, begin
local function CCRectMake(x,y,width,height)
deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua")
return cc.rect(x,y,width,height)
Expand Down Expand Up @@ -345,7 +345,7 @@ local function ccc4FEqual(a,b)
return a:equals(b)
end
_G.ccc4FEqual = ccc4FEqual
--global functions wil be deprecated, end
--global functions will be deprecated, end


--functions of _G will be deprecated begin
Expand Down
32 changes: 16 additions & 16 deletions cocos/ui/UIScale9Sprite.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace ui {
/**
* Creates a 9-slice sprite with an sprite frame.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @see initWithSpriteFrame(SpriteFrame *spriteFrame)
Expand All @@ -155,7 +155,7 @@ namespace ui {
/**
* Creates a 9-slice sprite with an sprite frame and the centre of its zone.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @see initWithSpriteFrame(SpriteFrame *spriteFrame, const Rect& capInsets)
Expand All @@ -168,7 +168,7 @@ namespace ui {
/**
* Creates a 9-slice sprite with an sprite frame name.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @see initWithSpriteFrameName(const char *spriteFrameName)
Expand All @@ -180,7 +180,7 @@ namespace ui {
/**
* Creates a 9-slice sprite with an sprite frame name and the centre of its zone.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @see initWithSpriteFrameName(const char *spriteFrameName, const Rect& capInsets)
Expand All @@ -200,7 +200,7 @@ namespace ui {
* Initializes a 9-slice sprite with a texture file, a delimitation zone and
* with the specified cap insets.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param file The name of the texture file.
Expand All @@ -216,7 +216,7 @@ namespace ui {
* Initializes a 9-slice sprite with a texture file and with the specified cap
* insets.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param file The name of the texture file.
Expand All @@ -229,7 +229,7 @@ namespace ui {
* Initializes a 9-slice sprite with an sprite frame and with the specified
* cap insets.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param spriteFrame The sprite frame object.
Expand All @@ -242,7 +242,7 @@ namespace ui {
* Initializes a 9-slice sprite with an sprite frame name and with the specified
* cap insets.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param spriteFrameName The sprite frame name.
Expand All @@ -257,7 +257,7 @@ namespace ui {
* Initializes a 9-slice sprite with a texture file and a delimitation zone. The
* texture will be broken down into a 3×3 grid of equal blocks.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param file The name of the texture file.
Expand All @@ -272,7 +272,7 @@ namespace ui {
* Initializes a 9-slice sprite with a texture file. The whole texture will be
* broken down into a 3×3 grid of equal blocks.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param file The name of the texture file.
Expand All @@ -283,7 +283,7 @@ namespace ui {
/**
* Initializes a 9-slice sprite with an sprite frame name.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param spriteFrameName The sprite frame name.
Expand All @@ -296,7 +296,7 @@ namespace ui {
/**
* @brief Initializes a 9-slice sprite with an sprite instance.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param sprite The sprite instance.
Expand All @@ -310,7 +310,7 @@ namespace ui {
/**
* @brief Initializes a 9-slice sprite with an sprite instance.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param sprite The sprite instance.
Expand All @@ -323,7 +323,7 @@ namespace ui {
/**
* @brief Initializes a 9-slice sprite with an sprite instance.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @param sprite The sprite instance.
Expand All @@ -344,7 +344,7 @@ namespace ui {
/**
* @brief Initializes a 9-slice sprite with a sprite batchnode.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @deprecated Use @see `init` instead.
Expand All @@ -361,7 +361,7 @@ namespace ui {
/**
* @brief Initializes a 9-slice sprite with a sprite batch node.
* Once the sprite is created, you can then call its "setContentSize:" method
* to resize the sprite will all it's 9-slice goodness intract.
* to resize the sprite will all it's 9-slice goodness interact.
* It respects the anchorPoint too.
*
* @deprecated Use @see `init` instead.
Expand Down
2 changes: 1 addition & 1 deletion extensions/Particle3D/PU/CCPUPointEmitterTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ PUPointEmitterTranslator::PUPointEmitterTranslator()
//-------------------------------------------------------------------------
bool PUPointEmitterTranslator::translateChildProperty( PUScriptCompiler* /*compiler*/, PUAbstractNode* /*node*/ )
{
// No Propertys
// No properties
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/cpp-empty-test/Classes/AppMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
We check current device frame size to decide which resource need to be selected.
So if you want to test this situation which said in title '[Situation 1]',
you should change ios simulator to different device(e.g. iphone, iphone-retina3.5, iphone-retina4.0, ipad, ipad-retina),
or change the window size in "proj.XXX/main.cpp" by "CCEGLView::setFrameSize" if you are using win32 or linux plaform
or change the window size in "proj.XXX/main.cpp" by "CCEGLView::setFrameSize" if you are using win32 or linux platform
and modify "proj.mac/AppController.mm" by changing the window rectangle.
[Situation 2] Using one resource to match different design resolutions.
Expand Down

0 comments on commit 75d2e76

Please sign in to comment.