[nostalgia,studio] Make module handling consistent
This commit is contained in:
@@ -3,7 +3,7 @@ add_library(
|
||||
NostalgiaScene
|
||||
scene.cpp
|
||||
scenestatic.cpp
|
||||
scenemodule.cpp
|
||||
keelmodule.cpp
|
||||
typeconv.cpp
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ target_link_libraries(
|
||||
install(
|
||||
FILES
|
||||
scenestatic.hpp
|
||||
scenemodule.hpp
|
||||
keelmodule.hpp
|
||||
typeconv.hpp
|
||||
DESTINATION
|
||||
include/nostalgia/scene
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <ox/model/model.hpp>
|
||||
|
||||
#include "scenestatic.hpp"
|
||||
#include "typeconv.hpp"
|
||||
|
||||
#include "scenemodule.hpp"
|
||||
#include "keelmodule.hpp"
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
@@ -41,7 +39,7 @@ class SceneModule: public keel::Module {
|
||||
};
|
||||
|
||||
static SceneModule mod;
|
||||
const keel::Module *module() noexcept {
|
||||
const keel::Module *keelModule() noexcept {
|
||||
return &mod;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
const keel::Module *module() noexcept;
|
||||
const keel::Module *keelModule() noexcept;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
add_library(
|
||||
NostalgiaScene-Studio OBJECT
|
||||
module.cpp
|
||||
studiomodule.cpp
|
||||
sceneeditor-imgui.cpp
|
||||
sceneeditor.cpp
|
||||
sceneeditorview.cpp
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <turbine/turbine.hpp>
|
||||
#include <studio/studio.hpp>
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
class StudioModule: public studio::Module {
|
||||
public:
|
||||
ox::Vector<studio::EditorMaker> editors(turbine::Context *ctx) noexcept override;
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(turbine::Context*) noexcept override;
|
||||
};
|
||||
|
||||
}
|
||||
+14
-3
@@ -3,11 +3,17 @@
|
||||
*/
|
||||
|
||||
#include "sceneeditor-imgui.hpp"
|
||||
#include "module.hpp"
|
||||
#include "studiomodule.hpp"
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
ox::Vector<studio::EditorMaker> StudioModule::editors(turbine::Context *ctx) noexcept {
|
||||
class StudioModule: public studio::Module {
|
||||
public:
|
||||
ox::Vector<studio::EditorMaker> editors(turbine::Context *ctx) const noexcept override;
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(turbine::Context*) const noexcept override;
|
||||
};
|
||||
|
||||
ox::Vector<studio::EditorMaker> StudioModule::editors(turbine::Context *ctx) const noexcept {
|
||||
return {
|
||||
{
|
||||
{"nscn"},
|
||||
@@ -18,9 +24,14 @@ ox::Vector<studio::EditorMaker> StudioModule::editors(turbine::Context *ctx) noe
|
||||
};
|
||||
}
|
||||
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> StudioModule::itemMakers(turbine::Context*) noexcept {
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> StudioModule::itemMakers(turbine::Context*) const noexcept {
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> out;
|
||||
return out;
|
||||
}
|
||||
|
||||
static StudioModule mod;
|
||||
const studio::Module *studioModule() noexcept {
|
||||
return &mod;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <turbine/turbine.hpp>
|
||||
#include <studio/studio.hpp>
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
||||
const studio::Module *studioModule() noexcept;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user