Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStevns committed Aug 29, 2023
1 parent 836e34f commit dd06086
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
16 changes: 0 additions & 16 deletions core_lib/src/graphics/bitmap/tiledbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,3 @@ QPoint TiledBuffer::getTilePos(const TileIndex& index) const
return QPoint { qRound(UNIFORM_TILE_SIZE*static_cast<qreal>(index.x)),
qRound(UNIFORM_TILE_SIZE*static_cast<qreal>(index.y)) };
}

TileIndex TiledBuffer::getTileIndex(const TileIndex& pos) const
{
return { qRound(static_cast<qreal>(pos.x)/UNIFORM_TILE_SIZE),
qRound(static_cast<qreal>(pos.y)/UNIFORM_TILE_SIZE) };
}

QRect TiledBuffer::getRectForPoint(const QPoint& point, const QSize size) const
{
return QRect(point.x(), point.y(), size.width(), size.height());
}

QRect TiledBuffer::getRectForPoint(const QPoint& point) const
{
return QRect(point.x(), point.y(), UNIFORM_TILE_SIZE, UNIFORM_TILE_SIZE);
}
19 changes: 0 additions & 19 deletions core_lib/src/graphics/bitmap/tiledbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class TiledBuffer: public QObject

const QRect& bounds() const { return mTileBounds; }


signals:
void tileUpdated(TiledBuffer* tiledBuffer, Tile* tile);
void tileCreated(TiledBuffer* tiledBuffer, Tile* tile);
Expand All @@ -78,24 +77,6 @@ class TiledBuffer: public QObject
Tile* getTileFromIndex(const TileIndex& tileIndex);

inline QPoint getTilePos(const TileIndex& index) const;
inline TileIndex getTileIndex(const TileIndex& pos) const;

/**
* @brief getRectForPoint
* Returns a rectangle with a specified size for the given point
* @param point
* @param size
* @return QRect
*/
QRect getRectForPoint(const QPoint& point, const QSize size) const;

/**
* @brief getRectForPoint
* Returns a rectangle with the size of UNIFORM_TILE_SIZE (64,64)
* @param point
* @return QRect
*/
QRect getRectForPoint(const QPoint& point) const;

const int UNIFORM_TILE_SIZE = 64;

Expand Down

0 comments on commit dd06086

Please sign in to comment.