[nostalgia] Add constructors needed by construct_at
This commit is contained in:
parent
b5210ff897
commit
eac471b21b
@ -25,6 +25,10 @@ class TileSheetClipboard: public ClipboardObject<TileSheetClipboard> {
|
|||||||
static constexpr auto TypeVersion = 1;
|
static constexpr auto TypeVersion = 1;
|
||||||
uint16_t colorIdx = 0;
|
uint16_t colorIdx = 0;
|
||||||
geo::Point pt;
|
geo::Point pt;
|
||||||
|
constexpr Pixel(uint16_t pColorIdx, geo::Point pPt) noexcept {
|
||||||
|
colorIdx = pColorIdx;
|
||||||
|
pt = pPt;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
protected:
|
protected:
|
||||||
ox::Vector<Pixel> m_pixels;
|
ox::Vector<Pixel> m_pixels;
|
||||||
@ -74,6 +78,10 @@ class DrawCommand: public studio::UndoCommand {
|
|||||||
struct Change {
|
struct Change {
|
||||||
uint32_t idx = 0;
|
uint32_t idx = 0;
|
||||||
uint16_t oldPalIdx = 0;
|
uint16_t oldPalIdx = 0;
|
||||||
|
constexpr Change(uint32_t pIdx, uint16_t pOldPalIdx) noexcept {
|
||||||
|
idx = pIdx;
|
||||||
|
oldPalIdx = pOldPalIdx;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
TileSheet *m_img = nullptr;
|
TileSheet *m_img = nullptr;
|
||||||
TileSheet::SubSheetIdx m_subSheetIdx;
|
TileSheet::SubSheetIdx m_subSheetIdx;
|
||||||
@ -151,6 +159,11 @@ class CutPasteCommand: public studio::UndoCommand {
|
|||||||
uint32_t idx = 0;
|
uint32_t idx = 0;
|
||||||
uint16_t newPalIdx = 0;
|
uint16_t newPalIdx = 0;
|
||||||
uint16_t oldPalIdx = 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 *m_img = nullptr;
|
||||||
TileSheet::SubSheetIdx m_subSheetIdx;
|
TileSheet::SubSheetIdx m_subSheetIdx;
|
||||||
|
@ -75,6 +75,10 @@ static ox::Error verifyFile(ox::FileSystem *fs, const ox::String &path, const ox
|
|||||||
struct VerificationPair {
|
struct VerificationPair {
|
||||||
ox::String path;
|
ox::String path;
|
||||||
ox::Buffer buff;
|
ox::Buffer buff;
|
||||||
|
VerificationPair(const ox::String &pPath, const ox::Buffer &pBuff) noexcept {
|
||||||
|
path = pPath;
|
||||||
|
buff = pBuff;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ox::Error copy(ox::FileSystem *src, ox::FileSystem *dest, const ox::String &path) noexcept {
|
static ox::Error copy(ox::FileSystem *src, ox::FileSystem *dest, const ox::String &path) noexcept {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user