Squashed 'deps/nostalgia/' changes from 2a8e3c2d..26fc5565
26fc5565 [nostalgia/gfx] Make dangling reference warning suppressions check for GCC 13 388541ce [nostalgia/player] Cleanup 6c194667 [nostalgia] Fix NostalgiaGfx lib name, stub out sound package 62d0579f [ox/fs] Restructure stat error handling to make easier to debug 202595b2 [keel] Fix loading assets by path cb21ff3f Merge commit 'a6b9657268eb3fe139b0c22df27c2cb2efc0013c' 8459d3ba Merge commit 'c42adc290cd8a27d01bb6d9877032dd2c963a4b7' 8d04af69 Merge commit 'ab760b064fd6a302bad13274e0e02b2b2c957b67' 6c34198f Merge commit '897a59cdad66e593fd45eece9414d8414fa7f1ae' f63c5816 [studio] Add filepickerpopup.hpp to studio.hpp git-subtree-dir: deps/nostalgia git-subtree-split: 26fc5565e86e09c6c51a615683fd9003816a24ac
This commit is contained in:
12
src/nostalgia/modules/sound/CMakeLists.txt
Normal file
12
src/nostalgia/modules/sound/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT BUILDCORE_TARGET STREQUAL "gba")
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
include/nostalgia
|
||||
DESTINATION
|
||||
include
|
||||
)
|
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace nostalgia::sound {
|
||||
}
|
27
src/nostalgia/modules/sound/src/CMakeLists.txt
Normal file
27
src/nostalgia/modules/sound/src/CMakeLists.txt
Normal 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
|
||||
)
|
19
src/nostalgia/modules/sound/src/keel/CMakeLists.txt
Normal file
19
src/nostalgia/modules/sound/src/keel/CMakeLists.txt
Normal 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
|
||||
)
|
46
src/nostalgia/modules/sound/src/keel/keelmodule.cpp
Normal file
46
src/nostalgia/modules/sound/src/keel/keelmodule.cpp
Normal 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;
|
||||
}
|
||||
|
||||
}
|
9
src/nostalgia/modules/sound/src/keel/typeconv.cpp
Normal file
9
src/nostalgia/modules/sound/src/keel/typeconv.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include "typeconv.hpp"
|
||||
|
||||
namespace nostalgia::sound {
|
||||
|
||||
}
|
15
src/nostalgia/modules/sound/src/keel/typeconv.hpp
Normal file
15
src/nostalgia/modules/sound/src/keel/typeconv.hpp
Normal 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
|
||||
|
||||
}
|
6
src/nostalgia/modules/sound/src/sound.cpp
Normal file
6
src/nostalgia/modules/sound/src/sound.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
namespace nostalgia::sound {
|
||||
}
|
17
src/nostalgia/modules/sound/src/studio/CMakeLists.txt
Normal file
17
src/nostalgia/modules/sound/src/studio/CMakeLists.txt
Normal 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}
|
||||
)
|
27
src/nostalgia/modules/sound/src/studio/studiomodule.cpp
Normal file
27
src/nostalgia/modules/sound/src/studio/studiomodule.cpp
Normal 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;
|
||||
}
|
||||
|
||||
}
|
10
src/nostalgia/modules/sound/test/CMakeLists.txt
Normal file
10
src/nostalgia/modules/sound/test/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
add_executable(
|
||||
NostalgiaSoundTest
|
||||
tests.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaSoundTest
|
||||
NostalgiaSound
|
||||
)
|
||||
|
26
src/nostalgia/modules/sound/test/tests.cpp
Normal file
26
src/nostalgia/modules/sound/test/tests.cpp
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user