Merge pull request #14650 from mogemimi/fix-typo-extensions

Fix typos in documentation and comments
This commit is contained in:
pandamicro 2015-12-13 11:03:24 +08:00
commit 07077f5c36
24 changed files with 44 additions and 44 deletions

View File

@ -107,7 +107,7 @@ void Control::sendActionsForControlEvents(EventType controlEvents)
// For each control events // For each control events
for (int i = 0; i < kControlEventTotalNumber; i++) for (int i = 0; i < kControlEventTotalNumber; i++)
{ {
// If the given controlEvents bitmask contains the curent event // If the given controlEvents bitmask contains the current event
if (((int)controlEvents & (1 << i))) if (((int)controlEvents & (1 << i)))
{ {
// Call invocations // Call invocations
@ -135,7 +135,7 @@ void Control::addTargetWithActionForControlEvents(Ref* target, Handler action, E
// For each control events // For each control events
for (int i = 0; i < kControlEventTotalNumber; i++) for (int i = 0; i < kControlEventTotalNumber; i++)
{ {
// If the given controlEvents bitmask contains the curent event // If the given controlEvents bitmask contains the current event
if (((int)controlEvents & (1 << i))) if (((int)controlEvents & (1 << i)))
{ {
this->addTargetWithActionForControlEvent(target, action, (EventType)(1<<i)); this->addTargetWithActionForControlEvent(target, action, (EventType)(1<<i));
@ -148,7 +148,7 @@ void Control::addTargetWithActionForControlEvents(Ref* target, Handler action, E
/** /**
* Adds a target and action for a particular event to an internal dispatch * Adds a target and action for a particular event to an internal dispatch
* table. * table.
* The action message may optionnaly include the sender and the event as * The action message may optionally include the sender and the event as
* parameters, in that order. * parameters, in that order.
* When you call this method, target is not retained. * When you call this method, target is not retained.
* *
@ -173,7 +173,7 @@ void Control::removeTargetWithActionForControlEvents(Ref* target, Handler action
// For each control events // For each control events
for (int i = 0; i < kControlEventTotalNumber; i++) for (int i = 0; i < kControlEventTotalNumber; i++)
{ {
// If the given controlEvents bitmask contains the curent event // If the given controlEvents bitmask contains the current event
if (((int)controlEvents & (1 << i))) if (((int)controlEvents & (1 << i)))
{ {
this->removeTargetWithActionForControlEvent(target, action, (EventType)(1 << i)); this->removeTargetWithActionForControlEvent(target, action, (EventType)(1 << i));

View File

@ -84,7 +84,7 @@ public:
/** The possible state for a control. */ /** The possible state for a control. */
enum class State enum class State
{ {
NORMAL = 1 << 0, // The normal, or default state of a control¡ªthat is, enabled but neither selected nor highlighted. NORMAL = 1 << 0, // The normal, or default state of a control that is, enabled but neither selected nor highlighted.
HIGH_LIGHTED = 1 << 1, // Highlighted state of a control. A control enters this state when a touch down, drag inside or drag enter is performed. You can retrieve and set this value through the highlighted property. HIGH_LIGHTED = 1 << 1, // Highlighted state of a control. A control enters this state when a touch down, drag inside or drag enter is performed. You can retrieve and set this value through the highlighted property.
DISABLED = 1 << 2, // Disabled state of a control. This state indicates that the control is currently disabled. You can retrieve and set this value through the enabled property. DISABLED = 1 << 2, // Disabled state of a control. This state indicates that the control is currently disabled. You can retrieve and set this value through the enabled property.
SELECTED = 1 << 3 // Selected state of a control. This state indicates that the control is currently selected. You can retrieve and set this value through the selected property. SELECTED = 1 << 3 // Selected state of a control. This state indicates that the control is currently selected. You can retrieve and set this value through the selected property.
@ -122,7 +122,7 @@ public:
/** /**
* Adds a target and action for a particular event (or events) to an internal * Adds a target and action for a particular event (or events) to an internal
* dispatch table. * dispatch table.
* The action message may optionnaly include the sender and the event as * The action message may optionally include the sender and the event as
* parameters, in that order. * parameters, in that order.
* When you call this method, target is not retained. * When you call this method, target is not retained.
* *
@ -138,7 +138,7 @@ public:
* Removes a target and action for a particular event (or events) from an * Removes a target and action for a particular event (or events) from an
* internal dispatch table. * internal dispatch table.
* *
* @param target The target objectthat is, the object to which the action * @param target The target object that is, the object to which the action
* message is sent. Pass nil to remove all targets paired with action and the * message is sent. Pass nil to remove all targets paired with action and the
* specified control events. * specified control events.
* @param action A selector identifying an action message. Pass NULL to remove * @param action A selector identifying an action message. Pass NULL to remove
@ -149,7 +149,7 @@ public:
virtual void removeTargetWithActionForControlEvents(Ref* target, Handler action, EventType controlEvents); virtual void removeTargetWithActionForControlEvents(Ref* target, Handler action, EventType controlEvents);
/** /**
* Returns a point corresponding to the touh location converted into the * Returns a point corresponding to the touch location converted into the
* control space coordinates. * control space coordinates.
* @param touch A Touch object that represents a touch. * @param touch A Touch object that represents a touch.
*/ */
@ -190,7 +190,7 @@ CC_CONSTRUCTOR_ACCESS:
protected: protected:
/** /**
* Returns an Invocation object able to construct messages using a given * Returns an Invocation object able to construct messages using a given
* target-action pair. (The invocation may optionnaly include the sender and * target-action pair. (The invocation may optionally include the sender and
* the event as parameters, in that order) * the event as parameters, in that order)
* *
* @param target The target object. * @param target The target object.
@ -217,11 +217,11 @@ protected:
/** /**
* Adds a target and action for a particular event to an internal dispatch * Adds a target and action for a particular event to an internal dispatch
* table. * table.
* The action message may optionnaly include the sender and the event as * The action message may optionally include the sender and the event as
* parameters, in that order. * parameters, in that order.
* When you call this method, target is not retained. * When you call this method, target is not retained.
* *
* @param target The target object¡ªthat is, the object to which the action * @param target The target object that is, the object to which the action
* message is sent. It cannot be nil. The target is not retained. * message is sent. It cannot be nil. The target is not retained.
* @param action A selector identifying an action message. It cannot be NULL. * @param action A selector identifying an action message. It cannot be NULL.
* @param controlEvent A control event for which the action message is sent. * @param controlEvent A control event for which the action message is sent.
@ -233,7 +233,7 @@ protected:
* Removes a target and action for a particular event from an internal dispatch * Removes a target and action for a particular event from an internal dispatch
* table. * table.
* *
* @param target The target object¡ªthat is, the object to which the action * @param target The target object that is, the object to which the action
* message is sent. Pass nil to remove all targets paired with action and the * message is sent. Pass nil to remove all targets paired with action and the
* specified control events. * specified control events.
* @param action A selector identifying an action message. Pass NULL to remove * @param action A selector identifying an action message. Pass NULL to remove

View File

@ -134,7 +134,7 @@ public:
virtual float getTitleTTFSizeForState(State state); virtual float getTitleTTFSizeForState(State state);
/** /**
* Sets the font of the label, changes the label to a BMFont if neccessary. * Sets the font of the label, changes the label to a BMFont if necessary.
* @param fntFile The name of the font to change to * @param fntFile The name of the font to change to
* @param state The state that uses the specified fntFile. The values are described * @param state The state that uses the specified fntFile. The values are described
* in "CCControlState". * in "CCControlState".

View File

@ -71,7 +71,7 @@ protected:
void updateSliderPosition(Vec2 location); void updateSliderPosition(Vec2 location);
bool checkSliderPosition(Vec2 location); bool checkSliderPosition(Vec2 location);
//maunally put in the setters //manually put in the setters
CC_SYNTHESIZE_READONLY(float, _hue, Hue); CC_SYNTHESIZE_READONLY(float, _hue, Hue);
virtual void setHue(float val); virtual void setHue(float val);
CC_SYNTHESIZE_READONLY(float, _huePercentage, HuePercentage); CC_SYNTHESIZE_READONLY(float, _huePercentage, HuePercentage);

View File

@ -129,7 +129,7 @@ protected:
/** Returns the value for the given location. */ /** Returns the value for the given location. */
float valueForLocation(Vec2 location); float valueForLocation(Vec2 location);
//maunally put in the setters //manually put in the setters
/** Contains the receiver's current value. */ /** Contains the receiver's current value. */
CC_SYNTHESIZE_READONLY(float, _value, Value); CC_SYNTHESIZE_READONLY(float, _value, Value);

View File

@ -323,7 +323,7 @@ protected:
*/ */
Node* _container; Node* _container;
/** /**
* Determiens whether user touch is moved after begin phase. * Determines whether user touch is moved after begin phase.
*/ */
bool _touchMoved; bool _touchMoved;
/** /**

View File

@ -119,7 +119,7 @@ protected:
/** Although the scale is on a Particle System level, the affector can also be scaled. /** Although the scale is on a Particle System level, the affector can also be scaled.
*/ */
Vec3 _affectorScale; Vec3 _affectorScale;
/** Because the public attribute ´position?is sometimes used for both localspace and worldspace /** Because the public attribute position is sometimes used for both localspace and worldspace
position, the mDerivedPosition attribute is introduced. position, the mDerivedPosition attribute is introduced.
*/ */
Vec3 _derivedPosition; Vec3 _derivedPosition;

View File

@ -104,7 +104,7 @@ void PUAffectorTranslator::translate(PUScriptCompiler* compiler, PUAbstractNode
} }
else if (prop->name == token[TOKEN_POSITION]) else if (prop->name == token[TOKEN_POSITION])
{ {
// Property: positon // Property: position
if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3)) if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3))
{ {
Vec3 val; Vec3 val;

View File

@ -107,7 +107,7 @@ public:
bool alwaysUsePosition(void) const {return _alwaysUsePosition;}; bool alwaysUsePosition(void) const {return _alwaysUsePosition;};
/** Set the boolean to indicate whether the position of the particle that is handled must be used for emission of /** Set the boolean to indicate whether the position of the particle that is handled must be used for emission of
the new particle or whether the contact point of the physics actor must be used. This only applies if a physics angine the new particle or whether the contact point of the physics actor must be used. This only applies if a physics engine
is used, otherwise the default is used. is used, otherwise the default is used.
*/ */
void setAlwaysUsePosition(bool alwaysUsePosition) {_alwaysUsePosition = alwaysUsePosition;}; void setAlwaysUsePosition(bool alwaysUsePosition) {_alwaysUsePosition = alwaysUsePosition;};
@ -143,14 +143,14 @@ protected:
/** Store the technique value to keep up to speed. /** Store the technique value to keep up to speed.
@remarks @remarks
If the ParticleTechnique has been destroyed, the DoPlacementParticleEventHandler isn´t automatically If the ParticleTechnique has been destroyed, the DoPlacementParticleEventHandler isn't automatically
notified. Using the pointer causes an exception. notified. Using the pointer causes an exception.
*/ */
PUParticleSystem3D* _system; PUParticleSystem3D* _system;
/** Store the emitter value to keep up to speed. /** Store the emitter value to keep up to speed.
@remarks @remarks
If the ParticleEmitter has been destroyed, the DoPlacementParticleEventHandler isn´t automatically If the ParticleEmitter has been destroyed, the DoPlacementParticleEventHandler isn't automatically
notified. Using the pointer causes an exception. notified. Using the pointer causes an exception.
*/ */
PUEmitter* _emitter; PUEmitter* _emitter;

View File

@ -258,7 +258,7 @@ class CC_DLL PUDynamicAttributeCurved : public PUDynamicAttribute
inline ControlPointList::iterator getLastValidIterator(void); inline ControlPointList::iterator getLastValidIterator(void);
}; };
/* This class generates values based on an oscillating functione (i.e. Sine). /* This class generates values based on an oscillating function (i.e. Sine).
*/ */
class CC_DLL PUDynamicAttributeOscillate : public PUDynamicAttribute class CC_DLL PUDynamicAttributeOscillate : public PUDynamicAttribute
{ {

View File

@ -108,7 +108,7 @@ void PUEmitterTranslator::translate(PUScriptCompiler* compiler, PUAbstractNode *
} }
else if (prop->name == token[TOKEN_POSITION]) else if (prop->name == token[TOKEN_POSITION])
{ {
// Property: positon // Property: position
if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3)) if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3))
{ {
Vec3 val; Vec3 val;

View File

@ -133,7 +133,7 @@ public:
/** Destructor **/ /** Destructor **/
~MeshInfo (void); ~MeshInfo (void);
/** Generate a random number. The ´high?argument determines that numbers are /** Generate a random number. The high argument determines that numbers are
returned between [0..high] **/ returned between [0..high] **/
float getGaussianRandom (float high, float cutoff = 4); float getGaussianRandom (float high, float cutoff = 4);
@ -196,7 +196,7 @@ public:
/** Returns the type op distribution. /** Returns the type op distribution.
@remarks @remarks
There are several ways to emit particles on the surface of a mesh. This attribute indicates There are several ways to emit particles on the surface of a mesh. This attribute indicates
the type of distrubution on the surface. the type of distribution on the surface.
*/ */
const MeshInfo::MeshSurfaceDistribution getDistribution (void) const; const MeshInfo::MeshSurfaceDistribution getDistribution (void) const;

View File

@ -198,7 +198,7 @@ void PUObserver::destroyEventHandler(PUEventHandler* eventHandler)
{ {
if (*it == eventHandler) if (*it == eventHandler)
{ {
// Detroy it // Destroy it
//ParticleSystemManager::getSingletonPtr()->destroyEventHandler(*it); //ParticleSystemManager::getSingletonPtr()->destroyEventHandler(*it);
(*it)->release(); (*it)->release();
_eventHandlers.erase(it); _eventHandlers.erase(it);

View File

@ -159,7 +159,7 @@ public:
bool getObserveUntilEvent(void) const; bool getObserveUntilEvent(void) const;
/** Sets the value of mObserveUntilEvent. This value determines whether observation must be continued /** Sets the value of mObserveUntilEvent. This value determines whether observation must be continued
after an event ocurred and the event handlers are called. after an event occurred and the event handlers are called.
*/ */
void setObserveUntilEvent(bool observeUntilEvent); void setObserveUntilEvent(bool observeUntilEvent);
@ -213,8 +213,8 @@ protected:
// Particle type to be observed. Default is that all particles are observed. // Particle type to be observed. Default is that all particles are observed.
PUParticle3D::ParticleType _particleTypeToObserve; PUParticle3D::ParticleType _particleTypeToObserve;
/** Determines whether mParticleTypeToObserve is set. If ´true? only that particles of the specified type /** Determines whether mParticleTypeToObserve is set. If true only that particles of the specified type
are observed. If ´false?(= default), all particles are observed. are observed. If false (= default), all particles are observed.
*/ */
bool _particleTypeToObserveSet; bool _particleTypeToObserveSet;

View File

@ -50,13 +50,13 @@ public:
*/ */
virtual bool observe (PUParticle3D* particle, float timeElapsed) override; virtual bool observe (PUParticle3D* particle, float timeElapsed) override;
/** The _processParticle() function is overridden, because we don´t observe an individual particle. /** The _processParticle() function is overridden, because we don't observe an individual particle.
even if there isn´t a particle left anymore (and that is the situation we want to validate). even if there isn't a particle left anymore (and that is the situation we want to validate).
*/ */
virtual void updateObserver(PUParticle3D* particle, float timeElapsed, bool firstParticle) override; virtual void updateObserver(PUParticle3D* particle, float timeElapsed, bool firstParticle) override;
/** Instead of the _processParticle(), the _postProcessParticles() is used because it is called /** Instead of the _processParticle(), the _postProcessParticles() is used because it is called
even if there isn´t a particle left anymore (and that is the situation we want to validate). even if there isn't a particle left anymore (and that is the situation we want to validate).
*/ */
virtual void postUpdateObserver(float timeElapsed) override; virtual void postUpdateObserver(float timeElapsed) override;

View File

@ -1011,7 +1011,7 @@ void PUParticleSystem3D::initParticleForExpiration( PUParticle3D* particle, floa
it->particleExpired(this, particle); it->particleExpired(this, particle);
} }
///** Externs are also called to perform expiration activities. If needed, affectors and emitters may be added, but at the moment ///** Externs are also called to perform expiration activities. If needed, affectors and emitters may be added, but at the moment
// there is no reason for (and we don´t want to waste cpu resources). // there is no reason for (and we don't want to waste cpu resources).
//*/ //*/
//if (!mExterns.empty()) //if (!mExterns.empty())
//{ //{

View File

@ -55,7 +55,7 @@ bool PURandomiserTranslator::translateChildProperty( PUScriptCompiler* compiler,
} }
else if (prop->name == token[TOKEN_RND_MAX_DEVIATION_X]) else if (prop->name == token[TOKEN_RND_MAX_DEVIATION_X])
{ {
// Property: rand_aff_max_deviation_x (depreacted and replaced by 'max_deviation_x') // Property: rand_aff_max_deviation_x (deprecated and replaced by 'max_deviation_x')
if (passValidateProperty(compiler, prop, token[TOKEN_RND_MAX_DEVIATION_X], VAL_REAL)) if (passValidateProperty(compiler, prop, token[TOKEN_RND_MAX_DEVIATION_X], VAL_REAL))
{ {
float val = 0.0f; float val = 0.0f;

View File

@ -89,7 +89,7 @@ void PUTechniqueTranslator::translate(PUScriptCompiler* compiler, PUAbstractNode
} }
else if (prop->name == token[TOKEN_POSITION]) else if (prop->name == token[TOKEN_POSITION])
{ {
// Property: positon // Property: position
if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3)) if (passValidateProperty(compiler, prop, token[TOKEN_POSITION], VAL_VECTOR3))
{ {
Vec3 val; Vec3 val;

View File

@ -62,7 +62,7 @@ public:
*/ */
void setRotationSpeed(PUDynamicAttribute* dynRotationSpeed); void setRotationSpeed(PUDynamicAttribute* dynRotationSpeed);
/** Returns the rotation defined in the the affector. /** Returns the rotation defined in the affector.
*/ */
PUDynamicAttribute* getRotation(void) const; PUDynamicAttribute* getRotation(void) const;

View File

@ -62,9 +62,9 @@ NS_CC_BEGIN
// /** Defines the speed of generating spawnpoints. In each Particle Technique update // /** Defines the speed of generating spawnpoints. In each Particle Technique update
// 'mIterations' vertices are traversed. // 'mIterations' vertices are traversed.
// @remarks // @remarks
// Setting this attribute to a higher value is needed if the emssion rate of the emitter // Setting this attribute to a higher value is needed if the emission rate of the emitter
// is high. On slower computers, emitting the particles may exceed generating the // is high. On slower computers, emitting the particles may exceed generating the
// spawnpoints (because this is not done at once, but per Particle Tehcnique update). // spawnpoints (because this is not done at once, but per Particle Technique update).
// */ // */
// unsigned short mIterations; // unsigned short mIterations;
// //

View File

@ -253,7 +253,7 @@ void AssetsManager::downloadAndUncompress()
void AssetsManager::update() void AssetsManager::update()
{ {
// all operation in checkUpdate, nothing need to do // all operation in checkUpdate, nothing need to do
// keep this function for compatiblity // keep this function for compatibility
} }
bool AssetsManager::uncompress() bool AssetsManager::uncompress()
@ -308,8 +308,8 @@ bool AssetsManager::uncompress()
const size_t filenameLength = strlen(fileName); const size_t filenameLength = strlen(fileName);
if (fileName[filenameLength-1] == '/') if (fileName[filenameLength-1] == '/')
{ {
// Entry is a direcotry, so create it. // Entry is a directory, so create it.
// If the directory exists, it will failed scilently. // If the directory exists, it will failed silently.
if (!FileUtils::getInstance()->createDirectory(fullPath)) if (!FileUtils::getInstance()->createDirectory(fullPath))
{ {
CCLOG("can not create directory %s", fullPath.c_str()); CCLOG("can not create directory %s", fullPath.c_str());

View File

@ -55,7 +55,7 @@ public:
// Error caused by creating a file to store downloaded data // Error caused by creating a file to store downloaded data
CREATE_FILE, CREATE_FILE,
/** Error caused by network /** Error caused by network
-- network unavaivable -- network unavailable
-- timeout -- timeout
-- ... -- ...
*/ */

View File

@ -833,7 +833,7 @@ void AssetsManagerEx::onError(const network::DownloadTask& task,
int errorCodeInternal, int errorCodeInternal,
const std::string& errorStr) const std::string& errorStr)
{ {
// Skip version error occured // Skip version error occurred
if (task.identifier == VERSION_ID) if (task.identifier == VERSION_ID)
{ {
CCLOG("AssetsManagerEx : Fail to download version file, step skipped\n"); CCLOG("AssetsManagerEx : Fail to download version file, step skipped\n");

View File

@ -149,7 +149,7 @@ protected:
*/ */
const DownloadUnits& getFailedAssets() const; const DownloadUnits& getFailedAssets() const;
/** @brief Function for destorying the downloaded version file and manifest file /** @brief Function for destroying the downloaded version file and manifest file
*/ */
void destroyDownloadedVersion(); void destroyDownloadedVersion();