refactor bitmap and rom

This commit is contained in:
scawful
2022-08-23 14:00:24 -05:00
parent 50252fd267
commit 8828557143
3 changed files with 28 additions and 29 deletions

View File

@@ -119,10 +119,11 @@ absl::Status Bitmap::CreateFromTiles(const std::vector<Bitmap> &tiles) {
absl::Status Bitmap::WritePixel(int pos, uchar pixel) {
if (!surface_) {
return absl::InternalError("Surface not loaded");
}
surface_->pixels[pos] = pixel;
}
auto pixels = (char *)surface_->pixels;
pixels[pos] = pixel;
return absl::OkStatus();
}
}
} // namespace gfx
} // namespace app