Add error handling to SnesPalette and SnesColor member fns

This commit is contained in:
scawful
2024-04-07 12:07:47 -04:00
parent f28e33b5d0
commit 03a38fc712
19 changed files with 188 additions and 117 deletions

View File

@@ -79,7 +79,8 @@ absl::Status Inventory::BuildTileset() {
test_.push_back(tilesheets_[i]);
}
tilesheets_bmp_.Create(128, 0x130, 64, test_);
palette_ = rom()->palette_group("hud")[0];
ASSIGN_OR_RETURN(auto hud_pal_group, rom()->palette_group("hud"));
palette_ = hud_pal_group[0];
tilesheets_bmp_.ApplyPalette(palette_);
rom()->RenderBitmap(&tilesheets_bmp_);
return absl::OkStatus();