mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user