[nostalgia] Move geo types to Ox

This commit is contained in:
2023-05-30 20:33:06 -05:00
parent 4e0ce57594
commit 03a1a8abca
34 changed files with 147 additions and 973 deletions
@@ -1,12 +1,10 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/geo/point.hpp>
#include <nostalgia/geo/vec.hpp>
#include <nostalgia/glutils/glutils.hpp>
#include <nostalgia/studio/studio.hpp>
@@ -67,17 +65,17 @@ class TileSheetGrid {
ox::Error buildShader() noexcept;
void draw(bool update, const geo::Vec2 &scroll) noexcept;
void draw(bool update, const ox::Vec2 &scroll) noexcept;
void initBufferSet(const geo::Vec2 &paneSize, const TileSheet::SubSheet &subsheet) noexcept;
void initBufferSet(const ox::Vec2 &paneSize, const TileSheet::SubSheet &subsheet) noexcept;
private:
static void setBufferObject(geo::Point pt1, geo::Point pt2, Color32 c, float *vbo, const geo::Vec2 &pixSize) noexcept;
static void setBufferObject(ox::Point pt1, ox::Point pt2, Color32 c, float *vbo, const ox::Vec2 &pixSize) noexcept;
void setBufferObjects(const geo::Vec2 &paneSize, const TileSheet::SubSheet &subsheet) noexcept;
void setBufferObjects(const ox::Vec2 &paneSize, const TileSheet::SubSheet &subsheet) noexcept;
[[nodiscard]]
geo::Vec2 pixelSize(const geo::Vec2 &paneSize) const noexcept;
ox::Vec2 pixelSize(const ox::Vec2 &paneSize) const noexcept;
};