issue #2300: Warning fixes.

This commit is contained in:
dumganhar 2013-07-08 23:12:11 +08:00
parent 9b126e79d7
commit b41dd9277d
3 changed files with 9 additions and 8 deletions

View File

@ -77,7 +77,7 @@ void PageTurn3D::update(float time)
for (int j = 0; j <= _gridSize.height; ++j) for (int j = 0; j <= _gridSize.height; ++j)
{ {
// Get original vertex // Get original vertex
Vertex3F p = originalVertex(ccp(i ,j)); Vertex3F p = getOriginalVertex(ccp(i ,j));
float R = sqrtf((p.x * p.x) + ((p.y - ay) * (p.y - ay))); float R = sqrtf((p.x * p.x) + ((p.y - ay) * (p.y - ay)));
float r = R * sinTheta; float r = R * sinTheta;

View File

@ -91,7 +91,7 @@ void ShakyTiles3D::update(float time)
{ {
for (j = 0; j < _gridSize.height; ++j) for (j = 0; j < _gridSize.height; ++j)
{ {
Quad3 coords = originalTile(ccp(i, j)); Quad3 coords = getOriginalTile(ccp(i, j));
// X // X
coords.bl.x += ( rand() % (_randrange*2) ) - _randrange; coords.bl.x += ( rand() % (_randrange*2) ) - _randrange;
@ -279,7 +279,7 @@ Size ShuffleTiles::getDelta(const Size& pos) const
void ShuffleTiles::placeTile(const Point& pos, Tile *t) void ShuffleTiles::placeTile(const Point& pos, Tile *t)
{ {
Quad3 coords = originalTile(pos); Quad3 coords = getOriginalTile(pos);
Point step = _target->getGrid()->getStep(); Point step = _target->getGrid()->getStep();
coords.bl.x += (int)(t->position.x * step.x); coords.bl.x += (int)(t->position.x * step.x);
@ -397,7 +397,7 @@ float FadeOutTRTiles::testFunc(const Size& pos, float time)
void FadeOutTRTiles::turnOnTile(const Point& pos) void FadeOutTRTiles::turnOnTile(const Point& pos)
{ {
setTile(pos, originalTile(pos)); setTile(pos, getOriginalTile(pos));
} }
void FadeOutTRTiles::turnOffTile(const Point& pos) void FadeOutTRTiles::turnOffTile(const Point& pos)
@ -409,7 +409,7 @@ void FadeOutTRTiles::turnOffTile(const Point& pos)
void FadeOutTRTiles::transformTile(const Point& pos, float distance) void FadeOutTRTiles::transformTile(const Point& pos, float distance)
{ {
Quad3 coords = originalTile(pos); Quad3 coords = getOriginalTile(pos);
Point step = _target->getGrid()->getStep(); Point step = _target->getGrid()->getStep();
coords.bl.x += (step.x / 2) * (1.0f - distance); coords.bl.x += (step.x / 2) * (1.0f - distance);
@ -536,7 +536,7 @@ float FadeOutUpTiles::testFunc(const Size& pos, float time)
void FadeOutUpTiles::transformTile(const Point& pos, float distance) void FadeOutUpTiles::transformTile(const Point& pos, float distance)
{ {
Quad3 coords = originalTile(pos); Quad3 coords = getOriginalTile(pos);
Point step = _target->getGrid()->getStep(); Point step = _target->getGrid()->getStep();
coords.bl.y += (step.y / 2) * (1.0f - distance); coords.bl.y += (step.y / 2) * (1.0f - distance);
@ -664,7 +664,7 @@ void TurnOffTiles::shuffle(unsigned int *pArray, unsigned int nLen)
void TurnOffTiles::turnOnTile(const Point& pos) void TurnOffTiles::turnOnTile(const Point& pos)
{ {
setTile(pos, originalTile(pos)); setTile(pos, getOriginalTile(pos));
} }
void TurnOffTiles::turnOffTile(const Point& pos) void TurnOffTiles::turnOffTile(const Point& pos)
@ -839,7 +839,7 @@ void JumpTiles3D::update(float time)
{ {
for( j = 0; j < _gridSize.height; j++ ) for( j = 0; j < _gridSize.height; j++ )
{ {
Quad3 coords = originalTile(ccp(i, j)); Quad3 coords = getOriginalTile(ccp(i, j));
if ( ((i+j) % 2) == 0 ) if ( ((i+j) % 2) == 0 )
{ {

View File

@ -169,6 +169,7 @@ bool TextureETC::loadTexture(const char* file)
etcFileData = NULL; etcFileData = NULL;
return true; return true;
} }
return false;
} }
NS_CC_END NS_CC_END