Fixed sprite size on zoom
This commit is contained in:
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
// GetTexture cannot return pointer to const, as SDL_RenderTexture modifies it
|
||||
SDL_Texture *GetTexture() { return m_Texture.get(); }
|
||||
WorldPos GetSize() const { return m_Size; }
|
||||
WorldSize GetSize() const { return m_Size; }
|
||||
WorldPos GetCenter() const { return m_ImageCenter; }
|
||||
|
||||
void LoadImage(std::string path, WorldPos image_center = WorldPos{});
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
private:
|
||||
static std::shared_ptr<SDL_Renderer> m_Renderer;
|
||||
std::unique_ptr<SDL_Texture, decltype(&SDL_DestroyTexture)> m_Texture;
|
||||
WorldPos m_Size;
|
||||
WorldSize m_Size;
|
||||
WorldPos m_ImageCenter;
|
||||
float m_TextureWidth = 0;
|
||||
float m_TextureHeight = 0;
|
||||
|
||||
Reference in New Issue
Block a user