Tunneler/Sprite.h

29 lines
519 B
C
Raw Permalink Normal View History

2023-12-19 17:53:47 +01:00
//
// Created by bruno on 28.10.2023.
//
#ifndef TUNELLERBUTWORSE_SPRITE_H
#define TUNELLERBUTWORSE_SPRITE_H
#include <SDL.h>
#include <string>
class Sprite {
public:
Sprite(std::string filename, SDL_Renderer* renderer, SDL_Rect* targetRect);
~Sprite();
int render(SDL_Renderer* renderer);
int getX() const;
int getY() const;
void moveTo(int x, int y);
void moveRelative(int x, int y);
private:
SDL_Texture* sprite;
SDL_Rect* targetRect;
};
#endif //TUNELLERBUTWORSE_SPRITE_H