mirror of https://github.com/axmolengine/axmol.git
'tile' --> 'getTile', 'orignalTile' --> 'getOrignalTile'
This commit is contained in:
parent
a6db6db334
commit
d830bb5f96
|
@ -53,6 +53,7 @@ ActionCamera* ActionCamera::clone() const
|
||||||
|
|
||||||
ActionCamera * ActionCamera::reverse() const
|
ActionCamera * ActionCamera::reverse() const
|
||||||
{
|
{
|
||||||
|
// FIXME: This conversion isn't safe.
|
||||||
return (ActionCamera*)ReverseTime::create(const_cast<ActionCamera*>(this));
|
return (ActionCamera*)ReverseTime::create(const_cast<ActionCamera*>(this));
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
|
@ -76,6 +76,7 @@ void GridAction::startWithTarget(Node *pTarget)
|
||||||
|
|
||||||
GridAction* GridAction::reverse() const
|
GridAction* GridAction::reverse() const
|
||||||
{
|
{
|
||||||
|
// FIXME: This conversion isn't safe.
|
||||||
return (GridAction*)ReverseTime::create( this->clone() );
|
return (GridAction*)ReverseTime::create( this->clone() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,13 +133,13 @@ GridBase* TiledGrid3DAction::getGrid(void)
|
||||||
Quad3 TiledGrid3DAction::getTile(const Point& pos)
|
Quad3 TiledGrid3DAction::getTile(const Point& pos)
|
||||||
{
|
{
|
||||||
TiledGrid3D *g = (TiledGrid3D*)_target->getGrid();
|
TiledGrid3D *g = (TiledGrid3D*)_target->getGrid();
|
||||||
return g->tile(pos);
|
return g->getTile(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Quad3 TiledGrid3DAction::getOriginalTile(const Point& pos)
|
Quad3 TiledGrid3DAction::getOriginalTile(const Point& pos)
|
||||||
{
|
{
|
||||||
TiledGrid3D *g = (TiledGrid3D*)_target->getGrid();
|
TiledGrid3D *g = (TiledGrid3D*)_target->getGrid();
|
||||||
return g->originalTile(pos);
|
return g->getOriginalTile(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Quad3 TiledGrid3DAction::tile(const Point& pos)
|
Quad3 TiledGrid3DAction::tile(const Point& pos)
|
||||||
|
|
|
@ -663,7 +663,7 @@ void TiledGrid3D::setTile(const Point& pos, const Quad3& coords)
|
||||||
memcpy(&vertArray[idx], &coords, sizeof(Quad3));
|
memcpy(&vertArray[idx], &coords, sizeof(Quad3));
|
||||||
}
|
}
|
||||||
|
|
||||||
Quad3 TiledGrid3D::originalTile(const Point& pos)
|
Quad3 TiledGrid3D::getOriginalTile(const Point& pos)
|
||||||
{
|
{
|
||||||
CCAssert( pos.x == (unsigned int)pos.x && pos.y == (unsigned int) pos.y , "Numbers must be integers");
|
CCAssert( pos.x == (unsigned int)pos.x && pos.y == (unsigned int) pos.y , "Numbers must be integers");
|
||||||
int idx = (_gridSize.height * pos.x + pos.y) * 4 * 3;
|
int idx = (_gridSize.height * pos.x + pos.y) * 4 * 3;
|
||||||
|
@ -675,7 +675,7 @@ Quad3 TiledGrid3D::originalTile(const Point& pos)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Quad3 TiledGrid3D::tile(const Point& pos)
|
Quad3 TiledGrid3D::getTile(const Point& pos)
|
||||||
{
|
{
|
||||||
CCAssert( pos.x == (unsigned int)pos.x && pos.y == (unsigned int) pos.y , "Numbers must be integers");
|
CCAssert( pos.x == (unsigned int)pos.x && pos.y == (unsigned int) pos.y , "Numbers must be integers");
|
||||||
int idx = (_gridSize.height * pos.x + pos.y) * 4 * 3;
|
int idx = (_gridSize.height * pos.x + pos.y) * 4 * 3;
|
||||||
|
@ -687,6 +687,16 @@ Quad3 TiledGrid3D::tile(const Point& pos)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Quad3 TiledGrid3D::originalTile(const Point& pos)
|
||||||
|
{
|
||||||
|
return getOriginalTile(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Quad3 TiledGrid3D::tile(const Point& pos)
|
||||||
|
{
|
||||||
|
return getTile(pos);
|
||||||
|
}
|
||||||
|
|
||||||
void TiledGrid3D::reuse(void)
|
void TiledGrid3D::reuse(void)
|
||||||
{
|
{
|
||||||
if (_reuseGrid > 0)
|
if (_reuseGrid > 0)
|
||||||
|
|
|
@ -160,9 +160,15 @@ public:
|
||||||
~TiledGrid3D(void);
|
~TiledGrid3D(void);
|
||||||
|
|
||||||
/** returns the tile at the given position */
|
/** returns the tile at the given position */
|
||||||
Quad3 tile(const Point& pos);
|
CC_DEPRECATED_ATTRIBUTE Quad3 tile(const Point& pos);
|
||||||
/** returns the original tile (untransformed) at the given position */
|
/** returns the original tile (untransformed) at the given position */
|
||||||
Quad3 originalTile(const Point& pos);
|
CC_DEPRECATED_ATTRIBUTE Quad3 originalTile(const Point& pos);
|
||||||
|
|
||||||
|
/** returns the tile at the given position */
|
||||||
|
Quad3 getTile(const Point& pos);
|
||||||
|
/** returns the original tile (untransformed) at the given position */
|
||||||
|
Quad3 getOriginalTile(const Point& pos);
|
||||||
|
|
||||||
/** sets a new tile */
|
/** sets a new tile */
|
||||||
void setTile(const Point& pos, const Quad3& coords);
|
void setTile(const Point& pos, const Quad3& coords);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue