[nostalgia] Move geo types to Ox
This commit is contained in:
@@ -10,7 +10,6 @@ add_library(
|
||||
target_link_libraries(
|
||||
NostalgiaScene PUBLIC
|
||||
NostalgiaCore
|
||||
NostalgiaGeo
|
||||
)
|
||||
|
||||
install(
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include <ox/fs/fs.hpp>
|
||||
#include <ox/std/error.hpp>
|
||||
#include <ox/std/size.hpp>
|
||||
#include <ox/std/types.hpp>
|
||||
#include <ox/std/vector.hpp>
|
||||
|
||||
#include <nostalgia/core/tilesheet.hpp>
|
||||
#include <nostalgia/geo/size.hpp>
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
@@ -78,7 +78,7 @@ struct SceneDoc {
|
||||
TileMap tiles;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr geo::Size size(std::size_t layerIdx) const noexcept {
|
||||
constexpr ox::Size size(std::size_t layerIdx) const noexcept {
|
||||
const auto &layer = this->tiles[layerIdx];
|
||||
const auto rowCnt = static_cast<int>(layer.size());
|
||||
if (!rowCnt) {
|
||||
@@ -170,7 +170,7 @@ struct SceneStatic {
|
||||
constexpr Tile tile(std::size_t i) noexcept {
|
||||
return {tileMapIdx[i], tileType[i], layerAttachments[i]};
|
||||
}
|
||||
constexpr auto setDimensions(geo::Size dim) noexcept {
|
||||
constexpr auto setDimensions(ox::Size dim) noexcept {
|
||||
columns = dim.width;
|
||||
rows = dim.height;
|
||||
const auto tileCnt = static_cast<unsigned>(columns * rows);
|
||||
|
||||
@@ -32,7 +32,7 @@ ox::CRString SceneEditorImGui::itemDisplayName() const noexcept {
|
||||
|
||||
void SceneEditorImGui::draw(core::Context*) noexcept {
|
||||
const auto paneSize = ImGui::GetContentRegionAvail();
|
||||
const geo::Size fbSize{
|
||||
const ox::Size fbSize{
|
||||
static_cast<int>(paneSize.x),
|
||||
static_cast<int>(paneSize.y)};
|
||||
m_view.draw(fbSize.width, fbSize.height);
|
||||
|
||||
Reference in New Issue
Block a user