Converted removed all Carriage Returns (dos line-endings, ^M.) in cocos2dx, except in the windows project/platform files.

This commit is contained in:
Nicolas Gramlich 2012-06-13 14:26:28 -07:00
parent 29b22adccc
commit e2a1a246a0
12 changed files with 194 additions and 194 deletions

View File

@ -97,8 +97,8 @@ public:
return m_bSupportsDiscardFramebuffer; return m_bSupportsDiscardFramebuffer;
} }
/** Whether or not shareable VAOs are supported. /** Whether or not shareable VAOs are supported.
@since v2.0.0 @since v2.0.0
*/ */
inline bool isSupportsShareableVAO(void) inline bool isSupportsShareableVAO(void)
{ {

View File

@ -65,12 +65,12 @@ void CC_DLL ccDrawPoints( const CCPoint *points, unsigned int numberOfPoints );
/** draws a line given the origin and destination point measured in points */ /** draws a line given the origin and destination point measured in points */
void CC_DLL ccDrawLine( const CCPoint& origin, const CCPoint& destination ); void CC_DLL ccDrawLine( const CCPoint& origin, const CCPoint& destination );
/** draws a rectangle given the origin and destination point measured in points. */ /** draws a rectangle given the origin and destination point measured in points. */
void CC_DLL ccDrawRect( CCPoint origin, CCPoint destination ); void CC_DLL ccDrawRect( CCPoint origin, CCPoint destination );
/** draws a solid rectangle given the origin and destination point measured in points. /** draws a solid rectangle given the origin and destination point measured in points.
@since 1.1 @since 1.1
*/ */
void CC_DLL ccDrawSolidRect( CCPoint origin, CCPoint destination, ccColor4F color ); void CC_DLL ccDrawSolidRect( CCPoint origin, CCPoint destination, ccColor4F color );
/** draws a poligon given a pointer to CCPoint coordiantes and the number of vertices measured in points. /** draws a poligon given a pointer to CCPoint coordiantes and the number of vertices measured in points.
@ -97,16 +97,16 @@ void CC_DLL ccDrawQuadBezier(const CCPoint& origin, const CCPoint& control, cons
*/ */
void CC_DLL ccDrawCubicBezier(const CCPoint& origin, const CCPoint& control1, const CCPoint& control2, const CCPoint& destination, unsigned int segments); void CC_DLL ccDrawCubicBezier(const CCPoint& origin, const CCPoint& control1, const CCPoint& control2, const CCPoint& destination, unsigned int segments);
/** draws a Catmull Rom path. /** draws a Catmull Rom path.
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v2.0 @since v2.0
*/ */
void CC_DLL ccDrawCatmullRom( CCPointArray *arrayOfControlPoints, unsigned int segments ); void CC_DLL ccDrawCatmullRom( CCPointArray *arrayOfControlPoints, unsigned int segments );
/** draws a Cardinal Spline path. /** draws a Cardinal Spline path.
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v2.0 @since v2.0
*/ */
void CC_DLL ccDrawCardinalSpline( CCPointArray *config, CCFloat tension, unsigned int segments ); void CC_DLL ccDrawCardinalSpline( CCPointArray *config, CCFloat tension, unsigned int segments );
/** set the drawing color with 4 unsigned bytes /** set the drawing color with 4 unsigned bytes

View File

@ -514,7 +514,7 @@ void CCScheduler::unscheduleAllSelectors(void)
unscheduleAllSelectorsWithMinPriority(kCCPrioritySystem); unscheduleAllSelectorsWithMinPriority(kCCPrioritySystem);
} }
void CCScheduler::unscheduleAllSelectorsWithMinPriority(int nMinPriority) void CCScheduler::unscheduleAllSelectorsWithMinPriority(int nMinPriority)
{ {
// Custom Selectors // Custom Selectors
tHashSelectorEntry *pElement = NULL; tHashSelectorEntry *pElement = NULL;
@ -682,66 +682,66 @@ bool CCScheduler::isTargetPaused(CCObject *pTarget)
return false; // should never get here return false; // should never get here
} }
CCSet* CCScheduler::pauseAllTargets() CCSet* CCScheduler::pauseAllTargets()
{ {
return pauseAllTargetsWithMinPriority(kCCPrioritySystem); return pauseAllTargetsWithMinPriority(kCCPrioritySystem);
} }
CCSet* CCScheduler::pauseAllTargetsWithMinPriority(int nMinPriority) CCSet* CCScheduler::pauseAllTargetsWithMinPriority(int nMinPriority)
{ {
CCSet* idsWithSelectors = new CCSet();// setWithCapacity:50]; CCSet* idsWithSelectors = new CCSet();// setWithCapacity:50];
idsWithSelectors->autorelease(); idsWithSelectors->autorelease();
// Custom Selectors // Custom Selectors
for(tHashSelectorEntry *element = m_pHashForSelectors; element != NULL; for(tHashSelectorEntry *element = m_pHashForSelectors; element != NULL;
element = (tHashSelectorEntry*)element->hh.next) element = (tHashSelectorEntry*)element->hh.next)
{ {
element->paused = true; element->paused = true;
idsWithSelectors->addObject(element->target); idsWithSelectors->addObject(element->target);
} }
// Updates selectors // Updates selectors
tListEntry *entry, *tmp; tListEntry *entry, *tmp;
if(nMinPriority < 0) if(nMinPriority < 0)
{ {
DL_FOREACH_SAFE( m_pUpdatesNegList, entry, tmp ) DL_FOREACH_SAFE( m_pUpdatesNegList, entry, tmp )
{ {
if(entry->priority >= nMinPriority) if(entry->priority >= nMinPriority)
{ {
entry->paused = true; entry->paused = true;
idsWithSelectors->addObject(entry->target); idsWithSelectors->addObject(entry->target);
} }
} }
} }
if(nMinPriority <= 0) if(nMinPriority <= 0)
{ {
DL_FOREACH_SAFE( m_pUpdates0List, entry, tmp ) DL_FOREACH_SAFE( m_pUpdates0List, entry, tmp )
{ {
entry->paused = true; entry->paused = true;
idsWithSelectors->addObject(entry->target); idsWithSelectors->addObject(entry->target);
} }
} }
DL_FOREACH_SAFE( m_pUpdatesPosList, entry, tmp ) DL_FOREACH_SAFE( m_pUpdatesPosList, entry, tmp )
{ {
if(entry->priority >= nMinPriority) if(entry->priority >= nMinPriority)
{ {
entry->paused = true; entry->paused = true;
idsWithSelectors->addObject(entry->target); idsWithSelectors->addObject(entry->target);
} }
} }
return idsWithSelectors; return idsWithSelectors;
} }
void CCScheduler::resumeTargets(CCSet* pTargetsToResume) void CCScheduler::resumeTargets(CCSet* pTargetsToResume)
{ {
CCSetIterator iter; CCSetIterator iter;
for (iter = pTargetsToResume->begin(); iter != pTargetsToResume->end(); ++iter) for (iter = pTargetsToResume->begin(); iter != pTargetsToResume->end(); ++iter)
{ {
resumeTarget(*iter); resumeTarget(*iter);
} }
} }
// main loop // main loop

View File

@ -176,10 +176,10 @@ public:
*/ */
void unscheduleAllSelectors(void); void unscheduleAllSelectors(void);
/** Unschedules all selectors from all targets with a minimum priority. /** Unschedules all selectors from all targets with a minimum priority.
You should only call this with kCCPriorityNonSystemMin or higher. You should only call this with kCCPriorityNonSystemMin or higher.
@since v2.0.0 @since v2.0.0
*/ */
void unscheduleAllSelectorsWithMinPriority(int nMinPriority); void unscheduleAllSelectorsWithMinPriority(int nMinPriority);
/** The scheduled script callback will be called every 'interval' seconds. /** The scheduled script callback will be called every 'interval' seconds.
@ -211,22 +211,22 @@ public:
*/ */
bool isTargetPaused(CCObject *pTarget); bool isTargetPaused(CCObject *pTarget);
/** Pause all selectors from all targets. /** Pause all selectors from all targets.
You should NEVER call this method, unless you know what you are doing. You should NEVER call this method, unless you know what you are doing.
@since v2.0.0 @since v2.0.0
*/ */
CCSet* pauseAllTargets(); CCSet* pauseAllTargets();
/** Pause all selectors from all targets with a minimum priority. /** Pause all selectors from all targets with a minimum priority.
You should only call this with kCCPriorityNonSystemMin or higher. You should only call this with kCCPriorityNonSystemMin or higher.
@since v2.0.0 @since v2.0.0
*/ */
CCSet* pauseAllTargetsWithMinPriority(int nMinPriority); CCSet* pauseAllTargetsWithMinPriority(int nMinPriority);
/** Resume selectors on a set of targets. /** Resume selectors on a set of targets.
This can be useful for undoing a call to pauseAllSelectors. This can be useful for undoing a call to pauseAllSelectors.
@since v2.0.0 @since v2.0.0
*/ */
void resumeTargets(CCSet* targetsToResume); void resumeTargets(CCSet* targetsToResume);
private: private:

View File

@ -253,16 +253,16 @@ bool CCArray::containsObject(CCObject* object)
return ccArrayContainsObject(data, object); return ccArrayContainsObject(data, object);
} }
bool CCArray::isEqualToArray(CCArray* otherArray) bool CCArray::isEqualToArray(CCArray* otherArray)
{ {
for (unsigned int i = 0; i< this->count(); i++) for (unsigned int i = 0; i< this->count(); i++)
{ {
if (!this->objectAtIndex(i)->isEqual(otherArray->objectAtIndex(i))) if (!this->objectAtIndex(i)->isEqual(otherArray->objectAtIndex(i)))
{ {
return false; return false;
} }
} }
return true; return true;
} }
void CCArray::addObject(CCObject* object) void CCArray::addObject(CCObject* object)
@ -338,10 +338,10 @@ void CCArray::exchangeObjectAtIndex(unsigned int index1, unsigned int index2)
ccArraySwapObjectsAtIndexes(data, index1, index2); ccArraySwapObjectsAtIndexes(data, index1, index2);
} }
void CCArray::replaceObjectAtIndex(unsigned int index, CCObject* pObject, bool bReleaseObject/* = true*/) void CCArray::replaceObjectAtIndex(unsigned int index, CCObject* pObject, bool bReleaseObject/* = true*/)
{ {
ccArrayInsertObjectAtIndex(data, pObject, index); ccArrayInsertObjectAtIndex(data, pObject, index);
ccArrayRemoveObjectAtIndex(data, index+1); ccArrayRemoveObjectAtIndex(data, index+1);
} }
void CCArray::reverseObjects() void CCArray::reverseObjects()

View File

@ -160,7 +160,7 @@ public:
CCObject* randomObject(); CCObject* randomObject();
/** Returns a Boolean value that indicates whether object is present in array. */ /** Returns a Boolean value that indicates whether object is present in array. */
bool containsObject(CCObject* object); bool containsObject(CCObject* object);
/** @since 1.1 */ /** @since 1.1 */
bool isEqualToArray(CCArray* pOtherArray); bool isEqualToArray(CCArray* pOtherArray);
// Adding Objects // Adding Objects

View File

@ -319,15 +319,15 @@ void CCMotionStreak::update(float delta)
ccVertexLineToPolygon(m_pPointVertexes, m_fStroke, m_pVertices, 0, m_uNuPoints); ccVertexLineToPolygon(m_pPointVertexes, m_fStroke, m_pVertices, 0, m_uNuPoints);
} }
// Updated Tex Coords only if they are different than previous step // Updated Tex Coords only if they are different than previous step
if( m_uNuPoints && m_uPreviousNuPoints != m_uNuPoints ) { if( m_uNuPoints && m_uPreviousNuPoints != m_uNuPoints ) {
float texDelta = 1.0f / m_uNuPoints; float texDelta = 1.0f / m_uNuPoints;
for( i=0; i < m_uNuPoints; i++ ) { for( i=0; i < m_uNuPoints; i++ ) {
m_pTexCoords[i*2] = tex2(0, texDelta*i); m_pTexCoords[i*2] = tex2(0, texDelta*i);
m_pTexCoords[i*2+1] = tex2(1, texDelta*i); m_pTexCoords[i*2+1] = tex2(1, texDelta*i);
} }
m_uPreviousNuPoints = m_uNuPoints; m_uPreviousNuPoints = m_uNuPoints;
} }
} }

View File

@ -59,7 +59,7 @@ public:
CCRenderTexture(); CCRenderTexture();
virtual ~CCRenderTexture(); virtual ~CCRenderTexture();
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil 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*/
static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat); static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
/** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */ /** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */
@ -71,7 +71,7 @@ public:
/** initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */ /** initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */
bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat); bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil 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*/
bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat); bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
/** starts grabbing */ /** starts grabbing */
@ -81,12 +81,12 @@ public:
This is more efficient then calling -clear first and then -begin */ This is more efficient then calling -clear first and then -begin */
void beginWithClear(float r, float g, float b, float a); void beginWithClear(float r, float g, float b, float a);
/** starts rendering to the texture while clearing the texture first. /** starts rendering to the texture while clearing the texture first.
This is more efficient then calling -clear first and then -begin */ This is more efficient then calling -clear first and then -begin */
void beginWithClear(float r, float g, float b, float a, float depthValue); void beginWithClear(float r, float g, float b, float a, float depthValue);
/** starts rendering to the texture while clearing the texture first. /** starts rendering to the texture while clearing the texture first.
This is more efficient then calling -clear first and then -begin */ This is more efficient then calling -clear first and then -begin */
void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue); void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
/** end is key word of lua, use other name to export to lua. */ /** end is key word of lua, use other name to export to lua. */
@ -99,10 +99,10 @@ public:
/** clears the texture with a color */ /** clears the texture with a color */
void clear(float r, float g, float b, float a); void clear(float r, float g, float b, float a);
/** clears the texture with a specified depth value */ /** clears the texture with a specified depth value */
void clearDepth(float depthValue); void clearDepth(float depthValue);
/** clears the texture with a specified stencil value */ /** clears the texture with a specified stencil value */
void clearStencil(int stencilValue); void clearStencil(int stencilValue);
/* creates a new CCImage from with the texture's data. /* creates a new CCImage from with the texture's data.
Caller is responsible for releasing it by calling delete. Caller is responsible for releasing it by calling delete.
@ -130,4 +130,4 @@ protected:
NS_CC_END NS_CC_END
#endif //__CCRENDER_TEXTURE_H__ #endif //__CCRENDER_TEXTURE_H__

View File

@ -324,8 +324,8 @@ public:
CC_PROPERTY(CCTexture2D*, m_pTexture, Texture) CC_PROPERTY(CCTexture2D*, m_pTexture, Texture)
/** conforms to CocosNodeTexture protocol */ /** conforms to CocosNodeTexture protocol */
CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc) CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc)
/** does the alpha value modify color */ /** does the alpha value modify color */
CC_PROPERTY(bool, m_bOpacityModifyRGB, OpacityModifyRGB) CC_PROPERTY(bool, m_bOpacityModifyRGB, OpacityModifyRGB)
/** whether or not the particles are using blend additive. /** whether or not the particles are using blend additive.
If enabled, the following blending function will be used. If enabled, the following blending function will be used.

View File

@ -236,8 +236,8 @@ void CCParticleSystemQuad::updateQuadWithParticle(tCCParticle* particle, const C
{ {
quad = &(m_pQuads[m_uParticleIdx]); quad = &(m_pQuads[m_uParticleIdx]);
} }
ccColor4B color = (m_bOpacityModifyRGB) ccColor4B color = (m_bOpacityModifyRGB)
? ccc4( particle->color.r*particle->color.a*255, particle->color.g*particle->color.a*255, particle->color.b*particle->color.a*255, particle->color.a*255) ? ccc4( particle->color.r*particle->color.a*255, particle->color.g*particle->color.a*255, particle->color.b*particle->color.a*255, particle->color.a*255)
: ccc4( particle->color.r*255, particle->color.g*255, particle->color.b*255, particle->color.a*255); : ccc4( particle->color.r*255, particle->color.g*255, particle->color.b*255, particle->color.a*255);
quad->bl.colors = color; quad->bl.colors = color;

View File

@ -195,15 +195,15 @@ public:
*/ */
unsigned int bitsPerPixelForFormat(); unsigned int bitsPerPixelForFormat();
/** returns the pixel format in a NSString. /** returns the pixel format in a NSString.
@since v2.0 @since v2.0
*/ */
CCString* stringForFormat(); CCString* stringForFormat();
/** Helper functions that returns bits per pixels for a given format. /** Helper functions that returns bits per pixels for a given format.
@since v2.0 @since v2.0
*/ */
unsigned int bitsPerPixelForFormat(CCTexture2DPixelFormat format); unsigned int bitsPerPixelForFormat(CCTexture2DPixelFormat format);
/** sets the default pixel format for UIImagescontains alpha channel. /** sets the default pixel format for UIImagescontains alpha channel.
@ -217,8 +217,8 @@ public:
How does it work ? How does it work ?
- If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture) - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture)
- If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used. - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used.
This parameter is not valid for PVR / PVR.CCZ images. This parameter is not valid for PVR / PVR.CCZ images.
@since v0.8 @since v0.8

View File

@ -236,52 +236,52 @@ void CCTMXLayer::setupTileSprite(CCSprite* sprite, CCPoint pos, unsigned int gid
sprite->setOpacity(m_cOpacity); sprite->setOpacity(m_cOpacity);
//issue 1264, flip can be undone as well //issue 1264, flip can be undone as well
sprite->setFlipX(false); sprite->setFlipX(false);
sprite->setFlipX(false); sprite->setFlipX(false);
sprite->setRotation(0.0f); sprite->setRotation(0.0f);
sprite->setAnchorPoint(ccp(0,0)); sprite->setAnchorPoint(ccp(0,0));
// Rotation in tiled is achieved using 3 flipped states, flipping across the horizontal, vertical, and diagonal axes of the tiles. // Rotation in tiled is achieved using 3 flipped states, flipping across the horizontal, vertical, and diagonal axes of the tiles.
if (gid & kCCTMXTileDiagonalFlag) if (gid & kCCTMXTileDiagonalFlag)
{ {
// put the anchor in the middle for ease of rotation. // put the anchor in the middle for ease of rotation.
sprite->setAnchorPoint(ccp(0.5f,0.5f)); sprite->setAnchorPoint(ccp(0.5f,0.5f));
sprite->setPosition(ccp(positionAt(pos).x + sprite->getContentSize().height/2, sprite->setPosition(ccp(positionAt(pos).x + sprite->getContentSize().height/2,
positionAt(pos).y + sprite->getContentSize().width/2 ) ); positionAt(pos).y + sprite->getContentSize().width/2 ) );
unsigned int flag = gid & (kCCTMXTileHorizontalFlag | kCCTMXTileVerticalFlag ); unsigned int flag = gid & (kCCTMXTileHorizontalFlag | kCCTMXTileVerticalFlag );
// handle the 4 diagonally flipped states. // handle the 4 diagonally flipped states.
if (flag == kCCTMXTileHorizontalFlag) if (flag == kCCTMXTileHorizontalFlag)
{ {
sprite->setRotation(90.0f); sprite->setRotation(90.0f);
} }
else if (flag == kCCTMXTileVerticalFlag) else if (flag == kCCTMXTileVerticalFlag)
{ {
sprite->setRotation(270.0f); sprite->setRotation(270.0f);
} }
else if (flag == (kCCTMXTileVerticalFlag | kCCTMXTileHorizontalFlag) ) else if (flag == (kCCTMXTileVerticalFlag | kCCTMXTileHorizontalFlag) )
{ {
sprite->setRotation(90.0f); sprite->setRotation(90.0f);
sprite->setFlipX(true); sprite->setFlipX(true);
} }
else else
{ {
sprite->setRotation(270.0f); sprite->setRotation(270.0f);
sprite->setFlipX(true); sprite->setFlipX(true);
} }
} }
else else
{ {
if (gid & kCCTMXTileHorizontalFlag) if (gid & kCCTMXTileHorizontalFlag)
{ {
sprite->setFlipX(true); sprite->setFlipX(true);
} }
if (gid & kCCTMXTileVerticalFlag) if (gid & kCCTMXTileVerticalFlag)
{ {
sprite->setFlipY(true); sprite->setFlipY(true);
} }
} }
} }