Improve error handling in LoadBinaryGfx by checking palette application status before rendering
This commit is contained in:
@@ -560,8 +560,10 @@ void ScreenEditor::LoadBinaryGfx() {
|
||||
gfx_sheets.emplace_back(converted_bin.begin() + (i * 0x1000),
|
||||
converted_bin.begin() + ((i + 1) * 0x1000));
|
||||
sheets_.emplace(i, gfx::Bitmap(128, 32, 8, gfx_sheets[i]));
|
||||
sheets_[i].ApplyPalette(*rom()->mutable_dungeon_palette(3));
|
||||
Renderer::GetInstance().RenderBitmap(&sheets_[i]);
|
||||
status_ = sheets_[i].ApplyPalette(*rom()->mutable_dungeon_palette(3));
|
||||
if (status_.ok()) {
|
||||
Renderer::GetInstance().RenderBitmap(&sheets_[i]);
|
||||
}
|
||||
}
|
||||
binary_gfx_loaded_ = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user