[nostalgia] Add constructors needed by construct_at

This commit is contained in:
2022-04-10 03:04:24 -05:00
parent b5210ff897
commit eac471b21b
2 changed files with 17 additions and 0 deletions
@@ -25,6 +25,10 @@ class TileSheetClipboard: public ClipboardObject<TileSheetClipboard> {
static constexpr auto TypeVersion = 1;
uint16_t colorIdx = 0;
geo::Point pt;
constexpr Pixel(uint16_t pColorIdx, geo::Point pPt) noexcept {
colorIdx = pColorIdx;
pt = pPt;
}
};
protected:
ox::Vector<Pixel> m_pixels;
@@ -74,6 +78,10 @@ class DrawCommand: public studio::UndoCommand {
struct Change {
uint32_t idx = 0;
uint16_t oldPalIdx = 0;
constexpr Change(uint32_t pIdx, uint16_t pOldPalIdx) noexcept {
idx = pIdx;
oldPalIdx = pOldPalIdx;
}
};
TileSheet *m_img = nullptr;
TileSheet::SubSheetIdx m_subSheetIdx;
@@ -151,6 +159,11 @@ class CutPasteCommand: public studio::UndoCommand {
uint32_t idx = 0;
uint16_t newPalIdx = 0;
uint16_t oldPalIdx = 0;
constexpr Change(uint32_t pIdx, uint16_t pNewPalIdx, uint16_t pOldPalIdx) noexcept {
idx = pIdx;
newPalIdx = pNewPalIdx;
oldPalIdx = pOldPalIdx;
}
};
TileSheet *m_img = nullptr;
TileSheet::SubSheetIdx m_subSheetIdx;