Graphics: Add origin to all sprite-based renderables (and made it a factor)

This commit is contained in:
SirLynix
2022-12-17 14:48:50 +01:00
parent 0537be3201
commit d4422c4102
12 changed files with 98 additions and 38 deletions

View File

@@ -310,6 +310,15 @@ namespace Nz
return m_mapSize;
}
/*!
* \brief Gets the tilemap origin
* \return Tilemap origin
*/
inline const Vector2f& Tilemap::GetOrigin() const
{
return m_origin;
}
/*!
* \brief Returns the size of the tilemap in units (which is equivalent to GetMapSize() * GetTileSize())
* \return Maximum size in units occupied by this tilemap
@@ -359,7 +368,7 @@ namespace Nz
return m_isometricModeEnabled;
}
inline void Tilemap::SetOrigin(const Vector3f& origin)
inline void Tilemap::SetOrigin(const Vector2f& origin)
{
m_origin = origin;