fix typos and syntax error. A thorough check by tool VSSpellChecker.

This commit is contained in:
Martin Taylor 2015-09-22 16:08:23 +08:00
parent 0ca45cf522
commit 62e36e8006
117 changed files with 347 additions and 347 deletions

View File

@ -350,7 +350,7 @@ CC_CONSTRUCTOR_ACCESS:
@brief Initializes the action with an inner action that has the amplitude property, and a duration time.
@param action The pointer of inner action.
@param duration The duration of the DeccelAmplitude action.
@return If the initilization sucess, return true; otherwise, return false.
@return If the initialization success, return true; otherwise, return false.
*/
bool initWithAction(Action *action, float duration);
@ -365,7 +365,7 @@ private:
/**
@brief StopGrid action.
@warning Don't call this action if another grid action is active.
Call if you want to remove the the grid effect. Example:
Call if you want to remove the grid effect. Example:
Sequence::actions(Lens::action(...), StopGrid::action(...), nullptr);
*/
class CC_DLL StopGrid : public ActionInstant
@ -420,7 +420,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
@brief Initializes an action with the number of times that the current grid will be reused.
@param times Specify times the grid will be reused.
@return If the initialization sucess, return true; otherwise, return false.
@return If the initialization success, return true; otherwise, return false.
*/
bool initWithTimes(int times);

View File

@ -50,7 +50,7 @@ public:
@param gridSize Specify the size of the grid.
@param waves Specify the waves count of the Waves3D action.
@param amplitude Specify the amplitude of the Waves3D action.
@return If the creation sucess, return a pointer of Waves3D action; otherwise, return nil.
@return If the creation success, return a pointer of Waves3D action; otherwise, return nil.
*/
static Waves3D* create(float duration, const Size& gridSize, unsigned int waves, float amplitude);
@ -71,7 +71,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -113,7 +113,7 @@ public:
/**
@brief Create the action with duration.
@param duration Specify the duration of the FilpX3D action. It's a value in seconds.
@return If the creation sucess, return a pointer of FilpX3D action; otherwise, return nil.
@return If the creation success, return a pointer of FilpX3D action; otherwise, return nil.
*/
static FlipX3D* create(float duration);
@ -154,7 +154,7 @@ public:
/**
@brief Create the action with duration.
@param duration Specify the duration of the FlipY3D action. It's a value in seconds.
@return If the creation sucess, return a pointer of FlipY3D action; otherwise, return nil.
@return If the creation success, return a pointer of FlipY3D action; otherwise, return nil.
*/
static FlipY3D* create(float duration);
@ -185,7 +185,7 @@ public:
@param gridSize Specify the size of the grid.
@param position Specify the center position of the lens.
@param radius Specify the radius of the lens.
@return If the creation sucess, return a pointer of Lens3D action; otherwise, return nil.
@return If the creation success, return a pointer of Lens3D action; otherwise, return nil.
*/
static Lens3D* create(float duration, const Size& gridSize, const Vec2& position, float radius);
@ -270,7 +270,7 @@ public:
@param radius Specify the radius of the ripple effect.
@param waves Specify the waves count of the ripple effect.
@param amplitude Specify the amplitude of the ripple effect.
@return If the creation sucess, return a pointer of Ripple3D action; otherwise, return nil.
@return If the creation success, return a pointer of Ripple3D action; otherwise, return nil.
*/
static Ripple3D* create(float duration, const Size& gridSize, const Vec2& position, float radius, unsigned int waves, float amplitude);
@ -354,7 +354,7 @@ public:
@param gridSize Specify the size of the grid.
@param range Specify the range of the shaky effect.
@param shakeZ Specify whether shake on the z axis.
@return If the creation sucess, return a pointer of Shaky3D action; otherwise, return nil.
@return If the creation success, return a pointer of Shaky3D action; otherwise, return nil.
*/
static Shaky3D* create(float initWithDuration, const Size& gridSize, int range, bool shakeZ);
@ -372,7 +372,7 @@ CC_CONSTRUCTOR_ACCESS:
@param gridSize Specify the size of the grid.
@param range Specify the range of the shaky effect.
@param shakeZ Specify whether shake on the z axis.
@return If the Initialization sucess, return true; otherwise, return false.
@return If the Initialization success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, const Size& gridSize, int range, bool shakeZ);
@ -399,7 +399,7 @@ public:
@param gridSize Specify the size of the grid.
@param waves Specify the waves count of the Liquid action.
@param amplitude Specify the amplitude of the Liquid action.
@return If the creation sucess, return a pointer of Liquid action; otherwise, return nil.
@return If the creation success, return a pointer of Liquid action; otherwise, return nil.
*/
static Liquid* create(float duration, const Size& gridSize, unsigned int waves, float amplitude);
@ -420,7 +420,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -439,7 +439,7 @@ CC_CONSTRUCTOR_ACCESS:
@param gridSize Specify the size of the grid.
@param waves Specify the waves count of the Liquid action.
@param amplitude Specify the amplitude of the Liquid action.
@return If the initialization sucess, return true; otherwise, return false.
@return If the initialization success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, const Size& gridSize, unsigned int waves, float amplitude);
@ -470,7 +470,7 @@ public:
@param amplitude Specify the amplitude of the Waves action.
@param horizontal Specify whether waves on horizontal.
@param vertical Specify whether waves on vertical.
@return If the creation sucess, return a pointer of Waves action; otherwise, return nil.
@return If the creation success, return a pointer of Waves action; otherwise, return nil.
*/
static Waves* create(float duration, const Size& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical);
@ -491,7 +491,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -512,7 +512,7 @@ CC_CONSTRUCTOR_ACCESS:
@param amplitude Specify the amplitude of the Waves action.
@param horizontal Specify whether waves on horizontal.
@param vertical Specify whether waves on vertical.
@return If the initialization sucess, return true; otherwise, return false.
@return If the initialization success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, const Size& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical);
@ -543,7 +543,7 @@ public:
@param position Specify the center position of the twirl action.
@param twirls Specify the twirls count of the Twirl action.
@param amplitude Specify the amplitude of the Twirl action.
@return If the creation sucess, return a pointer of Twirl action; otherwise, return nil.
@return If the creation success, return a pointer of Twirl action; otherwise, return nil.
*/
static Twirl* create(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude);
@ -575,7 +575,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -596,7 +596,7 @@ CC_CONSTRUCTOR_ACCESS:
@param position Specify the center position of the twirl action.
@param twirls Specify the twirls count of the Twirl action.
@param amplitude Specify the amplitude of the Twirl action.
@return If the initialization sucess, return true; otherwise, return false.
@return If the initialization success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude);

View File

@ -320,7 +320,7 @@ class CC_DLL CallFunc : public ActionInstant //<NSCopying>
public:
/** Creates the action with the callback of type std::function<void()>.
This is the preferred way to create the callback.
* When this funtion bound in js or lua ,the input param will be changed.
* When this function bound in js or lua ,the input param will be changed.
* In js: var create(var func, var this, var [data]) or var create(var func).
* In lua:local create(local funcID).
*
@ -422,7 +422,7 @@ public:
/** Creates the action with the callback of type std::function<void()>.
This is the preferred way to create the callback.
*
* @param func A callback function need to be excuted.
* @param func A callback function need to be executed.
* @return An autoreleased CallFuncN object.
*/
static CallFuncN * create(const std::function<void(Node*)>& func);
@ -516,7 +516,7 @@ public:
typedef void (Ref::*SEL_CallFuncO)(Ref*);
*
* @param target A certain target.
* @param selector The callback need to be excuted.
* @param selector The callback need to be executed.
* @param object An object as the callback's first argument.
* @return An autoreleased __CCCallFuncO object.
*/

View File

@ -357,7 +357,7 @@ void Sequence::update(float t)
// Reverse mode ?
// FIXME: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode"
// since it will require a hack to know if an action is on reverse mode or not.
// "step" should be overriden, and the "reverseMode" value propagated to inner Sequences.
// "step" should be overridden, and the "reverseMode" value propagated to inner Sequences.
if (!(sendUpdateEventToScript(0, _actions[1])))
_actions[1]->update(0);
_actions[1]->stop();

View File

@ -68,19 +68,19 @@ class CC_DLL ActionInterval : public FiniteTimeAction
public:
/** How many seconds had elapsed since the actions started to run.
*
* @return The seconds had elapsed since the ations started to run.
* @return The seconds had elapsed since the actions started to run.
*/
inline float getElapsed(void) { return _elapsed; }
/** Sets the ampliture rate, extension in GridAction
/** Sets the amplitude rate, extension in GridAction
*
* @param amp The ampliture rate.
* @param amp The amplitude rate.
*/
void setAmplitudeRate(float amp);
/** Gets the ampliture rate, extension in GridAction
/** Gets the amplitude rate, extension in GridAction
*
* @return The ampliture rate.
* @return The amplitude rate.
*/
float getAmplitudeRate(void);
@ -149,7 +149,7 @@ public:
/** Helper constructor to create an array of sequenceable actions given an array.
* @code
* When this funtion bound to the js or lua,the input params changed
* When this function bound to the js or lua,the input params changed
* in js :var create(var object1,var object2, ...)
* in lua :local create(local object1,local object2, ...)
* @endcode
@ -347,7 +347,7 @@ class CC_DLL Spawn : public ActionInterval
public:
/** Helper constructor to create an array of spawned actions.
* @code
* When this funtion bound to the js or lua, the input params changed.
* When this function bound to the js or lua, the input params changed.
* in js :var create(var object1,var object2, ...)
* in lua :local create(local object1,local object2, ...)
* @endcode
@ -1563,7 +1563,7 @@ public:
static ActionFloat* create(float duration, float from, float to, ActionFloatCallback callback);
/**
* Overrided ActionInterval methods
* Overridden ActionInterval methods
*/
void startWithTarget(Node* target) override;
void update(float delta) override;

View File

@ -348,7 +348,7 @@ void ActionManager::removeActionsByFlags(unsigned int flags, Node *target)
// get
// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer
// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requires the address of a pointer
// and, it is not possible to get the address of a reference
Action* ActionManager::getActionByTag(int tag, const Node *target) const
{
@ -382,7 +382,7 @@ Action* ActionManager::getActionByTag(int tag, const Node *target) const
return nullptr;
}
// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer
// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requires the address of a pointer
// and, it is not possible to get the address of a reference
ssize_t ActionManager::getNumberOfRunningActionsInTarget(const Node *target) const
{

View File

@ -56,7 +56,7 @@ public:
@brief Create an action with duration, grid size.
@param duration Specify the duration of the PageTurn3D action. It's a value in seconds.
@param gridSize Specify the size of the grid.
@return If the creation sucess, return a pointer of PageTurn3D action; otherwise, return nil.
@return If the creation success, return a pointer of PageTurn3D action; otherwise, return nil.
*/
static PageTurn3D* create(float duration, const Size& gridSize);

View File

@ -48,7 +48,7 @@ public:
* @brief Create and initializes with a duration and a destination percentage.
* @param duration Specify the duration of the ProgressTo action. It's a value in seconds.
* @param percent Specify the destination percentage.
* @return If the creation sucess, return a pointer of ProgressTo action; otherwise, return nil.
* @return If the creation success, return a pointer of ProgressTo action; otherwise, return nil.
*/
static ProgressTo* create(float duration, float percent);
@ -68,7 +68,7 @@ CC_CONSTRUCTOR_ACCESS:
* @brief Initializes with a duration and destination percentage.
* @param duration Specify the duration of the ProgressTo action. It's a value in seconds.
* @param percent Specify the destination percentage.
* @return If the creation sucess, return true; otherwise, return false.
* @return If the creation success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, float percent);
@ -92,7 +92,7 @@ public:
* @param duration Specify the duration of the ProgressFromTo action. It's a value in seconds.
* @param fromPercentage Specify the source percentage.
* @param toPercentage Specify the destination percentage.
* @return If the creation sucess, return a pointer of ProgressFromTo action; otherwise, return nil.
* @return If the creation success, return a pointer of ProgressFromTo action; otherwise, return nil.
*/
static ProgressFromTo* create(float duration, float fromPercentage, float toPercentage);
@ -113,7 +113,7 @@ CC_CONSTRUCTOR_ACCESS:
* @param duration Specify the duration of the ProgressFromTo action. It's a value in seconds.
* @param fromPercentage Specify the source percentage.
* @param toPercentage Specify the destination percentage.
* @return If the creation sucess, return true; otherwise, return false.
* @return If the creation success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, float fromPercentage, float toPercentage);

View File

@ -417,7 +417,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -483,7 +483,7 @@ public:
*/
inline float getAmplitudeRate() const { return _amplitudeRate; }
/**
@brief Set the ampliture rate of the effect.
@brief Set the amplitude rate of the effect.
@param amplitudeRate The value of amplitude rate will be set.
*/
inline void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
@ -526,7 +526,7 @@ public :
/**
* @brief Create the action with the number of rows and the duration.
* @param duration Specify the duration of the SplitRows action. It's a value in seconds.
* @param rows Specify the rows count should be splited.
* @param rows Specify the rows count should be split.
* @return If the creation success, return a pointer of SplitRows action; otherwise, return nil.
*/
static SplitRows* create(float duration, unsigned int rows);
@ -543,7 +543,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
* @brief Initializes the action with the number rows and the duration.
* @param duration Specify the duration of the SplitRows action. It's a value in seconds.
* @param rows Specify the rows count should be splited.
* @param rows Specify the rows count should be split.
* @return If the creation success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, unsigned int rows);
@ -568,7 +568,7 @@ public:
/**
* @brief Create the action with the number of columns and the duration.
* @param duration Specify the duration of the SplitCols action. It's a value in seconds.
* @param cols Specify the columns count should be splited.
* @param cols Specify the columns count should be split.
* @return If the creation success, return a pointer of SplitCols action; otherwise, return nil.
*/
static SplitCols* create(float duration, unsigned int cols);
@ -588,7 +588,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
* @brief Initializes the action with the number columns and the duration.
* @param duration Specify the duration of the SplitCols action. It's a value in seconds.
* @param cols Specify the columns count should be splited.
* @param cols Specify the columns count should be split.
* @return If the creation success, return true; otherwise, return false.
*/
bool initWithDuration(float duration, unsigned int cols);

View File

@ -42,7 +42,7 @@ NS_CC_BEGIN
1. The node should be inherit from ActionTweenDelegate.
2. Override the virtual method updateTweenAction in the node.
Then once you running ActionTween on the node, the method updateTweenAction will be incoked.
Then once you running ActionTween on the node, the method updateTweenAction will be invoked.
*/
class CC_DLL ActionTweenDelegate
{

View File

@ -103,7 +103,7 @@ public:
*/
void setDelayUnits(float delayUnits) { _delayUnits = delayUnits; };
/** @brief Gets user infomation
/** @brief Gets user information
* A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.
* If UserInfo is nil, then no notification will be broadcast.
*
@ -112,7 +112,7 @@ public:
const ValueMap& getUserInfo() const { return _userInfo; };
ValueMap& getUserInfo() { return _userInfo; };
/** Sets user infomation.
/** Sets user information.
* @param userInfo A dictionary as UserInfo.
*/
void setUserInfo(const ValueMap& userInfo)

View File

@ -304,7 +304,7 @@ std::vector<cocos2d::Vec2> AutoPolygon::marchSquare(const Rect& rect, const Vec2
+---+---+
| | 8 |
+---+---+
this should normaly go UP, but if we already been here, we go down
this should normally go UP, but if we already been here, we go down
*/
//find index from xy;
i = getIndexFromPos(curx, cury);
@ -367,7 +367,7 @@ std::vector<cocos2d::Vec2> AutoPolygon::marchSquare(const Rect& rect, const Vec2
}
else if(problem)
{
//TODO: we triangulation cannot work collineer points, so we need to modify same point a little
//TODO: we triangulation cannot work collinear points, so we need to modify same point a little
//TODO: maybe we can detect if we go into a hole and coming back the hole, we should extract those points and remove them
_points.push_back(Vec2((float)(curx- rect.origin.x) / _scaleFactor, (float)(rect.size.height - cury + rect.origin.y) / _scaleFactor));
}
@ -473,7 +473,7 @@ std::vector<Vec2> AutoPolygon::reduce(const std::vector<Vec2>& points, const Rec
std::vector<Vec2> AutoPolygon::expand(const std::vector<Vec2>& points, const cocos2d::Rect &rect, const float& epsilon)
{
auto size = points.size();
// if there are less than 3 points, then we have nothig
// if there are less than 3 points, then we have nothing
if(size<3)
{
log("AUTOPOLYGON: cannot expand points for %s with less than 3 points, e: %f", _filename.c_str(), epsilon);
@ -570,7 +570,7 @@ TrianglesCommand::Triangles AutoPolygon::triangulate(const std::vector<Vec2>& po
}
if(found)
{
//if we found the same vertice, don't add to verts, but use the same vert with indices
//if we found the same vertex, don't add to verts, but use the same vertex with indices
indices[idx] = j;
idx++;
}
@ -621,7 +621,7 @@ void AutoPolygon::calculateUV(const Rect& rect, V3F_C4B_T2F* verts, const ssize_
auto end = &verts[count];
for(auto i = verts; i != end; i++)
{
// for every point, offcset with the centerpoint
// for every point, offset with the center point
float u = (i->vertices.x*_scaleFactor + rect.origin.x) / texWidth;
float v = (rect.origin.y+rect.size.height - i->vertices.y*_scaleFactor) / texHeight;
i->texCoords.u = u;

View File

@ -85,7 +85,7 @@ public:
* set the data to be a pointer to a quad
* the member verts will not be released when this PolygonInfo destructs
* as the verts memory are managed by other objects
* @param quad a pointer to the V3F_C4B_T2F_Quad obje
* @param quad a pointer to the V3F_C4B_T2F_Quad object
*/
void setQuad(V3F_C4B_T2F_Quad *quad);
@ -156,7 +156,7 @@ public:
std::vector<Vec2> trace(const cocos2d::Rect& rect, const float& threshold = 0.0);
/**
* reduce the ammount of points so its faster for GPU to process and draw
* reduce the amount of points so its faster for GPU to process and draw
* based on Ramer-Douglas-Puecker algorithm
* @param points a vector of Vec2 points as input
* @param rect a texture rect for specify an area of the image to avoid over reduction
@ -201,7 +201,7 @@ public:
* @warning This method requires the AutoPolygon object to know the texture file dimension
* @param rect a texture rect to specify where to map the UV
* @param verts a pointer to the verts array, served both as input and output verts
* @param count the count for the verts arrac
* @param count the count for the verts array
* @code
* auto ap = AutoPolygon("grossini.png");
* TrianglesCommand::Triangles myPolygons = ap.triangulate(myPoints);

View File

@ -245,7 +245,7 @@ public:
*/
void apply();
/**
Set FBO, which will attacha several render target for the rendered result.
Set FBO, which will attach several render target for the rendered result.
*/
void setFrameBufferObject(experimental::FrameBuffer* fbo);
/**
@ -281,7 +281,7 @@ CC_CONSTRUCTOR_ACCESS:
*/
void setScene(Scene* scene);
/**set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8*/
/**set additional matrix for the projection matrix, it multiplies mat to projection matrix when called, used by WP8*/
void setAdditionalProjection(const Mat4& mat);
/** init camera */
@ -309,7 +309,7 @@ protected:
unsigned short _cameraFlag; // camera flag
mutable Frustum _frustum; // camera frustum
mutable bool _frustumDirty;
int8_t _depth; //camera depth, the depth of camera with CameraFlag::DEFAULT flag is 0 by default, a camera with larger depth is drawn on top of camera with smaller detph
int8_t _depth; //camera depth, the depth of camera with CameraFlag::DEFAULT flag is 0 by default, a camera with larger depth is drawn on top of camera with smaller depth
static Camera* _visitingCamera;
CameraBackgroundBrush* _clearBrush; //brush used to clear the back ground

View File

@ -225,7 +225,7 @@ void ClippingNode::onExit()
void ClippingNode::drawFullScreenQuadClearStencil()
{
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadIdentityMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
@ -273,7 +273,7 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
// To ease the migration to v3.0, we still support the Mat4 stack,
// but it is deprecated and your code should not rely on it
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
@ -503,7 +503,7 @@ void ClippingNode::onAfterDrawStencil()
if (_alphaThreshold < 1)
{
#if CC_CLIPPING_NODE_OPENGLES
// FIXME: we need to find a way to restore the shaders of the stencil node and its childs
// FIXME: we need to find a way to restore the shaders of the stencil node and its children
#else
// manually restore the alpha test state
glAlphaFunc(_currentAlphaTestFunc, _currentAlphaTestRef);
@ -525,8 +525,8 @@ void ClippingNode::onAfterDrawStencil()
///////////////////////////////////
// DRAW CONTENT
// setup the stencil test func like this:
// for each pixel of this node and its childs
// setup the stencil test function like this:
// for each pixel of this node and its children
// if all layers less than or equals to the current are set to 1 in the stencil buffer
// draw the pixel and keep the current layer in the stencil buffer
// else
@ -537,7 +537,7 @@ void ClippingNode::onAfterDrawStencil()
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
// RenderState::StateBlock::_defaultState->setStencilOperation(RenderState::STENCIL_OP_KEEP, RenderState::STENCIL_OP_KEEP, RenderState::STENCIL_OP_KEEP);
// draw (according to the stencil test func) this node and its childs
// draw (according to the stencil test function) this node and its children
}

View File

@ -39,7 +39,7 @@ NS_CC_BEGIN
* @{
*/
/** ClippingNode is a subclass of Node.
* It draws its content (childs) clipped using a stencil.
* It draws its content (children) clipped using a stencil.
* The stencil is an other Node that will not be drawn.
* The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold).
*/
@ -72,7 +72,7 @@ public:
*/
void setStencil(Node *stencil);
/** If stencil has no childre it will not be drawn.
/** If stencil has no children it will not be drawn.
* If you have custom stencil-based node with stencil drawing mechanics other then children-based,
* then this method should return true every time you wish stencil to be visited.
* By default returns true if has any children attached.

View File

@ -90,7 +90,7 @@ static void lazy_init()
}
}
// When switching from backround to foreground on android, we want the params to be initialized again
// When switching from background to foreground on android, we want the parameters to be initialized again
void init()
{
lazy_init();

View File

@ -214,7 +214,7 @@ void TMXLayer::updateTiles(const Rect& culledRect)
// for the bigger tiles.
int tilesOverX = 0;
int tilesOverY = 0;
// for diagonal oriention tiles
// for diagonal orientation tiles
float tileSizeMax = std::max(tileSize.width, tileSize.height);
if (_layerOrientation == FAST_TMX_ORIENTATION_ORTHO)
{
@ -498,7 +498,7 @@ void TMXLayer::updateTotalQuads()
if(tileGID & kTMXTileDiagonalFlag)
{
// FIXME: not working correcly
// FIXME: not working correctly
quad.bl.vertices.x = left;
quad.bl.vertices.y = bottom;
quad.bl.vertices.z = z;

View File

@ -84,7 +84,7 @@ public:
* @param tilesetInfo An tileset info.
* @param layerInfo A layer info.
* @param mapInfo A map info.
* @return Reruen an autorelease object.
* @return Return an autorelease object.
*/
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
/**

View File

@ -733,7 +733,7 @@ FontAtlas * FontFNT::createFontAtlas()
if (_configuration->_commonHeight == 0)
return nullptr;
// commone height
// common height
tempAtlas->setLineHeight(_configuration->_commonHeight);

View File

@ -85,7 +85,7 @@ public:
TextVAlignment vAlignment = TextVAlignment::TOP);
/** Create a lable with string and a font definition*/
/** Create a label with string and a font definition*/
static LabelTTF * createWithFontDefinition(const std::string& string, FontDefinition &textDefinition);
/** initializes the LabelTTF with a font name, alignment, dimension and font size */

View File

@ -137,7 +137,7 @@ public:
/// @{
/// @name Setters & Getters for Graphic Peroperties
/// @name Setters & Getters for Graphic Properties
/**
LocalZOrder is the 'key' used to sort the node relative to its siblings.
@ -185,7 +185,7 @@ public:
Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
Limitations: Global Z Order can't be used used by Nodes that have SpriteBatchNode as one of their acenstors.
Limitations: Global Z Order can't be used by Nodes that have SpriteBatchNode as one of their ancestors.
And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.
@see `setLocalZOrder()`
@ -494,7 +494,7 @@ public:
* The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
* But you can use values higher than (1,1) and lower than (0,0) too.
* The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
* @note If node has a physics body, the anchor must be in the middle, you cann't change this to other value.
* @note If node has a physics body, the anchor must be in the middle, you can't change this to other value.
*
* @param anchorPoint The anchor point of node.
*/
@ -876,7 +876,7 @@ public:
/**
* Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter.
*
* @param tag An interger number that identifies a child node.
* @param tag An integer number that identifies a child node.
* @param cleanup True if all running actions and callbacks on the child node will be cleanup, false otherwise.
*
* Please use `removeChildByName` instead.
@ -898,7 +898,7 @@ public:
/**
* Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
*
* @param cleanup True if all running actions on all children nodes should be cleanup, false oterwise.
* @param cleanup True if all running actions on all children nodes should be cleanup, false otherwise.
* @js removeAllChildren
* @lua removeAllChildren
*/
@ -914,7 +914,7 @@ public:
/**
* Sorts the children array once before drawing, instead of every time when a child is added or reordered.
* This appraoch can improves the performance massively.
* This approach can improves the performance massively.
* @note Don't call this manually unless a child added needs to be removed in the same frame.
*/
virtual void sortAllChildren();
@ -1268,11 +1268,11 @@ public:
* Sets a Scheduler object that is used to schedule all "updates" and timers.
*
* @warning If you set a new Scheduler, then previously created timers/update are going to be removed.
* @param scheduler A Shdeduler object that is used to schedule all "update" and timers.
* @param scheduler A Scheduler object that is used to schedule all "update" and timers.
*/
virtual void setScheduler(Scheduler* scheduler);
/**
* Gets a Sheduler object.
* Gets a Scheduler object.
*
* @see setScheduler(Scheduler*)
* @return A Scheduler object.
@ -1285,7 +1285,7 @@ public:
* Checks whether a selector is scheduled.
*
* @param selector A function selector
* @return Whether the funcion selector is scheduled.
* @return Whether the function selector is scheduled.
* @js NA
* @lua NA
*/
@ -1336,13 +1336,13 @@ public:
@code
// firstly, implement a schedule function
void MyNode::TickMe(float dt);
// wrap this function into a selector via schedule_selector marco.
// wrap this function into a selector via schedule_selector macro.
this->schedule(CC_SCHEDULE_SELECTOR(MyNode::TickMe), 0, 0, 0);
@endcode
*
* @param selector The SEL_SCHEDULE selector to be scheduled.
* @param interval Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use scheduleUpdate() instead.
* @param repeat The selector will be excuted (repeat + 1) times, you can use CC_REPEAT_FOREVER for tick infinitely.
* @param repeat The selector will be executed (repeat + 1) times, you can use CC_REPEAT_FOREVER for tick infinitely.
* @param delay The amount of time that the first tick will wait before execution.
* @lua NA
*/
@ -1498,7 +1498,7 @@ public:
/**
* Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
* The matrix is in Pixels.
* Note: If acenstor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldTransform
* Note: If ancestor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldTransform
*
* @param ancestor The parent's node pointer.
* @since v3.7
@ -1507,14 +1507,14 @@ public:
virtual Mat4 getNodeToParentTransform(Node* ancestor) const;
/**
* Returns the affline transform matrix that transform the node's (local) space coordinates into the parent's space coordinates.
* Returns the affine transform matrix that transform the node's (local) space coordinates into the parent's space coordinates.
* The matrix is in Pixels.
*
* Note: If acenstor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldAffineTransform
* Note: If ancestor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldAffineTransform
*
* @param ancestor The parent's node pointer.
* @since v3.7
* @return The affline transformation matrix.
* @return The affine transformation matrix.
*/
virtual AffineTransform getNodeToParentAffineTransform(Node* ancestor) const;
@ -1871,14 +1871,14 @@ private:
* The content rectangle defined by origin(0,0) and content size.
* This function convert GL screen point to near and far planes as points Pn and Pf,
* then calculate the intersect point P which the line PnPf intersect with content rectangle.
* If P in content rectangle means this node be hitted.
* If P in content rectangle means this node be hit.
*
* @param pt The point in GL screen space.
* @param camera Which camera used to unproject pt to near/far planes.
* @param w2l World to local transform matrix, used to convert Pn and Pf to rectangle space.
* @param rect The test recangle in local space.
* @param rect The test rectangle in local space.
* @parma p Point to a Vec3 for store the intersect point, if don't need them set to nullptr.
* @return true if the point is in content rectangle, flase otherwise.
* @return true if the point is in content rectangle, false otherwise.
*/
bool CC_DLL isScreenPointInRect(const Vec2 &pt, const Camera* camera, const Mat4& w2l, const Rect& rect, Vec3 *p);

View File

@ -109,7 +109,7 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p
// To ease the migration to v3.0, we still support the Mat4 stack,
// but it is deprecated and your code should not rely on it
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);

View File

@ -1000,7 +1000,7 @@ void ParticleSystem::updateWithNoTime(void)
void ParticleSystem::updateParticleQuads()
{
//should be overriden
//should be overridden
}
void ParticleSystem::postStep()

View File

@ -271,7 +271,7 @@ public:
should be overridden by subclasses. */
virtual void postStep();
/** Call the update mathod with no time..
/** Call the update method with no time..
*/
virtual void updateWithNoTime();
@ -288,7 +288,7 @@ public:
virtual void setAutoRemoveOnFinish(bool var);
// mode A
/** Gets the garvity.
/** Gets the gravity.
*
* @return The gravity.
*/

View File

@ -259,7 +259,7 @@ void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint3
// To ease the migration to v3.0, we still support the Mat4 stack,
// but it is deprecated and your code should not rely on it
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);

View File

@ -104,7 +104,7 @@ public:
/**
* Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter.
*
* @param tag An interger number that identifies a child node.
* @param tag An integer number that identifies a child node.
* @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
*/
virtual void removeProtectedChildByTag(int tag, bool cleanup = true);
@ -118,7 +118,7 @@ public:
/**
* Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
*
* @param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
* @param cleanup true if all running actions on all children nodes should be cleanup, false otherwise.
* @js removeAllChildren
* @lua removeAllChildren
*/
@ -134,7 +134,7 @@ public:
/**
* Sorts the children array once before drawing, instead of every time when a child is added or reordered.
* This appraoch can improves the performance massively.
* This approach can improves the performance massively.
* @note Don't call this manually unless a child added needs to be removed in the same frame
*/
virtual void sortAllProtectedChildren();

View File

@ -696,7 +696,7 @@ void RenderTexture::draw(Renderer *renderer, const Mat4 &transform, uint32_t fla
void RenderTexture::begin()
{
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
_projectionMatrix = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
@ -739,7 +739,7 @@ void RenderTexture::end()
_endCommand.func = CC_CALLBACK_0(RenderTexture::onEnd, this);
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
Renderer *renderer = director->getRenderer();
renderer->addCommand(&_endCommand);

View File

@ -165,7 +165,7 @@ public:
/** saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder.
Returns true if the operation is successful.
* Notes: since v3.x, saveToFile will generate a custum command, which will be called in the following render->render().
* Notes: since v3.x, saveToFile will generate a custom command, which will be called in the following render->render().
* So if this function is called in a event handler, the actual save file will be called in the next frame. If we switch to a different scene, the game will crash.
* To solve this, add Director::getInstance()->getRenderer()->render(); after this function.
*
@ -239,7 +239,7 @@ public:
*/
inline void setClearStencil(int clearStencil) { _clearStencil = clearStencil; };
/** When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
/** When enabled, it will render its children into the texture automatically. Disabled by default for compatibility reasons.
* Will be enabled in the future.
*
* @return Return the autoDraw value.
@ -274,7 +274,7 @@ public:
/** Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
*
* @param keepMatrix Wether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
* @param keepMatrix Whether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
* @js NA
*/
void setKeepMatrix(bool keepMatrix);
@ -286,7 +286,7 @@ public:
void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport);
public:
/** FIXME: should be procted.
/** FIXME: should be protected.
* but due to a bug in PowerVR + Android,
* the constructor is public again.
* @js ctor
@ -303,7 +303,7 @@ public:
* @param w The RenderTexture object width.
* @param h The RenderTexture object height.
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
* @return If successed,it will return true.
* @return If succeed, it will return true.
*/
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format);
/** Initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format.
@ -312,7 +312,7 @@ public:
* @param h The RenderTexture object height.
* @param format In Points and a pixel format( only RGB and RGBA formats are valid ).
* @param depthStencilFormat The depthStencil format.
* @return If successed,it will return true.
* @return If succeed, it will return true.
*/
bool initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat format, GLuint depthStencilFormat);

View File

@ -615,7 +615,7 @@ protected:
//
// texture
Rect _rect; /// Retangle of Texture2D
Rect _rect; /// Rectangle of Texture2D
bool _rectRotated; /// Whether the texture is rotated
// Offset Position (used by Zwoptex)

View File

@ -88,7 +88,7 @@ public:
* @param tilesetInfo An tileset info.
* @param layerInfo A layer info.
* @param mapInfo A map info.
* @return If initializes successit will return true.
* @return If initializes successfully, it will return true.
*/
bool initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);

View File

@ -173,12 +173,12 @@ public:
Value getPropertiesForGID(int GID) const;
CC_DEPRECATED_ATTRIBUTE Value propertiesForGID(int GID) const { return getPropertiesForGID(GID); };
/** Assings properties to argument value, returns true if it did found properties
* for that GID and did assinged a value, else it returns false.
/** Assigns properties to argument value, returns true if it did found properties
* for that GID and did assigned a value, else it returns false.
*
* @param GID The tile GID.
* @param value Argument value.
* @return Return true if it did found properties for that GID and did assinged a value, else it returns false.
* @return Return true if it did found properties for that GID and did assigned a value, else it returns false.
*/
bool getPropertiesForGID(int GID, Value** value);

View File

@ -88,11 +88,11 @@ Rect TMXTilesetInfo::getRectForGID(uint32_t gid)
rect.size = _tileSize;
gid &= kTMXFlippedMask;
gid = gid - _firstGid;
// max_x means the colum count in tile map
// max_x means the column count in tile map
// in the origin:
// max_x = (int)((_imageSize.width - _margin*2 + _spacing) / (_tileSize.width + _spacing));
// but in editor "Tield", _margin variable only effect the left side
// for compatible with "Tield", change the max_x calculation
// but in editor "Tiled", _margin variable only effect the left side
// for compatible with "Tiled", change the max_x calculation
int max_x = (int)((_imageSize.width - _margin + _spacing) / (_tileSize.width + _spacing));
rect.origin.x = (gid % max_x) * (_tileSize.width + _spacing) + _margin;

View File

@ -45,7 +45,7 @@ class CC_DLL TextFieldDelegate
{
public:
/**
* Desctructor for TextFieldDelegate.
* Destructor for TextFieldDelegate.
* @js NA
*/
virtual ~TextFieldDelegate() {}

View File

@ -17,7 +17,7 @@
// Parse transmittance material parameter correctly.
// version 0.9.5 : Parse multiple group name.
// Add support of specifying the base path to load material file.
// version 0.9.4 : Initial suupport of group tag(g)
// version 0.9.4 : Initial support of group tag(g)
// version 0.9.3 : Fix parsing triple 'x/y/z'
// version 0.9.2 : Add more .mtl load support
// version 0.9.1 : Add initial .mtl load support

View File

@ -848,7 +848,7 @@ void Sprite3D::setCullFaceEnabled(bool enable)
Mesh* Sprite3D::getMeshByIndex(int index) const
{
CCASSERT(index < _meshes.size(), "invald index");
CCASSERT(index < _meshes.size(), "invalid index");
return _meshes.at(index);
}

View File

@ -66,7 +66,7 @@ public:
double minDelay;
/**
* Defautl constructor
* Default constructor
*
* @lua new
*/

View File

@ -93,7 +93,7 @@ public:
/**
* Whether the autorelease pool is doing `clear` operation.
*
* @return True if autorelase pool is clearning, false if not.
* @return True if autorelease pool is clearing, false if not.
*
* @js NA
* @lua NA
@ -161,7 +161,7 @@ public:
/**
* Get current auto release pool, there is at least one auto release pool that created by engine.
* You can create your own auto release pool at demand, which will be put into auto releae pool stack.
* You can create your own auto release pool at demand, which will be put into auto release pool stack.
*/
AutoreleasePool *getCurrentPool() const;

View File

@ -189,7 +189,7 @@ bool Configuration::checkForGLExtension(const std::string &searchName) const
//
// getters for specific variables.
// Mantained for backward compatiblity reasons only.
// Maintained for backward compatibility reasons only.
//
int Configuration::getMaxTextureSize() const
{

View File

@ -176,7 +176,7 @@ static void printFileUtils(int fd)
mydprintf(fd, "%s\n", item.c_str());
}
mydprintf(fd, "\nWriteble Path:\n");
mydprintf(fd, "\nWritable Path:\n");
mydprintf(fd, "%s\n", fu->getWritablePath().c_str());
mydprintf(fd, "\nFull Path Cache:\n");
@ -1146,7 +1146,7 @@ void Console::loop()
}
else if( nready == 0 )
{
/* timeout. do somethig ? */
/* timeout. do something ? */
}
else
{
@ -1189,7 +1189,7 @@ void Console::loop()
}
}
/* remove closed conections */
/* remove closed connections */
for(int fd: to_remove) {
FD_CLR(fd, &_read_set);
_fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end());

View File

@ -87,10 +87,10 @@ public:
/** Destructor */
virtual ~Console();
/** starts listening to specifed TCP port */
/** starts listening to specified TCP port */
bool listenOnTCP(int port);
/** starts listening to specifed file descriptor */
/** starts listening to specified file descriptor */
bool listenOnFileDescriptor(int fd);
/** stops the Console. 'stop' will be called at destruction time as well */

View File

@ -69,17 +69,17 @@ public:
~Data();
/**
* Overroads of operator=.
* Overloads of operator=.
*/
Data& operator= (const Data& other);
/**
* Overroads of operator=.
* Overloads of operator=.
*/
Data& operator= (Data&& other);
/**
* Gets internal bytes of Data. It will retrun the pointer directly used in Data, so don't delete it.
* Gets internal bytes of Data. It will return the pointer directly used in Data, so don't delete it.
*
* @return Pointer of bytes used internal in Data.
*/

View File

@ -696,7 +696,7 @@ static void GLToClipTransform(Mat4 *transformOut)
if(nullptr == transformOut) return;
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
auto projection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
auto modelview = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);

View File

@ -185,8 +185,8 @@ public:
/** Whether or not `_nextDeltaTimeZero` is set to 0. */
inline bool isNextDeltaTimeZero() { return _nextDeltaTimeZero; }
/**
* Sets the detal time between current frame and next frame is 0.
* This value will be used in Schedule, and will affect all functions that are using frame detal time, such as Actions.
* Sets the delta time between current frame and next frame is 0.
* This value will be used in Schedule, and will affect all functions that are using frame delta time, such as Actions.
* This value will take effect only one time.
*/
void setNextDeltaTimeZero(bool nextDeltaTimeZero);
@ -458,7 +458,7 @@ public:
* @js NA
*/
void popMatrix(MATRIX_STACK_TYPE type);
/** Adds an identity matrix to the top of specified type of matrxi stack.
/** Adds an identity matrix to the top of specified type of matrix stack.
* @js NA
*/
void loadIdentityMatrix(MATRIX_STACK_TYPE type);
@ -471,10 +471,10 @@ public:
*/
void loadMatrix(MATRIX_STACK_TYPE type, const Mat4& mat);
/**
* Multipies a matrix to the top of specified type of matrix stack.
* Multiplies a matrix to the top of specified type of matrix stack.
*
* @param type Matrix type.
* @param mat The matrix that to be multipied.
* @param mat The matrix that to be multiplied.
* @js NA
*/
void multiplyMatrix(MATRIX_STACK_TYPE type, const Mat4& mat);
@ -484,7 +484,7 @@ public:
*/
const Mat4& getMatrix(MATRIX_STACK_TYPE type);
/**
* Cleras all types of matrix stack, and add indentity matrix to these matrix stacks.
* Clear all types of matrix stack, and add identity matrix to these matrix stacks.
* @js NA
*/
void resetMatrixStack();

View File

@ -82,7 +82,7 @@ public:
/** Gets current target of the event.
* @return The target with which the event associates.
* @note It onlys be available when the event listener is associated with node.
* @note It's only available when the event listener is associated with node.
* It returns 0 when the listener is associated with fixed priority.
*/
inline Node* getCurrentTarget() { return _currentTarget; };

View File

@ -54,7 +54,7 @@ public:
AXIS_STATUS_CHANGED,
};
/** Create a EventController with controller event type, contrlloer and key code.
/** Create a EventController with controller event type, controller and key code.
*
* @param type A given controller event type.
* @param controller A given controller pointer.

View File

@ -828,8 +828,8 @@ void EventDispatcher::dispatchTouchEventToListeners(EventListenerVector* listene
}
}
// second, for all camera call all listeners
// get a copy of cameras, prevent it's been modified in linstener callback
// if camera's depth is greater, process it earler
// get a copy of cameras, prevent it's been modified in listener callback
// if camera's depth is greater, process it earlier
auto cameras = scene->getCameras();
Camera* camera;
for (int j = int(cameras.size()) - 1; j >= 0; --j)

View File

@ -84,7 +84,7 @@ public:
It will use a fixed priority of 1.
* @param eventName A given name of the event.
* @param callback A given callback method that associated the event name.
* @return the generated event. Needed in order to remove the event from the dispather
* @return the generated event. Needed in order to remove the event from the dispatcher
*/
EventListenerCustom* addCustomEventListener(const std::string &eventName, const std::function<void(EventCustom*)>& callback);

View File

@ -106,7 +106,7 @@ public:
/** Checks whether the listener is enabled.
*
* @return True if the listenrt is enabled.
* @return True if the listener is enabled.
*/
inline bool isEnabled() const { return _isEnabled; };

View File

@ -46,7 +46,7 @@ class EventCustom;
* auto listener = EventListenerCustom::create(callback);
* dispatcher->addEventListenerWithSceneGraphPriority(listener, one_node);
*
* Dispatchs a custom event:
* Dispatches a custom event:
*
* EventCustom event("your_event_type");
* dispatcher->dispatchEvent(&event);

View File

@ -110,7 +110,7 @@ protected:
bool attachDelegateWithIME(IMEDelegate * delegate);
/**
* Dettach the delegate to the IME
* Detach the delegate to the IME
*@see `attachDelegateWithIME(IMEDelegate*)`
*@param delegate A instance implements IMEDelegate delegate.
*@return Whether the IME is detached or not.

View File

@ -422,7 +422,7 @@ char* Properties::readLine(char* output, int num)
if (eof())
return nullptr;
// little optimization: avoid uneeded dereferences
// little optimization: avoid unneeded dereferences
const ssize_t dataIdx = *_dataIdx;
int i;

View File

@ -103,7 +103,7 @@ public:
/**
* Changes the OpacityModifyRGB property.
* If thie property is set to true, then the rendered color will be affected by opacity.
* If this property is set to true, then the rendered color will be affected by opacity.
* Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
*
* @param value If true, then the opacity will be applied as: glColor(R,G,B,opacity);
@ -208,14 +208,14 @@ public:
/**
* Returns the currently used texture
*
* @return The texture that is currenlty being used.
* @return The texture that is currently being used.
* @js NA
* @lua NA
*/
virtual Texture2D* getTexture() const = 0;
/**
* Sets a new texuture. It will be retained.
* Sets a new texture. It will be retained.
*
* @param texture A valid Texture2D object, which will be applied to this sprite object.
* @js NA

View File

@ -69,7 +69,7 @@ public:
};
/**
* Ref is used for reference count manangement. If a class inherits from Ref,
* Ref is used for reference count management. If a class inherits from Ref,
* then it is easy to be shared in different places.
* @js NA
*/
@ -91,7 +91,7 @@ public:
*
* This decrements the Ref's reference count.
*
* If the reference count reaches 0 after the descrement, this Ref is
* If the reference count reaches 0 after the decrement, this Ref is
* destructed.
*
* @see retain, autorelease
@ -102,10 +102,10 @@ public:
/**
* Releases the ownership sometime soon automatically.
*
* This descrements the Ref's reference count at the end of current
* This decrements the Ref's reference count at the end of current
* autorelease pool block.
*
* If the reference count reaches 0 after the descrement, this Ref is
* If the reference count reaches 0 after the decrement, this Ref is
* destructed.
*
* @returns The Ref itself.

View File

@ -329,7 +329,7 @@ void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, float in
void Scheduler::unschedule(const std::string &key, void *target)
{
// explicity handle nil arguments when removing an object
// explicit handle nil arguments when removing an object
if (target == nullptr || key.empty())
{
return;
@ -1070,7 +1070,7 @@ bool Scheduler::isScheduled(SEL_SCHEDULE selector, Ref *target)
void Scheduler::unschedule(SEL_SCHEDULE selector, Ref *target)
{
// explicity handle nil arguments when removing an object
// explicit handle nil arguments when removing an object
if (target == nullptr || selector == nullptr)
{
return;

View File

@ -364,7 +364,7 @@ struct SchedulerScriptData
void* node;
/**
* Construtor of SchedulerScriptData.
* Constructor of SchedulerScriptData.
*
* @js NA
* @lua NA
@ -428,7 +428,7 @@ struct TouchesScriptData
};
/**
* For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType convered to string type into the Lua stack as the parameters when the touch event is triggered.
* For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType converted to string type into the Lua stack as the parameters when the touch event is triggered.
* @js NA
*/
struct TouchScriptData
@ -479,7 +479,7 @@ struct TouchScriptData
/**
* For Lua, the KeypadScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push the actionType convered to string type into the Lua stack as the parameters when the Keypad event is triggered.
* For Lua, the KeypadScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push the actionType converted to string type into the Lua stack as the parameters when the Keypad event is triggered.
* @js NA
*/
struct KeypadScriptData
@ -781,9 +781,9 @@ public:
return _scriptEngine;
}
/**
* Set the ScriptEngineProtocol object should be managered.
* Set the ScriptEngineProtocol object should be managed.
*
* @param scriptEngine should be managered.
* @param scriptEngine should be managed.
*
* @lua NA
* @js NA
@ -791,7 +791,7 @@ public:
void setScriptEngine(ScriptEngineProtocol *scriptEngine);
/**
* Remove the ScriptEngineProtocol object managered.
* Remove the ScriptEngineProtocol object managed.
*
*
* @lua NA

View File

@ -44,7 +44,7 @@ class CC_DLL Touch : public Ref
{
public:
/**
* Dispatch mode, how the touches are dispathced.
* Dispatch mode, how the touches are dispatched.
* @js NA
*/
enum class DispatchMode {
@ -96,7 +96,7 @@ public:
*/
Vec2 getStartLocationInView() const;
/** Set the touch infomation. It always used to monitor touch event.
/** Set the touch information. It always used to monitor touch event.
*
* @param id A given id
* @param x A given x coordinate.

View File

@ -435,7 +435,7 @@ public:
}
/** @brief Removes all elements from the Vector (which are destroyed), leaving the container with a size of 0.
* @note All the elements in the Vector will be released (referece count will be decreased).
* @note All the elements in the Vector will be released (reference count will be decreased).
*/
void clear()
{

View File

@ -72,7 +72,7 @@ public:
// @brief Calculate the next power of two for a given size.
// Most blocks requested are already a power of two. For small block alloc
// this means we cannot add overhead, hence the slightly less performant
// this means we cannot add overhead, hence the slightly less performance
// searching of fixed block pages to determine size if none is specified.
CC_ALLOCATOR_INLINE size_t nextPow2BlockSize(size_t size) const
{

View File

@ -47,7 +47,7 @@ void* operator new[] (std::size_t size)
void* ptr = global.allocate(size);
assert(ptr && "No memory");
// dissabling exceptions since cocos2d-x doesn't use them
// disabling exceptions since cocos2d-x doesn't use them
//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID
// if (nullptr == ptr)
// throw std::bad_alloc();
@ -61,7 +61,7 @@ void* operator new(std::size_t size)
void* ptr = global.allocate(size);
assert(ptr && "No memory");
// dissabling exceptions since cocos2d-x doesn't use them
// disabling exceptions since cocos2d-x doesn't use them
//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID
// if (nullptr == ptr)
// throw std::bad_alloc();

View File

@ -158,7 +158,7 @@ void captureScreen(const std::function<void(bool, const std::string&)>& afterCap
{
if (s_captureScreenListener)
{
CCLOG("Warning: CaptureScreen has been caled yet, don't call more than once in one frame.");
CCLOG("Warning: CaptureScreen has been called already, don't call more than once in one frame.");
return;
}
s_captureScreenCommand.init(std::numeric_limits<float>::max());
@ -225,7 +225,7 @@ Rect getCascadeBoundingBox(Node *node)
Rect cbb;
Size contentSize = node->getContentSize();
// check all childrens bounding box, get maximize box
// check all children bounding box, get maximize box
Node* child = nullptr;
bool merge = false;
for(auto object : node->getChildren())

View File

@ -389,8 +389,8 @@ public:
/**
* Write a dictionary to a plist file.
* @param fullPath The full path of the plist file. You can get writeable path by getWritablePath()
* @return true if successed, false if failed
* @param fullPath The full path of the plist file. You can get writable path by getWritablePath()
* @return true if succeeded, false if failed
* @js NA
* @lua NA
*/

View File

@ -49,7 +49,7 @@ public:
virtual void addChild(cocos2d::Node* child, int localZOrder, const std::string &name) override;
virtual void addChild(cocos2d::Node* child, int localZOrder, int tag) override;
// remove child, and remove child from bone list and skeleton's sub bone map or rmeove it from skin list
// remove child, and remove child from bone list and skeleton's sub bone map or remove it from skin list
virtual void removeChild(Node* child, bool cleanup) override;
// get child bone list
@ -126,7 +126,7 @@ public:
virtual void setDebugDrawColor(const cocos2d::Color4F &color);
virtual cocos2d::Color4F getDebugDrawColor() const { return _rackColor; }
// get bone's bondingbox, depends on getVisibleSkinsRect, apply on node to parent's tranform
// get bone's bounding box, depends on getVisibleSkinsRect, apply on node to parent's transform
cocos2d::Rect getBoundingBox() const override;
/**
@ -137,19 +137,19 @@ public:
// transform & draw
virtual void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) override;
// set localzorder, and dirty the debugdraw to make debugdraw's render layer right
// set local zorder, and dirty the debugdraw to make debugdraw's render layer right
virtual void setLocalZOrder(int localZOrder) override;
// set name, and repalace the subbone map in skeleton
// set name, and replace the subbone map in skeleton
virtual void setName(const std::string& name) override;
// set visible, and dirty the debugdraw to make debugdraw's render layer right
virtual void setVisible(bool visible) override;
// set contentsize, and reculate debugdraw
// set contentsize, and recalculate debugdraw
virtual void setContentSize(const cocos2d::Size& contentSize) override;
// set localzorder, and reculate debugdraw
// set localzorder, and recalculate debugdraw
virtual void setAnchorPoint(const cocos2d::Vec2& anchorPoint) override;
#ifdef CC_STUDIO_ENABLED_VIEW
@ -200,7 +200,7 @@ protected:
// for batch bone's draw to _rootSkeleton
virtual void batchBoneDrawToSkeleton(BoneNode* bone) const;
// a help funciton for SkeletonNode
// a help function for SkeletonNode
// @param bone, visit bone's skins
virtual void visitSkins(cocos2d::Renderer* renderer, BoneNode* bone) const;

View File

@ -101,7 +101,7 @@ public:
void insertFrame(int index, ActionFrame* frame);
/**
* Pushs back a ActionFrame to ActionNode.
* Pushes back a ActionFrame to ActionNode.
*
* @param frame the ActionFrame which will be added
*/

View File

@ -493,7 +493,7 @@ void Armature::visit(cocos2d::Renderer *renderer, const Mat4 &parentTransform, u
// To ease the migration to v3.0, we still support the Mat4 stack,
// but it is deprecated and your code should not rely on it
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
CCASSERT(nullptr != director, "Director is null when setting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);

View File

@ -229,8 +229,8 @@ public:
*
* Similar to UserData, but instead of holding a void* it holds an object.
* The UserObject will be retained once in this method,
* and the previous UserObject (if existed) will be relese.
* The UserObject will be released in Node's destructure.
* and the previous UserObject (if existed) will be release.
* The UserObject will be released in Node's destructor.
*
* @param userObject A user assigned Object
*/

View File

@ -163,7 +163,7 @@ public:
/**
* @brief Juge whether or not need auto load sprite file
* @brief Judge whether or not need auto load sprite file
*/
bool isAutoLoadSpriteFile();
@ -177,7 +177,7 @@ protected:
RelativeData *getRelativeData(const std::string& configFilePath);
private:
/**
* @brief save amature datas
* @brief save armature datas
* @key std::string
* @value ArmatureData *
*/

View File

@ -450,7 +450,7 @@ public:
/**
* AnimationData include all movement infomation for the Armature
* AnimationData include all movement information for the Armature
* The struct is AnimationData -> MovementData -> MovementBoneData -> FrameData
* -> MovementFrameData
* @js NA

View File

@ -80,7 +80,7 @@ void ProcessBase::play(int durationTo, int durationTween, int loop, int tweenEa
/*
* Set m_iTotalFrames to durationTo, it is used for change tween between two animation.
* When changing end, m_iTotalFrames will be setted to _durationTween
* When changing end, m_iTotalFrames will be set to _durationTween
*/
_nextFrameIndex = durationTo;
_tweenEasing = (cocos2d::tweenfunc::TweenType)tweenEasing;
@ -96,7 +96,7 @@ void ProcessBase::update(float dt)
}
/*
* Fileter the m_iDuration <=0 and dt >1
* Filter the m_iDuration <=0 and dt >1
* If dt>1, generally speaking the reason is the device is stuck.
*/
if(_rawDuration <= 0 || dt > 1)
@ -122,7 +122,7 @@ void ProcessBase::update(float dt)
_currentPercent = _currentFrame / _nextFrameIndex;
/*
* if _currentFrame is bigger or equal than m_iTotalFrames, then reduce it util _currentFrame is
* if _currentFrame is bigger or equal than m_iTotalFrames, then reduce it until _currentFrame is
* smaller than m_iTotalFrames
*/
_currentFrame = fmodf(_currentFrame, _nextFrameIndex);

View File

@ -138,13 +138,13 @@ protected:
//! Scale the process speed
float _processScale;
//! Set and get whether the aniamtion is pause
//! Set and get whether the animation is pause
bool _isPause;
//! Set and get whether the aniamtion is complete
//! Set and get whether the animation is complete
bool _isComplete;
//! Set and get whether the aniamtion is playing
//! Set and get whether the animation is playing
bool _isPlaying;
//! Current percent this process arrived
@ -164,7 +164,7 @@ protected:
protected:
//! The durantion frame count will run
//! The duration frame count will run
int _durationTween;
//! Current frame this process arrived, this frame is tween frame

View File

@ -97,7 +97,7 @@ static int readLine (const char* begin, const char* end, Str* str) {
return 1;
}
/* Moves str->begin past the first occurence of c. Returns 0 on failure. */
/* Moves str->begin past the first occurrence of c. Returns 0 on failure. */
static int beginPast (Str* str, char c) {
const char* begin = str->begin;
while (1) {

View File

@ -62,16 +62,16 @@ struct CC_DLL AffineTransform {
CC_DLL AffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty);
#define AffineTransformMake __CCAffineTransformMake
/**Multiply point (x,y,1) by a affine tranform.*/
/**Multiply point (x,y,1) by a affine transform.*/
CC_DLL Vec2 __CCPointApplyAffineTransform(const Vec2& point, const AffineTransform& t);
#define PointApplyAffineTransform __CCPointApplyAffineTransform
/**Multiply size (width,height,0) by a affine tranform.*/
/**Multiply size (width,height,0) by a affine transform.*/
CC_DLL Size __CCSizeApplyAffineTransform(const Size& size, const AffineTransform& t);
#define SizeApplyAffineTransform __CCSizeApplyAffineTransform
/**Make identity affine transform.*/
CC_DLL AffineTransform AffineTransformMakeIdentity();
/**Transform Rect, which will transform the four vertice of the point.*/
/**Transform Rect, which will transform the four vertices of the point.*/
CC_DLL Rect RectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform);
/**@{
Transform vec2 and Rect by Mat4.
@ -82,7 +82,7 @@ CC_DLL Vec2 PointApplyTransform(const Vec2& point, const Mat4& transform);
/**
Translation, equals
1 0 1
0 1 0 * affinetransform
0 1 0 * affine transform
tx ty 1
*/
CC_DLL AffineTransform AffineTransformTranslate(const AffineTransform& t, float tx, float ty);

View File

@ -54,7 +54,7 @@ struct CC_DLL NavMeshAgentParam
float pathOptimizationRange; ///< The path visibility optimization range. [Limit: > 0]
/// How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0]
/// How aggressive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0]
float separationWeight;
/// Flags that impact steering behavior. (See: #UpdateFlags)
@ -148,7 +148,7 @@ public:
*/
void move(const Vec3 &destination, const MoveCallback &callback = nullptr);
/** puase movement */
/** pause movement */
void pause();
/** resume movement */

View File

@ -405,7 +405,7 @@ PhysicsShape* PhysicsBody::addShape(PhysicsShape* shape, bool addMassAndMoment/*
{
shape->setBody(this);
// calculate the area, mass, and desity
// calculate the area, mass, and density
// area must update before mass, because the density changes depend on it.
if (addMassAndMoment)
{

View File

@ -56,7 +56,7 @@ const PhysicsMaterial PHYSICSBODY_MATERIAL_DEFAULT(0.1f, 0.5f, 0.5f);
* A body affect by physics.
*
* It can attach one or more shapes.
* If you create body with createXXX, it will automatically compute mass and moment with density your specified(which is PHYSICSBODY_MATERIAL_DEFAULT by default, and the density value is 0.1f), and it based on the formular: mass = density * area.
* If you create body with createXXX, it will automatically compute mass and moment with density your specified(which is PHYSICSBODY_MATERIAL_DEFAULT by default, and the density value is 0.1f), and it based on the formula: mass = density * area.
* If you create body with createEdgeXXX, the mass and moment will be PHYSICS_INFINITY by default. And it's a static body.
* You can change mass and moment with setMass() and setMoment(). And you can change the body to be dynamic or static by use function setDynamic().
*/
@ -96,7 +96,7 @@ public:
*
* @param radius A float number, it is the circle's radius.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsBody object pointer.
*/
static PhysicsBody* createCircle(float radius, const PhysicsMaterial& material = PHYSICSBODY_MATERIAL_DEFAULT, const Vec2& offset = Vec2::ZERO);
@ -105,7 +105,7 @@ public:
*
* @param size Size contains this box's width and height.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsBody object pointer.
*/
static PhysicsBody* createBox(const Size& size, const PhysicsMaterial& material = PHYSICSBODY_MATERIAL_DEFAULT, const Vec2& offset = Vec2::ZERO);
@ -114,9 +114,9 @@ public:
* @brief Create a body contains a polygon shape.
*
* @param points Points is an array of Vec2 structs defining a convex hull with a clockwise winding.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsBody object pointer.
*/
static PhysicsBody* createPolygon(const Vec2* points, int count, const PhysicsMaterial& material = PHYSICSBODY_MATERIAL_DEFAULT, const Vec2& offset = Vec2::ZERO);
@ -137,7 +137,7 @@ public:
* @param size Size contains this box's width and height.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsBody object pointer.
*/
static PhysicsBody* createEdgeBox(const Size& size, const PhysicsMaterial& material = PHYSICSBODY_MATERIAL_DEFAULT, float border = 1, const Vec2& offset = Vec2::ZERO);
@ -146,7 +146,7 @@ public:
* Create a body contains a EdgePolygon shape.
*
* @param points Points is an array of Vec2 structs defining a convex hull with a clockwise winding.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @return An autoreleased PhysicsBody object pointer.
@ -157,7 +157,7 @@ public:
* Create a body contains a EdgeChain shape.
*
* @param points A Vec2 object pointer, it contains an array of points.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @return An autoreleased PhysicsBody object pointer.
@ -203,7 +203,7 @@ public:
/**
* get the shape of the body.
*
* @param tag An interger number that identifies a PhysicsShape object.
* @param tag An integer number that identifies a PhysicsShape object.
* @return A PhysicsShape object pointer or nullptr if no shapes were found.
*/
PhysicsShape* getShape(int tag) const;
@ -212,7 +212,7 @@ public:
* Applies a continuous force to body.
*
* @param force The force is applies to this body.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in world coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in world coordinates.
*/
virtual void applyForce(const Vec2& force, const Vec2& offset = Vec2::ZERO);
@ -225,7 +225,7 @@ public:
* Applies a immediate force to body.
*
* @param impulse The impulse is applies to this body.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in world coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in world coordinates.
*/
virtual void applyImpulse(const Vec2& impulse, const Vec2& offset = Vec2::ZERO);
@ -290,23 +290,23 @@ public:
* A mask that defines which categories this physics body belongs to.
*
* Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
* @param bitmask An interger number, the default value is 0xFFFFFFFF (all bits set).
* @param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set).
*/
void setCategoryBitmask(int bitmask);
/**
* A mask that defines which categories of bodies cause intersection notifications with this physics body.
*
* When two bodies share the same space, each bodys category mask is tested against the other bodys contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics worlds delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
* @param bitmask An interger number, the default value is 0x00000000 (all bits cleared).
* When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics worlds delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
* @param bitmask An integer number, the default value is 0x00000000 (all bits cleared).
*/
void setContactTestBitmask(int bitmask);
/**
* A mask that defines which categories of physics bodies can collide with this physics body.
*
* When two physics bodies contact each other, a collision may occur. This bodys collision mask is compared to the other bodys category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a bodys velocity.
* @param bitmask An interger number, the default value is 0xFFFFFFFF (all bits set).
* When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity.
* @param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set).
*/
void setCollisionBitmask(int bitmask);
@ -460,7 +460,7 @@ public:
/** Set the body is allow rotation or not */
void setRotationEnable(bool enable);
/** Whether this physics body is affected by the physics worlds gravitational force. */
/** Whether this physics body is affected by the physics world's gravitational force. */
inline bool isGravityEnabled() const { return _gravityEnabled; }
/** Set the body is affected by the physics world's gravitational force or not. */

View File

@ -60,9 +60,9 @@ typedef struct CC_DLL PhysicsContactData
*/
/**
* @brief Contact infomation.
* @brief Contact information.
* It will created automatically when two shape contact with each other. And it will destoried automatically when two shape separated.
* It will created automatically when two shape contact with each other. And it will destroyed automatically when two shape separated.
*/
class CC_DLL PhysicsContact : public EventCustom
{
@ -98,7 +98,7 @@ public:
/**
* @brief Set data to contact.
* You must manage the memory yourself, Generally you can set data at contact begin, and distory it at contact separate.
* You must manage the memory yourself, Generally you can set data at contact begin, and destroy it at contact separate.
*
* @lua NA
*/
@ -197,7 +197,7 @@ private:
friend class EventListenerPhysicsContact;
};
/** Contact listener. It will recive all the contact callbacks. */
/** Contact listener. It will receive all the contact callbacks. */
class CC_DLL EventListenerPhysicsContact : public EventListenerCustom
{
public:

View File

@ -74,7 +74,7 @@ public:
Make cpVect array convert to Vec2 array.
@param cpvs The be converted object, it's a cpVect array.
@param out The coverted object, it's a Vec2 array.
@param out The converted object, it's a Vec2 array.
@param count It's cpvs array length.
@return The out object's pointer.
*/
@ -92,7 +92,7 @@ public:
Make Vec2 array convert to cpVect array.
@param points The be converted object, it's a Vec2 array.
@param out The coverted object, it's a cpVect array.
@param out The converted object, it's a cpVect array.
@param count It's points array length.
@return The out object's pointer.
*/

View File

@ -68,14 +68,14 @@ public:
/**
* Get this joint's tag.
*
* @return An interger number.
* @return An integer number.
*/
inline int getTag() const { return _tag; }
/**
* Set this joint's tag.
*
* @param tag An interger number that identifies a PhysicsJoint.
* @param tag An integer number that identifies a PhysicsJoint.
*/
inline void setTag(int tag) { _tag = tag; }
@ -85,7 +85,7 @@ public:
/** Enable/Disable the joint. */
void setEnable(bool enable);
/** Determines if the collsion is enable. */
/** Determines if the collision is enable. */
inline bool isCollisionEnabled() const { return _collisionEnable; }
/** Enable/disable the collision between two bodies. */

View File

@ -125,14 +125,14 @@ public:
/**
* Set this shape's tag.
*
* @param tag An interger number that identifies a shape object.
* @param tag An integer number that identifies a shape object.
*/
inline void setTag(int tag) { _tag = tag; }
/**
* Get this shape's tag.
*
* @return An interger number.
* @return An integer number.
*/
inline int getTag() const { return _tag; }
@ -221,7 +221,7 @@ public:
/**
* Calculate the default moment value.
*
* This function should be overrided in inherit classes.
* This function should be overridden in inherit classes.
* @return A float number, equals 0.0.
*/
virtual float calculateDefaultMoment() { return 0.0f; }
@ -229,7 +229,7 @@ public:
/**
* Get this shape's position offset.
*
* This function should be overrided in inherit classes.
* This function should be overridden in inherit classes.
* @return A Vec2 object.
*/
virtual Vec2 getOffset() { return Vec2::ZERO; }
@ -237,7 +237,7 @@ public:
/**
* Get this shape's center position.
*
* This function should be overrided in inherit classes.
* This function should be overridden in inherit classes.
* @return A Vec2 object.
*/
virtual Vec2 getCenter() { return getOffset(); }
@ -254,7 +254,7 @@ public:
* Move the points to the center.
*
* @param points A Vec2 object pointer.
* @param count An interger number.
* @param count An integer number.
* @param center A Vec2 object, default value is Vec2(0,0).
*/
static void recenterPoints(Vec2* points, int count, const Vec2& center = Vec2::ZERO);
@ -263,7 +263,7 @@ public:
* Get center of the polyon points.
*
* @param points A Vec2 object pointer.
* @param count An interger number.
* @param count An integer number.
* @return A Vec2 object.
*/
static Vec2 getPolyonCenter(const Vec2* points, int count);
@ -272,14 +272,14 @@ public:
* Set a mask that defines which categories this physics body belongs to.
*
* Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
* @param bitmask An interger number, the default value is 0xFFFFFFFF (all bits set).
* @param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set).
*/
inline void setCategoryBitmask(int bitmask) { _categoryBitmask = bitmask; }
/**
* Get a mask that defines which categories this physics body belongs to.
*
* @return An interger number.
* @return An integer number.
*/
inline int getCategoryBitmask() const { return _categoryBitmask; }
@ -287,30 +287,30 @@ public:
/**
* A mask that defines which categories of bodies cause intersection notifications with this physics body.
*
* When two bodies share the same space, each bodys category mask is tested against the other bodys contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics worlds delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
* @param bitmask An interger number, the default value is 0x00000000 (all bits cleared).
* When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics worlds delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
* @param bitmask An integer number, the default value is 0x00000000 (all bits cleared).
*/
inline void setContactTestBitmask(int bitmask) { _contactTestBitmask = bitmask; }
/**
* Get a mask that defines which categories of bodies cause intersection notifications with this physics body.
*
* @return An interger number.
* @return An integer number.
*/
inline int getContactTestBitmask() const { return _contactTestBitmask; }
/**
* A mask that defines which categories of physics bodies can collide with this physics body.
*
* When two physics bodies contact each other, a collision may occur. This bodys collision mask is compared to the other bodys category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a bodys velocity.
* @param bitmask An interger number, the default value is 0xFFFFFFFF (all bits set).
* When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity.
* @param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set).
*/
inline void setCollisionBitmask(int bitmask) { _collisionBitmask = bitmask; }
/**
* Get a mask that defines which categories of physics bodies can collide with this physics body.
*
* @return An interger number.
* @return An integer number.
*/
inline int getCollisionBitmask() const { return _collisionBitmask; }
@ -318,14 +318,14 @@ public:
* Set the group of body.
*
* Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index).
* @param group An interger number, it have high priority than bit masks.
* @param group An integer number, it have high priority than bit masks.
*/
void setGroup(int group);
/**
* Get the group of body.
*
* @return An interger number.
* @return An integer number.
*/
inline int getGroup() { return _group; }
@ -378,7 +378,7 @@ public:
*
* @param radius A float number, it is the circle's radius.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsShapeCircle object pointer.
*/
static PhysicsShapeCircle* create(float radius, const PhysicsMaterial& material = PHYSICSSHAPE_MATERIAL_DEFAULT, const Vec2& offset = Vec2(0, 0));
@ -396,7 +396,7 @@ public:
*
* @param mass A float number
* @param radius A float number
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return A float number
*/
static float calculateMoment(float mass, float radius, const Vec2& offset = Vec2::ZERO);
@ -440,9 +440,9 @@ public:
* Creates a PhysicsShapePolygon with specified value.
*
* @param points A Vec2 object pointer, it is an array of Vec2.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsShapePolygon object pointer.
*/
static PhysicsShapePolygon* create(const Vec2* points, int count, const PhysicsMaterial& material = PHYSICSSHAPE_MATERIAL_DEFAULT, const Vec2& offset = Vec2::ZERO);
@ -451,7 +451,7 @@ public:
* Calculate the area of a polygon with specified value.
*
* @param points A Vec2 object pointer, it is an array of Vec2.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @return A float number.
*/
static float calculateArea(const Vec2* points, int count);
@ -461,8 +461,8 @@ public:
*
* @param mass A float number
* @param points A Vec2 object pointer, it is an array of Vec2.
* @param count An interger number, contains the count of the points array.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param count An integer number, contains the count of the points array.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return A float number
*/
static float calculateMoment(float mass, const Vec2* points, int count, const Vec2& offset = Vec2::ZERO);
@ -492,7 +492,7 @@ public:
/**
* Get this polygon's points array count.
*
* @return An interger number.
* @return An integer number.
*/
int getPointsCount() const;
@ -521,7 +521,7 @@ public:
*
* @param size Size contains this box's width and height.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsShapeBox object pointer.
*/
static PhysicsShapeBox* create(const Size& size, const PhysicsMaterial& material = PHYSICSSHAPE_MATERIAL_DEFAULT, const Vec2& offset = Vec2::ZERO);
@ -603,7 +603,7 @@ public:
* Creates a PhysicsShapeEdgePolygon with specified value.
*
* @param points A Vec2 object pointer, it contains an array of points.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @return An autoreleased PhysicsShapeEdgePolygon object pointer.
@ -627,7 +627,7 @@ public:
/**
* Get this polygon's points array count.
*
* @return An interger number.
* @return An integer number.
*/
int getPointsCount() const;
@ -652,7 +652,7 @@ public:
* @param size Size contains this box's width and height.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @param offset A Vec2 object, it is the offset from the bodys center of gravity in body local coordinates.
* @param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
* @return An autoreleased PhysicsShapeEdgeBox object pointer.
*/
static PhysicsShapeEdgeBox* create(const Size& size, const PhysicsMaterial& material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 0, const Vec2& offset = Vec2::ZERO);
@ -682,7 +682,7 @@ public:
* Creates a PhysicsShapeEdgeChain with specified value.
*
* @param points A Vec2 object pointer, it contains an array of points.
* @param count An interger number, contains the count of the points array.
* @param count An integer number, contains the count of the points array.
* @param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
* @param border It's a edge's border width.
* @return An autoreleased PhysicsShapeEdgeChain object pointer.
@ -706,7 +706,7 @@ public:
/**
* Get this chain's points array count.
*
* @return An interger number.
* @return An integer number.
*/
int getPointsCount() const;

View File

@ -532,11 +532,11 @@ void PhysicsWorld::removeBody(PhysicsBody* body)
{
if (body->getWorld() != this)
{
CCLOG("Physics Warnning: this body doesn't belong to this world");
CCLOG("Physics Warning: this body doesn't belong to this world");
return;
}
// destory the body's joints
// destroy the body's joints
auto removeCopy = body->_joints;
for (auto joint : removeCopy)
{
@ -575,7 +575,7 @@ void PhysicsWorld::removeJoint(PhysicsJoint* joint, bool destroy)
{
if (joint->getWorld() != this && destroy)
{
CCLOG("physics warnning: the joint is not in this world, it won't be destoried utill the body it conntect is destoried");
CCLOG("physics warning: the joint is not in this world, it won't be destroyed until the body it connects is destroyed");
return;
}
@ -690,7 +690,7 @@ void PhysicsWorld::doRemoveBody(PhysicsBody* body)
{
CCASSERT(body != nullptr, "the body can not be nullptr");
// remove shaps
// remove shapes
for (auto& shape : body->getShapes())
{
removeShape(shape);

View File

@ -139,7 +139,7 @@ public:
*
* If this world is not locked, the object is removed immediately, otherwise at next frame.
* @attention If this body has joints, those joints will be removed also.
* @param tag An interger number that identifies a PhysicsBody object.
* @param tag An integer number that identifies a PhysicsBody object.
*/
virtual void removeBody(int tag);
@ -182,7 +182,7 @@ public:
void queryPoint(PhysicsQueryPointCallbackFunc func, const Vec2& point, void* data);
/**
* Get phsyics shapes that contains the point.
* Get physics shapes that contains the point.
*
* All shapes contains the point will be pushed in a Vector<PhysicsShape*> object.
* @attention The point must lie inside a shape.
@ -192,7 +192,7 @@ public:
Vector<PhysicsShape*> getShapes(const Vec2& point) const;
/**
* Get the nearest phsyics shape that contains the point.
* Get the nearest physics shape that contains the point.
*
* Query this physics world at point and return the closest shape.
* @param point A Vec2 object contains the position of the point.
@ -201,7 +201,7 @@ public:
PhysicsShape* getShape(const Vec2& point) const;
/**
* Get all the bodys that in this physics world.
* Get all the bodies that in this physics world.
*
* @return A Vector<PhysicsBody*>& object contains all bodies in this physics world.
*/
@ -210,7 +210,7 @@ public:
/**
* Get a body by tag.
*
* @param tag An interger number that identifies a PhysicsBody object.
* @param tag An integer number that identifies a PhysicsBody object.
* @return A PhysicsBody object pointer or nullptr if no shapes were found.
*/
PhysicsBody* getBody(int tag) const;
@ -258,7 +258,7 @@ public:
* Update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes.
* Set it higher can improve performance, set it lower can improve accuracy of physics world simulation.
* @attention if you setAutoStep(false), this won't work.
* @param rate An interger number, default value is 1.0.
* @param rate An integer number, default value is 1.0.
*/
inline void setUpdateRate(int rate) { if(rate > 0) { _updateRate = rate; } }
@ -266,7 +266,7 @@ public:
/**
* Get the update rate of this physics world.
*
* @return An interger number.
* @return An integer number.
*/
inline int getUpdateRate() { return _updateRate; }
@ -274,29 +274,29 @@ public:
* set the number of substeps in an update of the physics world.
*
* One physics update will be divided into several substeps to increase its accuracy.
* @param steps An interger number, default value is 1.
* @param steps An integer number, default value is 1.
*/
void setSubsteps(int steps);
/**
* Get the number of substeps of this physics world.
*
* @return An interger number.
* @return An integer number.
*/
inline int getSubsteps() const { return _substeps; }
/**
* Set the debug draw mask of this physics world.
*
* This physics world will draw shapes and joints by DrawNode acoording to mask.
* This physics world will draw shapes and joints by DrawNode according to mask.
* @param mask Mask has four value:DEBUGDRAW_NONE, DEBUGDRAW_SHAPE, DEBUGDRAW_JOINT, DEBUGDRAW_CONTACT and DEBUGDRAW_ALL, default is DEBUGDRAW_NONE
*/
void setDebugDrawMask(int mask);
/**
* Get the bebug draw mask.
* Get the debug draw mask.
*
* @return An interger number.
* @return An integer number.
*/
inline int getDebugDrawMask() { return _debugDrawMask; }
@ -305,7 +305,7 @@ public:
*
* If you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
* @attention If you set auto step to false, setSpeed setSubsteps and setUpdateRate won't work, you need to control the time step by yourself.
* @param autoStep A bool object, defaut value is true.
* @param autoStep A bool object, default value is true.
*/
void setAutoStep(bool autoStep){ _autoStep = autoStep; }

View File

@ -184,7 +184,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
* Hinge constraint restricts two additional angular degrees of freedom, so the body can only rotate around one axis, the hinge axis. This can be useful to represent doors or wheels rotating around one axis.
* hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
* hinge constraint between two rigidbodies each with a pivotpoint that describes the axis location in local space
*/
class CC_DLL Physics3DHingeConstraint : public Physics3DConstraint
{
@ -285,7 +285,7 @@ public:
bool getAngularOnly() const;
/**get enable angular motor*/
bool getEnableAngularMotor() const;
/**get motor target velosity*/
/**get motor target velocity*/
float getMotorTargetVelosity() const;
/**get max motor impulse*/
float getMaxMotorImpulse() const;
@ -339,13 +339,13 @@ public:
void setUpperLinLimit(float upperLimit);
/**get lower angular limit*/
float getLowerAngLimit() const;
/**set lower angualr limit*/
/**set lower angular limit*/
void setLowerAngLimit(float lowerLimit);
/**get upper anglular limit*/
/**get upper angular limit*/
float getUpperAngLimit() const;
/**set upper anglular limit*/
/**set upper angular limit*/
void setUpperAngLimit(float upperLimit);
/**use A's frame as linear refference*/
/**use A's frame as linear reference*/
bool getUseLinearReferenceFrameA() const;
float getSoftnessDirLin() const;

View File

@ -379,7 +379,7 @@ struct CC_DLL Physics3DColliderDes
float restitution;
/**the hit fraction*/
float hitFraction;
/**the swep sphere radius*/
/**the swept sphere radius*/
float ccdSweptSphereRadius;
/**the motion threshold*/
float ccdMotionThreshold;

View File

@ -86,7 +86,7 @@ public:
/**
* create capsule shape
* @param radius The radius of casule.
* @param radius The radius of capsule.
* @param height The height (cylinder part).
*/
static Physics3DShape* createCapsule(float radius, float height);

View File

@ -86,7 +86,7 @@ bool Physics3DWorld::init(Physics3DWorldDes* info)
_collisionConfiguration = new (std::nothrow) btDefaultCollisionConfiguration();
//_collisionConfiguration->setConvexConvexMultipointIterations();
///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
///use the default collision dispatcher. For parallel processing you can use a different dispatcher (see Extras/BulletMultiThreaded)
_dispatcher = new (std::nothrow) btCollisionDispatcher(_collisionConfiguration);
_broadphase = new (std::nothrow) btDbvtBroadphase();

View File

@ -1185,7 +1185,7 @@ bool FileUtils::removeDirectory(const std::string& path)
{
if (path.size() > 0 && path[path.size() - 1] != '/')
{
CCLOGERROR("Fail to remove directory, path must termniate with '/': %s", path.c_str());
CCLOGERROR("Fail to remove directory, path must terminate with '/': %s", path.c_str());
return false;
}

View File

@ -377,7 +377,7 @@ public:
* Windows fopen can't support UTF-8 filename
* Need convert all parameters fopen and other 3rd-party libs
*
* @param filename std::string name file for convertation from utf-8
* @param filename std::string name file for conversion from utf-8
* @return std::string ansi filename in current locale
*/
virtual std::string getSuitableFOpen(const std::string& filenameUtf8) const;
@ -488,7 +488,7 @@ protected:
*
* @note When you are porting Cocos2d-x to a new platform, you may need to take care of this method.
* You could assign a default value to _defaultResRootPath in the subclass of FileUtils(e.g. FileUtilsAndroid). Then invoke the FileUtils::init().
* @return true if successed, otherwise it returns false.
* @return true if succeed, otherwise it returns false.
*
*/
virtual bool init();

View File

@ -86,7 +86,7 @@ namespace {
}
//default context attributions are setted as follows
//default context attributions are set as follows
GLContextAttrs GLView::_glContextAttrs = {5, 6, 5, 0, 16, 0};
void GLView::setGLContextAttrs(GLContextAttrs& glContextAttrs)

View File

@ -522,7 +522,7 @@ bool Image::initWithImageData(const unsigned char * data, ssize_t dataLen)
unsigned char* unpackedData = nullptr;
ssize_t unpackedLen = 0;
//detecgt and unzip the compress file
//detect and unzip the compress file
if (ZipUtils::isCCZBuffer(data, dataLen))
{
unpackedLen = ZipUtils::inflateCCZBuffer(data, dataLen, &unpackedData);
@ -789,8 +789,8 @@ namespace
/* Always display the message. */
/* We could postpone this until after returning, if we chose. */
/* internal message function cann't show error message in some platforms, so we rewrite it here.
* edit it if has version confilict.
/* internal message function can't show error message in some platforms, so we rewrite it here.
* edit it if has version conflict.
*/
//(*cinfo->err->output_message) (cinfo);
char buffer[JMSG_LENGTH_MAX];
@ -1597,7 +1597,7 @@ bool Image::initWithPVRv3Data(const unsigned char * data, ssize_t dataLen)
memcpy(_data, static_cast<const unsigned char*>(data) + sizeof(PVRv3TexHeader) + header->metadataLength, _dataLen);
_numberOfMipmaps = header->numberOfMipmaps;
CCAssert(_numberOfMipmaps < MIPMAP_MAX, "Image: Maximum number of mimpaps reached. Increate the CC_MIPMAP_MAX value");
CCAssert(_numberOfMipmaps < MIPMAP_MAX, "Image: Maximum number of mimpaps reached. Increase the CC_MIPMAP_MAX value");
for (int i = 0; i < _numberOfMipmaps; i++)
{
@ -1685,7 +1685,7 @@ bool Image::initWithPVRv3Data(const unsigned char * data, ssize_t dataLen)
}
dataOffset += packetLength;
CCAssert(dataOffset <= _dataLen, "CCTexurePVR: Invalid lenght");
CCAssert(dataOffset <= _dataLen, "CCTexurePVR: Invalid length");
width = MAX(width >> 1, 1);
@ -1769,7 +1769,7 @@ bool Image::initWithTGAData(tImageTGA* tgaData)
if (2 == tgaData->type || 10 == tgaData->type)
{
// true color
// unsupport RGB555
// unsupported RGB555
if (tgaData->pixelDepth == 16)
{
_renderFormat = Texture2D::PixelFormat::RGB5A1;
@ -1784,7 +1784,7 @@ bool Image::initWithTGAData(tImageTGA* tgaData)
}
else
{
CCLOG("Image WARNING: unsupport true color tga data pixel format. FILE: %s", _filePath.c_str());
CCLOG("Image WARNING: unsupported true color tga data pixel format. FILE: %s", _filePath.c_str());
break;
}
}
@ -1798,7 +1798,7 @@ bool Image::initWithTGAData(tImageTGA* tgaData)
else
{
// actually this won't happen, if it happens, maybe the image file is not a tga
CCLOG("Image WARNING: unsupport gray tga data pixel format. FILE: %s", _filePath.c_str());
CCLOG("Image WARNING: unsupported gray tga data pixel format. FILE: %s", _filePath.c_str());
break;
}
}
@ -1890,7 +1890,7 @@ bool Image::initWithS3TCData(const unsigned char * data, ssize_t dataLen)
/* if hardware supports s3tc, set pixelformat before loading mipmaps, to support non-mipmapped textures */
if (Configuration::getInstance()->supportsS3TC())
{ //decode texture throught hardware
{ //decode texture through hardware
if (FOURCC_DXT1 == header->ddsd.DUMMYUNIONNAMEN4.ddpfPixelFormat.fourCC)
{
@ -1922,7 +1922,7 @@ bool Image::initWithS3TCData(const unsigned char * data, ssize_t dataLen)
int size = ((width+3)/4)*((height+3)/4)*blockSize;
if (Configuration::getInstance()->supportsS3TC())
{ //decode texture throught hardware
{ //decode texture through hardware
_mipmaps[i].address = (unsigned char *)_data + encodeOffset;
_mipmaps[i].len = size;
}
@ -1997,7 +1997,7 @@ bool Image::initWithATITCData(const unsigned char *data, ssize_t dataLen)
/* pixelData point to the compressed data address */
unsigned char *pixelData = (unsigned char *)data + sizeof(ATITCTexHeader) + header->bytesOfKeyValueData + 4;
/* caculate the dataLen */
/* calculate the dataLen */
int width = _width;
int height = _height;
@ -2036,7 +2036,7 @@ bool Image::initWithATITCData(const unsigned char *data, ssize_t dataLen)
if (Configuration::getInstance()->supportsATITC())
{
/* decode texture throught hardware */
/* decode texture through hardware */
CCLOG("this is atitc H decode");

View File

@ -179,7 +179,7 @@ protected:
protected:
/**
@brief Determine how many mipmaps can we have.
Its same as define but it respects namespaces
It's same as define but it respects namespaces
*/
static const int MIPMAP_MAX = 16;
unsigned char *_data;
@ -191,7 +191,7 @@ protected:
Texture2D::PixelFormat _renderFormat;
MipmapInfo _mipmaps[MIPMAP_MAX]; // pointer to mipmap images
int _numberOfMipmaps;
// false if we cann't auto detect the image is premultiplied or not.
// false if we can't auto detect the image is premultiplied or not.
bool _hasPremultipliedAlpha;
std::string _filePath;

View File

@ -293,7 +293,7 @@ public: virtual void set##funName(varType var) \
/** @def CC_DEPRECATED(...)
* Macro to mark things deprecated as of a particular version
* can be used with artibrary parameters which are thrown away.
* can be used with arbitrary parameters which are thrown away.
* e.g. CC_DEPRECATED(4.0) or CC_DEPRECATED(4.0, "not going to need this anymore") etc.
*/
#define CC_DEPRECATED(...) CC_DEPRECATED_ATTRIBUTE

View File

@ -58,7 +58,7 @@ public:
static void setassetmanager(AAssetManager* a);
static AAssetManager* getAssetManager() { return assetmanager; }
/* override funtions */
/* override functions */
bool init();
virtual std::string getNewFilename(const std::string &filename) const override;

View File

@ -61,7 +61,7 @@ public:
int run();
/**
@brief Get current applicaiton instance.
@brief Get current application instance.
@return Current application instance pointer.
*/
static Application* getInstance();

View File

@ -66,7 +66,7 @@ public:
int run();
/**
@brief Get current applicaiton instance.
@brief Get current application instance.
@return Current application instance pointer.
*/
static Application* getInstance();

View File

@ -56,7 +56,7 @@ public:
int run();
/**
@brief Get current applicaiton instance.
@brief Get current application instance.
@return Current application instance pointer.
*/
static Application* getInstance();

View File

@ -47,7 +47,7 @@ class CC_DLL FileUtilsWin32 : public FileUtils
friend class FileUtils;
FileUtilsWin32();
public:
/* override funtions */
/* override functions */
bool init();
virtual std::string getWritablePath() const override;
virtual bool isAbsolutePath(const std::string& strPath) const override;

View File

@ -49,7 +49,7 @@ public:
int run();
/**
@brief Get current applicaiton instance.
@brief Get current application instance.
@return Current application instance pointer.
*/
static Application* getInstance();

View File

@ -42,8 +42,8 @@ BatchCommand::BatchCommand()
void BatchCommand::init(float globalOrder, GLProgram* shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4& modelViewTransform, uint32_t flags)
{
CCASSERT(shader, "shader cannot be nill");
CCASSERT(textureAtlas, "textureAtlas cannot be nill");
CCASSERT(shader, "shader cannot be null");
CCASSERT(textureAtlas, "textureAtlas cannot be null");
RenderCommand::init(globalOrder, modelViewTransform, flags);
_textureID = textureAtlas->getTexture()->getName();

View File

@ -197,7 +197,7 @@ void GLProgramCache::loadDefaultGLPrograms()
_programs.insert( std::make_pair(GLProgram::SHADER_NAME_POSITION_U_COLOR, p) );
//
// Position, Legth(TexCoords, Color (used by Draw Node basically )
// Position, Length(TexCoords, Color (used by Draw Node basically )
//
p = new (std::nothrow) GLProgram();
loadDefaultGLProgram(p, kShaderType_PositionLengthTexureColor);
@ -338,7 +338,7 @@ void GLProgramCache::reloadDefaultGLPrograms()
loadDefaultGLProgram(p, kShaderType_Position_uColor);
//
// Position, Legth(TexCoords, Color (used by Draw Node basically )
// Position, Length(TexCoords, Color (used by Draw Node basically )
//
p = getGLProgram(GLProgram::SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR);
p->reset();

View File

@ -408,7 +408,7 @@ GLProgramState* GLProgramState::clone() const
glprogramstate->_boundTextureUnits = this->_boundTextureUnits;
// _nodeBinding is null since a node can only have one state.
// making the null explict to avoid possible bugs in the future
// making the null explicit to avoid possible bugs in the future
glprogramstate->_nodeBinding = nullptr;
// copy autobindings... rebound them once a target is set again

Some files were not shown because too many files have changed in this diff Show More