[nostalgia] Rename common package to geo
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <ox/model/def.hpp>
|
||||
|
||||
#include <nostalgia/common/bounds.hpp>
|
||||
#include <nostalgia/common/vec.hpp>
|
||||
#include <nostalgia/geo/bounds.hpp>
|
||||
#include <nostalgia/geo/vec.hpp>
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
@@ -48,7 +48,7 @@ constexpr auto toString(TileSheetTool t) noexcept {
|
||||
struct PixelChunk {
|
||||
static constexpr auto TypeName = "net.drinkingtea.nostalgia.core.studio.PixelChunk";
|
||||
static constexpr auto TypeVersion = 1;
|
||||
common::Point pt;
|
||||
geo::Point pt;
|
||||
int size = 0;
|
||||
};
|
||||
|
||||
@@ -65,8 +65,8 @@ struct TileSheetClipboard {
|
||||
|
||||
protected:
|
||||
ox::Vector<int> m_pixels;
|
||||
common::Point m_p1;
|
||||
common::Point m_p2;
|
||||
geo::Point m_p1;
|
||||
geo::Point m_p2;
|
||||
|
||||
public:
|
||||
void addPixel(int color);
|
||||
@@ -74,15 +74,15 @@ struct TileSheetClipboard {
|
||||
[[nodiscard]]
|
||||
bool empty() const;
|
||||
|
||||
void pastePixels(const common::Point &pt, ox::Vector<int> *tgt, int tgtColumns) const;
|
||||
void pastePixels(const geo::Point &pt, ox::Vector<int> *tgt, int tgtColumns) const;
|
||||
|
||||
void setPoints(const common::Point &p1, const common::Point &p2);
|
||||
void setPoints(const geo::Point &p1, const geo::Point &p2);
|
||||
|
||||
[[nodiscard]]
|
||||
common::Point point1() const;
|
||||
geo::Point point1() const;
|
||||
|
||||
[[nodiscard]]
|
||||
common::Point point2() const;
|
||||
geo::Point point2() const;
|
||||
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ class TileSheetEditor {
|
||||
NostalgiaGraphic m_img;
|
||||
AssetRef<NostalgiaPalette> m_pal;
|
||||
float m_pixelSizeMod = 1;
|
||||
common::Vec2 m_scrollOffset;
|
||||
geo::Vec2 m_scrollOffset;
|
||||
|
||||
public:
|
||||
TileSheetEditor(Context *ctx, const ox::String &path);
|
||||
@@ -119,13 +119,13 @@ class TileSheetEditor {
|
||||
|
||||
void draw() noexcept;
|
||||
|
||||
void clickPixel(const common::Vec2 &paneSize, const common::Vec2 &clickPos) noexcept;
|
||||
void clickPixel(const geo::Vec2 &paneSize, const geo::Vec2 &clickPos) noexcept;
|
||||
|
||||
void scrollV(const common::Vec2 paneSz, float wheel, bool zoomMod) noexcept;
|
||||
void scrollV(const geo::Vec2 paneSz, float wheel, bool zoomMod) noexcept;
|
||||
|
||||
void scrollH(const common::Vec2 paneSz, float wheel) noexcept;
|
||||
void scrollH(const geo::Vec2 paneSz, float wheel) noexcept;
|
||||
|
||||
void resize(const common::Vec2 &sz) noexcept;
|
||||
void resize(const geo::Vec2 &sz) noexcept;
|
||||
|
||||
const NostalgiaGraphic &img() const;
|
||||
|
||||
@@ -138,7 +138,7 @@ class TileSheetEditor {
|
||||
protected:
|
||||
void saveItem();
|
||||
|
||||
void getFillPixels(bool *pixels, common::Point pt, int oldColor) const;
|
||||
void getFillPixels(bool *pixels, geo::Point pt, int oldColor) const;
|
||||
|
||||
private:
|
||||
void setPalette();
|
||||
|
||||
Reference in New Issue
Block a user