25 lines
529 B
C
25 lines
529 B
C
|
#include <imageService.h>
|
||
|
#include <UtilTool.h>
|
||
|
#include <string>
|
||
|
#include <SFML/Graphics.hpp>
|
||
|
|
||
|
class MediaService
|
||
|
{
|
||
|
private:
|
||
|
ImageService *imageService = nullptr;
|
||
|
MediaType type;
|
||
|
sf::Texture *texture = nullptr;
|
||
|
sf::Sprite *sprite = nullptr;
|
||
|
int client_width = 0;
|
||
|
int client_height = 0;
|
||
|
public:
|
||
|
MediaService(const std::string &filename, int width, int height);
|
||
|
~MediaService(){
|
||
|
delete texture;
|
||
|
delete sprite;
|
||
|
}
|
||
|
sf::Sprite GetSprite()
|
||
|
{
|
||
|
return *sprite;
|
||
|
}
|
||
|
};
|