[nostalgia/core/studio] Add ability to select pixels for copy/paste

This commit is contained in:
2022-03-10 02:39:22 -06:00
parent 3486734b50
commit b502b8cc30
9 changed files with 147 additions and 33 deletions
@@ -40,15 +40,18 @@ class TileSheetPixels {
float m_pixelSizeMod = 1;
glutils::GLProgram m_shader;
glutils::BufferSet m_bufferSet;
const class TileSheetEditorModel *m_model = nullptr;
public:
explicit TileSheetPixels(class TileSheetEditorModel *model) noexcept;
void setPixelSizeMod(float sm) noexcept;
ox::Error buildShader() noexcept;
void draw(bool update, const geo::Vec2 &scroll) noexcept;
void initBufferSet(const geo::Vec2 &paneSize, const TileSheet &img, const TileSheet::SubSheet &subSheet, const Palette &pal) noexcept;
void initBufferSet(const geo::Vec2 &paneSize) noexcept;
[[nodiscard]]
geo::Vec2 pixelSize(const geo::Vec2 &paneSize) const noexcept;
@@ -56,7 +59,7 @@ class TileSheetPixels {
private:
void setPixelBufferObject(const geo::Vec2 &paneS, unsigned vertexRow, float x, float y, Color16 color, float *vbo, GLuint *ebo) const noexcept;
void setBufferObjects(const geo::Vec2 &paneS, const TileSheet &img, const TileSheet::SubSheet &subSheet, const Palette &pal) noexcept;
void setBufferObjects(const geo::Vec2 &paneS) noexcept;
};