[nostalgia/core] Rename NostalgiaGraphic and NostalgiaPalette to TileSheet and Palette
This commit is contained in:
@@ -28,13 +28,13 @@ struct DrawCommand: public studio::UndoCommand {
|
||||
uint32_t idx = 0;
|
||||
uint16_t oldPalIdx = 0;
|
||||
};
|
||||
NostalgiaGraphic *m_img = nullptr;
|
||||
TileSheet *m_img = nullptr;
|
||||
ox::Vector<Change, 8> m_changes;
|
||||
int m_palIdx = 0;
|
||||
bool *m_modelUpdated = nullptr;
|
||||
|
||||
public:
|
||||
constexpr DrawCommand(bool *updated, NostalgiaGraphic *img, std::size_t idx, int palIdx) noexcept {
|
||||
constexpr DrawCommand(bool *updated, TileSheet *img, std::size_t idx, int palIdx) noexcept {
|
||||
m_modelUpdated = updated;
|
||||
m_img = img;
|
||||
m_changes.emplace_back(idx, m_img->getPixel(idx));
|
||||
@@ -114,8 +114,8 @@ oxModelEnd()
|
||||
class TileSheetEditorModel {
|
||||
|
||||
private:
|
||||
NostalgiaGraphic m_img;
|
||||
AssetRef<NostalgiaPalette> m_pal;
|
||||
TileSheet m_img;
|
||||
AssetRef<Palette> m_pal;
|
||||
studio::UndoStack m_undoStack;
|
||||
DrawCommand *m_ongoingDrawCommand = nullptr;
|
||||
bool m_updated = false;
|
||||
@@ -132,13 +132,13 @@ class TileSheetEditorModel {
|
||||
void paste();
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr const NostalgiaGraphic &img() const noexcept;
|
||||
constexpr const TileSheet &img() const noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr NostalgiaGraphic &img() noexcept;
|
||||
constexpr TileSheet &img() noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr const NostalgiaPalette &pal() const noexcept;
|
||||
constexpr const Palette &pal() const noexcept;
|
||||
|
||||
void drawCommand(const geo::Point &pt, std::size_t palIdx) noexcept;
|
||||
|
||||
@@ -175,15 +175,15 @@ class TileSheetEditorModel {
|
||||
|
||||
};
|
||||
|
||||
constexpr const NostalgiaGraphic &TileSheetEditorModel::img() const noexcept {
|
||||
constexpr const TileSheet &TileSheetEditorModel::img() const noexcept {
|
||||
return m_img;
|
||||
}
|
||||
|
||||
constexpr NostalgiaGraphic &TileSheetEditorModel::img() noexcept {
|
||||
constexpr TileSheet &TileSheetEditorModel::img() noexcept {
|
||||
return m_img;
|
||||
}
|
||||
|
||||
constexpr const NostalgiaPalette &TileSheetEditorModel::pal() const noexcept {
|
||||
constexpr const Palette &TileSheetEditorModel::pal() const noexcept {
|
||||
return *m_pal;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user