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

@@ -194,9 +194,11 @@ absl::StatusOr<PaletteGroup> CreatePaletteGroupFromLargePalette(
for (int i = 0; i < palette.size(); i += 8) {
SnesPalette new_palette;
if (i + 8 < palette.size()) {
//new_palette.AddColor(SnesColor(ImVec4(0,0,0,0)));
for (int j = 0; j < 8; j++) {
new_palette.AddColor(palette[i + j]);
}
}
RETURN_IF_ERROR(toret.AddPalette(new_palette));