diff options
author | Mateja <mail@matejamaric.com> | 2021-02-19 17:28:33 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-02-19 17:28:33 +0100 |
commit | 9e7016e23471b7ba67598b5558c7fc7c528f1f2a (patch) | |
tree | 693b9a7fe468e8df1f431b3b5c33971f1a996764 /src/Bitmap.h | |
parent | 3b89cf20f583a82a3cd5bdbe04c07630838af5c3 (diff) | |
download | erender-9e7016e23471b7ba67598b5558c7fc7c528f1f2a.tar.gz erender-9e7016e23471b7ba67598b5558c7fc7c528f1f2a.zip |
Moved texture loading to `Bitmap` class.
Diffstat (limited to 'src/Bitmap.h')
-rw-r--r-- | src/Bitmap.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Bitmap.h b/src/Bitmap.h index c4064ad..60a72bd 100644 --- a/src/Bitmap.h +++ b/src/Bitmap.h @@ -1,10 +1,19 @@ #include<iostream>
+#include<string>
+#include<chrono>
+
+#include<SFML/Graphics.hpp>
+
class Bitmap
{
public:
int width, height;
unsigned char *pixels;
+ sf::Image* image;
+ bool isLoaded;
+ std::chrono::duration<double> loadingTime;
Bitmap(int width_, int height_);
+ Bitmap(std::string);
~Bitmap();
void fill(int r, int g, int b);
void setPixel(int x, int y, int r, int g, int b);
|