#pragma once #include #include #include #include class Sprite { private: SDL_Surface* surface = nullptr; SDL_Texture* texture = nullptr; float posX = 0.0f; float posY = 0.0f; public: Sprite() = default; Sprite(SDL_Renderer* renderer, std::string filePath); virtual ~Sprite() = default; // Pure virtual function to be implemented by derived classes virtual void draw() const = 0; // Function to set the position of the sprite virtual void setPosition(float x, float y) { posX = x; posY = y; } // Function to get the current position of the sprite virtual void getPosition(float &x, float &y) const { x = posX; y = posY; } };