[nostalgia] Move modules into modules directory

This commit is contained in:
Gary Talent 2023-06-17 17:22:39 -05:00
parent dd54e7363f
commit ecde759bec
73 changed files with 75 additions and 63 deletions

View File

@ -1,9 +1,7 @@
#project packages
add_subdirectory(appmodules)
add_subdirectory(core)
add_subdirectory(scene)
add_subdirectory(modules)
if(NOSTALGIA_BUILD_PLAYER)
add_subdirectory(player)

View File

@ -1,3 +1,11 @@
# module dir list
add_subdirectory(core)
add_subdirectory(scene)
# module libraries
add_library(
NostalgiaKeelModules OBJECT
keelmodules.cpp

View File

@ -0,0 +1,8 @@
add_subdirectory(src)
install(
DIRECTORY
include/nostalgia
DESTINATION
include
)

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once

View File

@ -12,4 +12,3 @@
#include "palette.hpp"
#include "ptidxconv.hpp"
#include "tilesheet.hpp"
#include "typeconv.hpp"

View File

@ -16,6 +16,11 @@ if(NOT MSVC)
target_compile_options(NostalgiaCore PRIVATE -Wconversion)
endif()
target_include_directories(
NostalgiaCore PUBLIC
../include
)
target_link_libraries(
NostalgiaCore PUBLIC
Turbine
@ -25,26 +30,10 @@ if(NOSTALGIA_BUILD_STUDIO)
add_subdirectory(studio)
endif()
install(
FILES
color.hpp
config.hpp
consts.hpp
context.hpp
core.hpp
gfx.hpp
initparams.hpp
ptidxconv.hpp
tilesheet.hpp
typeconv.hpp
DESTINATION
include/nostalgia/core
)
install(
TARGETS
NostalgiaCore
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
)

View File

@ -2,7 +2,7 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "../gfx.hpp"
#include <nostalgia/core/gfx.hpp>
#include "context.hpp"

View File

@ -4,7 +4,7 @@
#pragma once
#include "../context.hpp"
#include <nostalgia/core/context.hpp>
namespace nostalgia::core {

View File

@ -4,7 +4,7 @@
#pragma once
#include "../context.hpp"
#include <nostalgia/core/context.hpp>
namespace nostalgia::core {
ox::Error initGfx(Context *ctx, const InitParams&) noexcept;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/

View File

@ -2,7 +2,7 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "gfx.hpp"
#include <nostalgia/core/gfx.hpp>
namespace nostalgia::core {

View File

@ -7,10 +7,11 @@
#include <keel/asset.hpp>
#include <keel/module.hpp>
#include "gfx.hpp"
#include "typeconv.hpp"
#include <nostalgia/core/gfx.hpp>
#include "keelmodule.hpp"
#include <nostalgia/core/keelmodule.hpp>
#include "typeconv.hpp"
namespace nostalgia::core {

View File

@ -8,10 +8,10 @@
#include <glutils/glutils.hpp>
#include "gfx.hpp"
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/core/context.hpp>
#include "../gfx.hpp"
#include "../context.hpp"
#include "gfx.hpp"
namespace nostalgia::core {

View File

@ -10,7 +10,7 @@
#include <glutils/glutils.hpp>
#include "../context.hpp"
#include <nostalgia/core/context.hpp>
namespace nostalgia::core::renderer {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "paletteeditor.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once

View File

@ -4,11 +4,11 @@
#include <ox/std/memory.hpp>
#include <studio/studio.hpp>
#include "paletteeditor-imgui.hpp"
#include "tilesheeteditor-imgui.hpp"
#include "studiomodule.hpp"
namespace nostalgia::core {
class StudioModule: public studio::Module {

View File

@ -8,8 +8,8 @@
#include <keel/typeconv.hpp>
#include "context.hpp"
#include "gfx.hpp"
#include <nostalgia/core/context.hpp>
#include <nostalgia/core/gfx.hpp>
namespace nostalgia::core {

View File

@ -0,0 +1,13 @@
add_subdirectory(src)
target_include_directories(
NostalgiaScene PUBLIC
include
)
install(
DIRECTORY
include/nostalgia
DESTINATION
include
)

View File

@ -7,20 +7,16 @@ add_library(
typeconv.cpp
)
target_include_directories(
NostalgiaScene PUBLIC
../include
)
target_link_libraries(
NostalgiaScene PUBLIC
NostalgiaCore
)
install(
FILES
scenestatic.hpp
keelmodule.hpp
typeconv.hpp
DESTINATION
include/nostalgia/scene
)
if(NOSTALGIA_BUILD_STUDIO)
add_subdirectory(studio)
endif()

View File

@ -2,10 +2,11 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "scenestatic.hpp"
#include "typeconv.hpp"
#include <keel/module.hpp>
#include "keelmodule.hpp"
#include <nostalgia/scene/scenestatic.hpp>
#include "typeconv.hpp"
namespace nostalgia::scene {

View File

@ -4,7 +4,7 @@
#include <nostalgia/core/gfx.hpp>
#include "scene.hpp"
#include <nostalgia/scene/scene.hpp>
namespace nostalgia::scene {

View File

@ -2,7 +2,7 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "scenestatic.hpp"
#include <nostalgia/scene/scenestatic.hpp>
namespace nostalgia::scene {

View File

@ -2,8 +2,9 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <studio/studio.hpp>
#include "sceneeditor-imgui.hpp"
#include "studiomodule.hpp"
namespace nostalgia::scene {

View File

@ -6,7 +6,7 @@
#include <keel/typeconv.hpp>
#include "scenestatic.hpp"
#include <nostalgia/scene/scenestatic.hpp>
namespace nostalgia::scene {

View File

@ -6,7 +6,7 @@
#include <keel/media.hpp>
#include <nostalgia/appmodules/keelmodules.hpp>
#include <nostalgia/modules/keelmodules.hpp>
#include "app.hpp"

View File

@ -2,8 +2,8 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <nostalgia/appmodules/keelmodules.hpp>
#include <nostalgia/appmodules/studiomodules.hpp>
#include <nostalgia/modules/keelmodules.hpp>
#include <nostalgia/modules/studiomodules.hpp>
#include <studioapp/studioapp.hpp>

View File

@ -10,9 +10,7 @@
#include <keel/keel.hpp>
#include <nostalgia/appmodules/keelmodules.hpp>
using namespace nostalgia;
#include <nostalgia/modules/keelmodules.hpp>
static ox::Error writeFileBuff(ox::CRStringView path, const ox::Buffer &buff) noexcept {
try {
@ -52,7 +50,7 @@ static ox::Error generateTypes(ox::TypeStore *ts) noexcept {
}
static ox::Error run(const ox::ClArgs &args) noexcept {
registerKeelModules();
nostalgia::registerKeelModules();
const auto argSrc = args.getString("src", "");
const auto argRomBin = args.getString("rom-bin", "");
if (argSrc == "") {