From a3bc979452f38b485f53985e83bc177cac17fd90 Mon Sep 17 00:00:00 2001 From: mogemimi Date: Wed, 22 Jun 2016 11:22:05 +0900 Subject: [PATCH] Fix typos in documentation and comments --- cocos/2d/CCAnimation.h | 2 +- cocos/2d/CCCamera.h | 2 +- cocos/2d/CCGrabber.h | 2 +- cocos/2d/CCNode.h | 2 +- cocos/2d/CCScene.cpp | 2 +- cocos/2d/CCSprite.h | 2 +- cocos/base/ccTypes.h | 4 ++-- cocos/base/ccUtils.h | 2 +- cocos/physics/CCPhysicsWorld.h | 2 +- cocos/platform/CCGLView.h | 2 +- cocos/platform/ios/CCDevice-ios.mm | 2 +- cocos/ui/UIRichText.cpp | 2 +- cocos/vr/CCVRDistortionMesh.cpp | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index b61e246b7c..196dfc10d2 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -180,7 +180,7 @@ public: */ static Animation* createWithSpriteFrames(const Vector& arrayOfSpriteFrameNames, float delay = 0.0f, unsigned int loops = 1); - /* Creates an animation with an array of AnimationFrame, the delay per units in seconds and and how many times it should be executed. + /* Creates an animation with an array of AnimationFrame, the delay per units in seconds and how many times it should be executed. * @since v2.0 * @param arrayOfAnimationFrameNames An animation with an array of AnimationFrame. * @param delayPerUnit The delay per units in seconds and how many times it should be executed. diff --git a/cocos/2d/CCCamera.h b/cocos/2d/CCCamera.h index 1a720c63b4..8aae3defc1 100644 --- a/cocos/2d/CCCamera.h +++ b/cocos/2d/CCCamera.h @@ -249,7 +249,7 @@ public: */ void apply(); /** - Restor the FBO, RenderTargets and viewport. + Restore the FBO, RenderTargets and viewport. */ void restore(); diff --git a/cocos/2d/CCGrabber.h b/cocos/2d/CCGrabber.h index 2f70024ab4..96c67c78f1 100644 --- a/cocos/2d/CCGrabber.h +++ b/cocos/2d/CCGrabber.h @@ -38,7 +38,7 @@ class Texture2D; * @{ */ -/** FBO class that grabs the the contents of the screen */ +/** FBO class that grabs the contents of the screen */ class Grabber : public Ref { public: diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 31dc80b559..12521be0d4 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -146,7 +146,7 @@ public: /** LocalZOrder is the 'key' used to sort the node relative to its siblings. - The Node's parent will sort all its children based ont the LocalZOrder value. + The Node's parent will sort all its children based on the LocalZOrder value. If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array. Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http://en.wikipedia.org/wiki/Tree_traversal#In-order ) diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 907be59d73..bd276e993c 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -206,7 +206,7 @@ void Scene::render(Renderer* renderer, const Mat4& eyeTransform, const Mat4* eye // b) modify the "additional transform" matrix // both alternatives are correct, if the user manually modifies the camera with a camera->setPosition() // then the "nodeToParent transform" will be lost. - // And it is important that the change is "permament", because the matrix might be used for calculate + // And it is important that the change is "permanent", because the matrix might be used for calculate // culling and other stuff. if (eyeProjection) camera->setAdditionalProjection(*eyeProjection * camera->getProjectionMatrix().getInversed()); diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index c5adf0eced..e1e848faff 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -550,7 +550,7 @@ CC_CONSTRUCTOR_ACCESS : * A SpriteFrame will be fetched from the SpriteFrameCache by name. * If the SpriteFrame doesn't exist it will raise an exception. * - * @param spriteFrameName A key string that can fected a valid SpriteFrame from SpriteFrameCache. + * @param spriteFrameName A key string that can fetched a valid SpriteFrame from SpriteFrameCache. * @return True if the sprite is initialized properly, false otherwise. */ virtual bool initWithSpriteFrameName(const std::string& spriteFrameName); diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index 553c90b4a3..eadb282041 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -497,7 +497,7 @@ public: bool _shadowEnabled; /// shadow x and y offset Size _shadowOffset; - /// shadow blurrines + /// shadow blurriness float _shadowBlur; /// shadow opacity float _shadowOpacity; @@ -571,7 +571,7 @@ public: /// enable text wrap bool _enableWrap; /** There are 4 overflows: none, clamp, shrink and resize_height. - * The conresponding integer values are 0, 1, 2, 3 respectively + * The corresponding integer values are 0, 1, 2, 3 respectively * For more information, please refer to Label::Overflow enum class. */ int _overflow; diff --git a/cocos/base/ccUtils.h b/cocos/base/ccUtils.h index 4c3bb5820a..4829de5e2a 100644 --- a/cocos/base/ccUtils.h +++ b/cocos/base/ccUtils.h @@ -68,7 +68,7 @@ namespace utils CC_DLL void captureScreen(const std::function& afterCaptured, const std::string& filename); /** Capture a specific Node. - * @param startNode: specify the snapshot Node. It chould be cocos2d::Scene + * @param startNode specify the snapshot Node. It should be cocos2d::Scene * @param scale * @returns: return a Image, then can call saveToFile to save the image as "xxx.png or xxx.jpg". * @since v3.11 diff --git a/cocos/physics/CCPhysicsWorld.h b/cocos/physics/CCPhysicsWorld.h index 662ee0dc20..bfb16cd7cf 100644 --- a/cocos/physics/CCPhysicsWorld.h +++ b/cocos/physics/CCPhysicsWorld.h @@ -62,7 +62,7 @@ typedef struct PhysicsRayCastInfo // FIXME: correct thing to do is use `cpFlaot` instead of float. // but in order to do so, we should include "chipmunk_types.h" - // in in Chipmunk v7.0, chipmunk_types includes all the mac types that + // in Chipmunk v7.0, chipmunk_types includes all the mac types that // conflicts with cocos2d Size, Point,... etc types. And all the CocosStudio // lib will need to use the `cocos2d::` namespace prefix. And it is easier to do this // than change all the cocosstudio library (and also users code) diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 81388edb09..ee78845dcd 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -394,7 +394,7 @@ public: /** * Renders a Scene with a Renderer - * This method is called dirctly by the Director + * This method is called directly by the Director */ void renderScene(Scene* scene, Renderer* renderer); diff --git a/cocos/platform/ios/CCDevice-ios.mm b/cocos/platform/ios/CCDevice-ios.mm index 62a70384a6..eeeadedac1 100644 --- a/cocos/platform/ios/CCDevice-ios.mm +++ b/cocos/platform/ios/CCDevice-ios.mm @@ -402,7 +402,7 @@ static bool _initWithString(const char * text, cocos2d::Device::TextAlign align, blue:info->tintColorB alpha:info->tintColorA]; - //adjust text rect acoording to overflow + // adjust text rect according to overflow NSMutableDictionary* tokenAttributesDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: foregroundColor,NSForegroundColorAttributeName, font, NSFontAttributeName, diff --git a/cocos/ui/UIRichText.cpp b/cocos/ui/UIRichText.cpp index 8203050b29..5de4c1b1d4 100644 --- a/cocos/ui/UIRichText.cpp +++ b/cocos/ui/UIRichText.cpp @@ -459,7 +459,7 @@ MyXMLVisitor::MyXMLVisitor(RichText* richText) MyXMLVisitor::setTagDescription("outline", true, [](const ValueMap& tagAttrValueMap) { // supported attributes: - // color, cize + // color, size ValueMap attrValueMap; attrValueMap[RichText::KEY_TEXT_STYLE] = RichText::VALUE_TEXT_STYLE_OUTLINE; diff --git a/cocos/vr/CCVRDistortionMesh.cpp b/cocos/vr/CCVRDistortionMesh.cpp index 1ff3d6c54c..1025f93826 100644 --- a/cocos/vr/CCVRDistortionMesh.cpp +++ b/cocos/vr/CCVRDistortionMesh.cpp @@ -97,7 +97,7 @@ DistortionMesh::DistortionMesh(Distortion *distortion, vertexData[(vertexOffset + 2)] = uTexture; vertexData[(vertexOffset + 3)] = vTexture; - // vignete + // vignette vertexData[(vertexOffset + 4)] = vignette; vertexOffset += 5;