diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-05 14:24:39 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-05 14:24:39 +0200 |
commit | b99e38badb82c5cc79771a77c5f6ea180c67ee4f (patch) | |
tree | 9cc3381095363b8ee8e1ce19130345cc3a9bb375 | |
parent | 202a9ec288ded78771e1f7e4c711a7612b201b9d (diff) |
move Asset from crepe::api to crepe
-rw-r--r-- | src/crepe/Asset.cpp (renamed from src/crepe/api/Asset.cpp) | 2 | ||||
-rw-r--r-- | src/crepe/Asset.h (renamed from src/crepe/api/Asset.h) | 4 | ||||
-rw-r--r-- | src/crepe/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/crepe/Sound.cpp | 6 | ||||
-rw-r--r-- | src/crepe/Sound.h | 6 | ||||
-rw-r--r-- | src/crepe/api/CMakeLists.txt | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/crepe/api/Asset.cpp b/src/crepe/Asset.cpp index 92ee50e..15ddc27 100644 --- a/src/crepe/api/Asset.cpp +++ b/src/crepe/Asset.cpp @@ -2,7 +2,7 @@ #include "Asset.h" -using namespace crepe::api; +using namespace crepe; Asset::Asset(const std::string & src) { this->src = std::filesystem::canonical(src); diff --git a/src/crepe/api/Asset.h b/src/crepe/Asset.h index 259c696..736ba44 100644 --- a/src/crepe/api/Asset.h +++ b/src/crepe/Asset.h @@ -4,7 +4,7 @@ #include <iostream> #include <string> -namespace crepe::api { +namespace crepe { class Asset { public: @@ -21,4 +21,4 @@ private: std::ifstream file; }; -} // namespace crepe::api +} // namespace crepe diff --git a/src/crepe/CMakeLists.txt b/src/crepe/CMakeLists.txt index 3a60840..208ba1f 100644 --- a/src/crepe/CMakeLists.txt +++ b/src/crepe/CMakeLists.txt @@ -1,9 +1,11 @@ target_sources(crepe PUBLIC + Asset.cpp Sound.cpp SoundContext.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES + Asset.h Sound.h SoundContext.h ) diff --git a/src/crepe/Sound.cpp b/src/crepe/Sound.cpp index c6e87d5..73ad69c 100644 --- a/src/crepe/Sound.cpp +++ b/src/crepe/Sound.cpp @@ -5,17 +5,17 @@ using namespace crepe; -Sound::Sound(std::unique_ptr<api::Asset> res) { +Sound::Sound(std::unique_ptr<Asset> res) { dbg_trace(); this->load(std::move(res)); } Sound::Sound(const char * src) { dbg_trace(); - this->load(std::make_unique<api::Asset>(src)); + this->load(std::make_unique<Asset>(src)); } -void Sound::load(std::unique_ptr<api::Asset> res) { +void Sound::load(std::unique_ptr<Asset> res) { this->sample.load(res->canonical()); } diff --git a/src/crepe/Sound.h b/src/crepe/Sound.h index 339dd7c..1ac20a7 100644 --- a/src/crepe/Sound.h +++ b/src/crepe/Sound.h @@ -5,7 +5,7 @@ #include <memory> -#include "api/Asset.h" +#include "Asset.h" namespace crepe { @@ -66,10 +66,10 @@ public: public: Sound(const char * src); - Sound(std::unique_ptr<api::Asset> res); + Sound(std::unique_ptr<Asset> res); private: - void load(std::unique_ptr<api::Asset> res); + void load(std::unique_ptr<Asset> res); private: SoLoud::Wav sample; diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index 54c7fdc..9548594 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -1,11 +1,9 @@ target_sources(crepe PUBLIC # AudioSource.cpp - Asset.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES AudioSource.h Component.h - Asset.h ) |