Add BitmapManager class

This commit is contained in:
scawful
2023-11-12 09:54:08 -05:00
parent 97548fbe6f
commit 8677fdaa20
2 changed files with 56 additions and 7 deletions

View File

@@ -94,7 +94,7 @@ void Bitmap::Create(int width, int height, int depth, Bytes data) {
width_ = width;
height_ = height;
depth_ = depth;
data_ = data;
data_ = std::move(data);
pixel_data_ = data_.data();
surface_ = std::unique_ptr<SDL_Surface, SDL_Surface_Deleter>(
SDL_CreateRGBSurfaceWithFormat(0, width_, height_, depth_,