Rename palette() to icon_palette().
This commit is contained in:
parent
c5987d882d
commit
1bca8f0201
3 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
static constexpr std::size_t size() { return FrameSize * 64; }
|
||||
|
||||
std::vector<uint8_t> palette() const;
|
||||
std::vector<uint8_t> icon_palette() const;
|
||||
bool has_magic() const;
|
||||
IconDisplayFlag icon_display_flag() const;
|
||||
int block_count() const;
|
||||
|
|
|
@ -97,7 +97,7 @@ auto BasicBlock<Const>::frame(unsigned int idx) const -> const data_type* {
|
|||
}
|
||||
|
||||
template <bool Const>
|
||||
std::vector<uint8_t> BasicBlock<Const>::palette() const {
|
||||
std::vector<uint8_t> BasicBlock<Const>::icon_palette() const {
|
||||
const auto ptr = frame(0);
|
||||
return extract_palette(ptr, ptr + FrameSize);
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace {
|
|||
std::vector<std::vector<char>> icon_fetch (const psx::ConstBlock& block, int width, int height) {
|
||||
const constexpr int in_height = 16, in_width = 16;
|
||||
const bool scale = (in_width != width or in_height != height);
|
||||
const std::vector<uint8_t> palette = block.palette();
|
||||
const std::vector<uint8_t> palette = block.icon_palette();
|
||||
assert(palette.size() == 16 * 4);
|
||||
const int32_t palette_padded_size = (not scale) * (((palette.size() * CHAR_BIT + 31) bitand ~31) / CHAR_BIT);
|
||||
assert(palette.size() == static_cast<std::size_t>(palette_padded_size) or scale);
|
||||
|
|
Loading…
Add table
Reference in a new issue