Fix transparency handling

Ensure that the color count is properly used, and that
transparency is not counted as a color when packing palettes
This commit is contained in:
ISSOtm
2022-03-22 18:37:58 +01:00
committed by Eldred Habert
parent 7d54145e56
commit 7311fc9ef8
4 changed files with 42 additions and 7 deletions

View File

@@ -66,6 +66,10 @@ size_t ProtoPalette::size() const {
return std::distance(begin(), end());
}
bool ProtoPalette::empty() const {
return _colorIndices[0] == UINT16_MAX;
}
auto ProtoPalette::begin() const -> decltype(_colorIndices)::const_iterator {
return _colorIndices.begin();
}