mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 23:27:49 +01:00
43 lines
785 B
C++
43 lines
785 B
C++
//
|
|
// Created by Stepan Usatiuk on 26.07.2025.
|
|
//
|
|
|
|
#ifndef SFMLWINDOW_HPP
|
|
#define SFMLWINDOW_HPP
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
namespace SdkPort {
|
|
struct Pixel;
|
|
|
|
class SurfaceBase {
|
|
public:
|
|
SurfaceBase(EventLoop* loop);
|
|
|
|
~SurfaceBase(); // override;
|
|
|
|
void draw_pixel(unsigned x, unsigned y, const SdkPort::Pixel& pixel);
|
|
|
|
unsigned get_width() const;
|
|
|
|
unsigned get_height() const;
|
|
|
|
|
|
SurfaceBase(const SurfaceBase& other) = delete;
|
|
|
|
SurfaceBase(SurfaceBase&& other) noexcept = delete;
|
|
|
|
SurfaceBase& operator=(const SurfaceBase& other) = delete;
|
|
|
|
SurfaceBase& operator=(SurfaceBase&& other) noexcept = delete;
|
|
|
|
sf::RenderWindow _sf_window;
|
|
|
|
sf::Image _image;
|
|
sf::Texture _texture;
|
|
sf::Sprite _sprite;
|
|
};
|
|
}
|
|
|
|
#endif // SFMLWINDOW_HPP
|