overworld editor tile selector/painter routines

This commit is contained in:
scawful
2022-12-31 13:53:07 -06:00
parent 95d69bcb92
commit a8729add01
6 changed files with 173 additions and 90 deletions

View File

@@ -96,6 +96,11 @@ void Bitmap::Create(int width, int height, int depth, Bytes data) {
GrayscalePalette(surface_->format->palette);
}
void Bitmap::Apply(Bytes data) {
pixel_data_ = data.data();
data_ = data;
}
// Creates the texture that will be displayed to the screen.
void Bitmap::CreateTexture(std::shared_ptr<SDL_Renderer> renderer) {
texture_ = std::shared_ptr<SDL_Texture>{