[nostalgia] Fix NostalgiaGfx lib name, stub out sound package
All checks were successful
Build / build (push) Successful in 1m27s

This commit is contained in:
Gary Talent 2025-02-19 21:32:02 -06:00
parent 62d0579f40
commit 6c194667b9
25 changed files with 261 additions and 38 deletions

View File

@ -1,6 +1,7 @@
# module dir list
add_subdirectory(gfx)
add_subdirectory(sound)
add_subdirectory(scene)
# module libraries
@ -13,7 +14,7 @@ add_library(
target_link_libraries(
NostalgiaKeelModules PUBLIC
Keel
NostalgiaCore-Keel
NostalgiaGfx-Keel
NostalgiaScene-Keel
)
install(
@ -32,7 +33,8 @@ if(NOSTALGIA_BUILD_STUDIO)
target_link_libraries(
NostalgiaStudioModules PUBLIC
StudioAppLib
NostalgiaCore-Studio-ImGui
NostalgiaGfx-Studio-ImGui
NostalgiaSound-Studio-ImGui
NostalgiaScene-Studio
)
install(

View File

@ -1,5 +1,5 @@
add_library(
NostalgiaCore
NostalgiaGfx
gfx.cpp
tilesheet.cpp
)
@ -10,12 +10,12 @@ if(NOT BUILDCORE_TARGET STREQUAL "gba")
endif()
target_include_directories(
NostalgiaCore PUBLIC
NostalgiaGfx PUBLIC
../include
)
target_link_libraries(
NostalgiaCore PUBLIC
NostalgiaGfx PUBLIC
Turbine
)
@ -26,7 +26,7 @@ endif()
install(
TARGETS
NostalgiaCore
NostalgiaGfx
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib

View File

@ -1,15 +1,15 @@
add_library(
NostalgiaCore-GBA OBJECT
NostalgiaGfx-GBA OBJECT
context.cpp
gfx.cpp
panic.cpp
)
target_include_directories(
NostalgiaCore-GBA PUBLIC
NostalgiaGfx-GBA PUBLIC
../../include
)
target_link_libraries(
NostalgiaCore-GBA PUBLIC
NostalgiaGfx-GBA PUBLIC
TeaGBA
Keel
Turbine
@ -17,5 +17,5 @@ target_link_libraries(
if(BUILDCORE_TARGET STREQUAL "gba")
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
target_link_libraries(NostalgiaCore PUBLIC NostalgiaCore-GBA)
target_link_libraries(NostalgiaGfx PUBLIC NostalgiaGfx-GBA)
endif()

View File

@ -1,18 +1,18 @@
add_library(
NostalgiaCore-Keel
NostalgiaGfx-Keel
keelmodule.cpp
typeconv.cpp
)
target_link_libraries(
NostalgiaCore-Keel PUBLIC
NostalgiaGfx-Keel PUBLIC
Keel
NostalgiaCore
NostalgiaGfx
)
install(
TARGETS
NostalgiaCore-Keel
NostalgiaGfx-Keel
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib

View File

@ -1,9 +1,9 @@
target_sources(
NostalgiaCore PRIVATE
NostalgiaGfx PRIVATE
context.cpp
gfx.cpp
)
target_link_libraries(
NostalgiaCore PUBLIC
NostalgiaGfx PUBLIC
GlUtils
)

View File

@ -1,25 +1,25 @@
add_library(NostalgiaCore-Studio)
add_library(NostalgiaGfx-Studio)
add_library(
NostalgiaCore-Studio-ImGui
NostalgiaGfx-Studio-ImGui
studiomodule.cpp
)
target_link_libraries(
NostalgiaCore-Studio PUBLIC
NostalgiaCore
NostalgiaGfx-Studio PUBLIC
NostalgiaGfx
Studio
)
target_link_libraries(
NostalgiaCore-Studio-ImGui PUBLIC
NostalgiaCore-Studio
NostalgiaGfx-Studio-ImGui PUBLIC
NostalgiaGfx-Studio
)
install(
TARGETS
NostalgiaCore-Studio-ImGui
NostalgiaCore-Studio
NostalgiaGfx-Studio-ImGui
NostalgiaGfx-Studio
LIBRARY DESTINATION
${NOSTALGIA_DIST_MODULE}
)

View File

@ -1,5 +1,5 @@
target_sources(
NostalgiaCore-Studio-ImGui PRIVATE
NostalgiaGfx-Studio-ImGui PRIVATE
paletteeditor-imgui.cpp
)

View File

@ -1,6 +1,6 @@
target_sources(
NostalgiaCore-Studio PRIVATE
NostalgiaGfx-Studio PRIVATE
addcolorcommand.cpp
addpagecommand.cpp
applycolorallpagescommand.cpp

View File

@ -1,5 +1,5 @@
target_sources(
NostalgiaCore-Studio PRIVATE
NostalgiaGfx-Studio PRIVATE
tilesheeteditorview.cpp
tilesheeteditormodel.cpp
tilesheetpixelgrid.cpp
@ -7,12 +7,12 @@ target_sources(
)
target_sources(
NostalgiaCore-Studio-ImGui PRIVATE
NostalgiaGfx-Studio-ImGui PRIVATE
tilesheeteditor-imgui.cpp
)
target_link_libraries(
NostalgiaCore-Studio-ImGui PUBLIC
NostalgiaGfx-Studio-ImGui PUBLIC
lodepng
)

View File

@ -1,5 +1,5 @@
target_sources(
NostalgiaCore-Studio PRIVATE
NostalgiaGfx-Studio PRIVATE
addsubsheetcommand.cpp
cutpastecommand.cpp
deletetilescommand.cpp

View File

@ -18,14 +18,13 @@
#include "commands/drawcommand.hpp"
#include "commands/flipcommand.hpp"
#include "commands/inserttilescommand.hpp"
#include "commands/movesubsheetcommand.hpp"
#include "commands/palettechangecommand.hpp"
#include "commands/rmsubsheetcommand.hpp"
#include "commands/rotatecommand.hpp"
#include "commands/updatesubsheetcommand.hpp"
#include "tilesheeteditormodel.hpp"
#include "commands/movesubsheetcommand.hpp"
#include "commands/rotatecommand.hpp"
namespace nostalgia::gfx {
// delete pixels of all non-leaf nodes

View File

@ -1,11 +1,11 @@
add_executable(
NostalgiaCoreTest
NostalgiaGfxTest
tests.cpp
)
target_link_libraries(
NostalgiaCoreTest
NostalgiaCore
NostalgiaGfxTest
NostalgiaGfx
)
add_test("[NostalgiaCore] readWriteTileSheet" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NostalgiaCoreTest readWriteTileSheet)
add_test("[NostalgiaGfx] readWriteTileSheet" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NostalgiaGfxTest readWriteTileSheet)

View File

@ -12,7 +12,7 @@ target_include_directories(
target_link_libraries(
NostalgiaScene PUBLIC
NostalgiaCore
NostalgiaGfx
)
add_subdirectory(keel)

View File

@ -0,0 +1,12 @@
add_subdirectory(src)
if(NOT BUILDCORE_TARGET STREQUAL "gba")
add_subdirectory(test)
endif()
install(
DIRECTORY
include/nostalgia
DESTINATION
include
)

View File

@ -0,0 +1,8 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once
namespace nostalgia::sound {
}

View File

@ -0,0 +1,27 @@
add_library(
NostalgiaSound
sound.cpp
)
target_include_directories(
NostalgiaSound PUBLIC
../include
)
target_link_libraries(
NostalgiaSound PUBLIC
Turbine
)
add_subdirectory(keel)
if(NOSTALGIA_BUILD_STUDIO)
add_subdirectory(studio)
endif()
install(
TARGETS
NostalgiaSound
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -0,0 +1,19 @@
add_library(
NostalgiaSound-Keel
keelmodule.cpp
typeconv.cpp
)
target_link_libraries(
NostalgiaSound-Keel PUBLIC
Keel
NostalgiaSound
)
install(
TARGETS
NostalgiaSound-Keel
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -0,0 +1,46 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <ox/model/model.hpp>
#include <keel/module.hpp>
#include "typeconv.hpp"
namespace nostalgia::sound {
static class: public keel::Module {
private:
public:
[[nodiscard]]
ox::String id() const noexcept override {
return ox::String{"net.drinkingtea.nostalgia.sound"};
}
[[nodiscard]]
ox::Vector<keel::TypeDescGenerator> types() const noexcept final {
return {
};
}
[[nodiscard]]
ox::Vector<keel::BaseConverter const*> converters() const noexcept final {
return {
};
}
[[nodiscard]]
ox::Vector<keel::PackTransform> packTransforms() const noexcept final {
return {
};
}
} const mod;
keel::Module const*keelModule() noexcept {
return &mod;
}
}

View File

@ -0,0 +1,9 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include "typeconv.hpp"
namespace nostalgia::sound {
}

View File

@ -0,0 +1,15 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once
#include <ox/std/def.hpp>
#include <keel/typeconv.hpp>
namespace nostalgia::sound {
// Type converters
}

View File

@ -0,0 +1,6 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
namespace nostalgia::sound {
}

View File

@ -0,0 +1,17 @@
add_library(
NostalgiaSound-Studio-ImGui
studiomodule.cpp
)
target_link_libraries(
NostalgiaSound-Studio-ImGui PUBLIC
NostalgiaSound
Studio
)
install(
TARGETS
NostalgiaSound-Studio-ImGui
LIBRARY DESTINATION
${NOSTALGIA_DIST_MODULE}
)

View File

@ -0,0 +1,27 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <ox/std/memory.hpp>
#include <studio/studio.hpp>
namespace nostalgia::gfx {
static class: public studio::Module {
ox::Vector<studio::EditorMaker> editors(studio::StudioContext&) const noexcept final {
return {
};
}
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(studio::StudioContext&) const noexcept final {
ox::Vector<ox::UniquePtr<studio::ItemMaker>> out;
return out;
}
} const mod;
const studio::Module *studioModule() noexcept {
return &mod;
}
}

View File

@ -0,0 +1,10 @@
add_executable(
NostalgiaSoundTest
tests.cpp
)
target_link_libraries(
NostalgiaSoundTest
NostalgiaSound
)

View File

@ -0,0 +1,26 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#undef NDEBUG
#include <map>
#include <ox/std/error.hpp>
#include <ox/mc/mc.hpp>
static std::map<ox::StringView, ox::Error(*)()> tests = {
};
int main(int argc, const char **argv) {
int retval = -1;
if (argc > 0) {
auto const args = ox::Span{argv, static_cast<size_t>(argc)};
auto const testName = ox::StringView(args[1]);
if (tests.find(testName) != tests.end()) {
retval = static_cast<int>(tests[testName]());
} else {
retval = 1;
}
}
return retval;
}