Refactor bitmap palette management across various components to streamline palette setting and improve error handling; remove unnecessary status checks and enhance consistency in palette application methods.

This commit is contained in:
scawful
2025-04-17 21:49:47 -04:00
parent eeab477e72
commit 44e13cf4bb
17 changed files with 253 additions and 316 deletions

View File

@@ -60,9 +60,7 @@ class Renderer {
const std::vector<uint8_t> &data,
gfx::Bitmap &bitmap, gfx::SnesPalette &palette) {
bitmap.Create(width, height, depth, data);
if (!bitmap.SetPalette(palette).ok()) {
throw std::runtime_error("Failed to set palette");
}
bitmap.SetPalette(palette);
RenderBitmap(&bitmap);
}