[nostalgia/core/studio] Put TileSheetEditor draw command in UndoCommand
This commit is contained in:
@@ -73,8 +73,7 @@ struct NostalgiaGraphic {
|
||||
}
|
||||
}
|
||||
|
||||
constexpr void setPixel(const geo::Point &pt, uint8_t palIdx) noexcept {
|
||||
const auto idx = ptToIdx(pt, this->columns);
|
||||
constexpr void setPixel(uint64_t idx, uint8_t palIdx) noexcept {
|
||||
if (bpp == 4) {
|
||||
if (idx & 1) {
|
||||
pixels[idx / 2] &= 0b0000'1111 | (palIdx << 4);
|
||||
@@ -85,6 +84,11 @@ struct NostalgiaGraphic {
|
||||
this->pixels[idx] = palIdx;
|
||||
}
|
||||
}
|
||||
|
||||
constexpr void setPixel(const geo::Point &pt, uint8_t palIdx) noexcept {
|
||||
const auto idx = ptToIdx(pt, this->columns);
|
||||
setPixel(idx, palIdx);
|
||||
}
|
||||
};
|
||||
|
||||
oxModelBegin(NostalgiaPalette)
|
||||
|
||||
Reference in New Issue
Block a user