Replace BuildAndRenderBitmap with Rom::CreateAndRenderBitmap

This commit is contained in:
scawful
2024-04-14 15:02:56 -05:00
parent 5953e58bd4
commit 81e5659c1f
7 changed files with 46 additions and 48 deletions

View File

@@ -507,6 +507,15 @@ class Rom : public core::ExperimentFlags {
renderer_ = renderer;
}
absl::Status CreateAndRenderBitmap(int width, int height, int depth,
const Bytes& data, gfx::Bitmap& bitmap,
gfx::SnesPalette& palette) {
bitmap.Create(width, height, depth, data);
RETURN_IF_ERROR(bitmap.ApplyPalette(palette));
RenderBitmap(&bitmap);
return absl::OkStatus();
}
/**
* @brief Used to render a bitmap to the screen.
*/