diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-01 21:22:30 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-01 21:22:30 +0200 |
commit | e0ea870fdfcfbe9e3f0e47215bb809d4353d88e2 (patch) | |
tree | 16f694c46ec4b76019187322da2bdd87906bf5ba /src/crepe/api | |
parent | 7230b630025886939c726e07eba1a0b35511f687 (diff) |
removed submodule and updating resource_manager
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/AudioSource.cpp | 2 | ||||
-rw-r--r-- | src/crepe/api/Audio_asset.cpp | 16 | ||||
-rw-r--r-- | src/crepe/api/Audio_asset.h | 18 | ||||
-rw-r--r-- | src/crepe/api/CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/crepe/api/Image_asset.h | 2 | ||||
-rw-r--r-- | src/crepe/api/map_asset.h | 2 | ||||
-rw-r--r-- | src/crepe/api/resource.h | 23 | ||||
-rw-r--r-- | src/crepe/api/resource_manager.cpp | 4 | ||||
-rw-r--r-- | src/crepe/api/resource_manager.h | 2 | ||||
-rw-r--r-- | src/crepe/api/spritesheet.h | 2 |
10 files changed, 17 insertions, 75 deletions
diff --git a/src/crepe/api/AudioSource.cpp b/src/crepe/api/AudioSource.cpp index 4d1b093..f0d708a 100644 --- a/src/crepe/api/AudioSource.cpp +++ b/src/crepe/api/AudioSource.cpp @@ -1,6 +1,6 @@ #include "AudioSource.h" -#include "../Sound.h" +#include "facade/Sound.h" #include <memory> using namespace crepe::api; diff --git a/src/crepe/api/Audio_asset.cpp b/src/crepe/api/Audio_asset.cpp deleted file mode 100644 index a9b04ed..0000000 --- a/src/crepe/api/Audio_asset.cpp +++ /dev/null @@ -1,16 +0,0 @@ - - - - -#include "Audio_asset.h" -#include <string> - - -using namespace crepe::api; - -Audio::Audio(const std::string& content){ - this->m_content = content; -} - -Audio::~Audio(){ -} diff --git a/src/crepe/api/Audio_asset.h b/src/crepe/api/Audio_asset.h deleted file mode 100644 index 0b8e48e..0000000 --- a/src/crepe/api/Audio_asset.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - - -#include "resource.h" -#include <string> - - -namespace crepe::api { - - -class Audio : public Resource { - -public: - Audio(const std::string&); - ~Audio(); - -}; -} diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index 4f3fada..2cf0bcc 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -1,18 +1,17 @@ target_sources(crepe PUBLIC - Image_asset.cpp - map_asset.cpp - Audio_asset.cpp - spritesheet.cpp - resource_manager.cpp + #Image_asset.cpp + #map_asset.cpp + #spritesheet.cpp + #resource_manager.cpp + Resource.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES - resource.h - Image_asset.h - map_asset.h - Audio_asset.h - spritesheet.h - resource_manager.h + Resource.h + #Image_asset.h + #map_asset.h + #spritesheet.h + #resource_manager.h Component.h AudioSource.h ) diff --git a/src/crepe/api/Image_asset.h b/src/crepe/api/Image_asset.h index 69549af..0a36b0b 100644 --- a/src/crepe/api/Image_asset.h +++ b/src/crepe/api/Image_asset.h @@ -2,7 +2,7 @@ -#include "resource.h" +#include "Resource.h" #include <string> namespace crepe::api { diff --git a/src/crepe/api/map_asset.h b/src/crepe/api/map_asset.h index a3b994f..a4f3df7 100644 --- a/src/crepe/api/map_asset.h +++ b/src/crepe/api/map_asset.h @@ -1,6 +1,6 @@ #pragma once -#include "resource.h" +#include "Resource.h" #include <string> diff --git a/src/crepe/api/resource.h b/src/crepe/api/resource.h deleted file mode 100644 index e6456f9..0000000 --- a/src/crepe/api/resource.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -#include <string> - -namespace crepe::api { - -class Resource{ - -public: - - virtual ~Resource() =default; - - const std::string& getContent() const{ - return this->m_content; - } - -protected: - std::string m_content; -}; - - -} diff --git a/src/crepe/api/resource_manager.cpp b/src/crepe/api/resource_manager.cpp index a5644ee..0ecdae5 100644 --- a/src/crepe/api/resource_manager.cpp +++ b/src/crepe/api/resource_manager.cpp @@ -6,9 +6,9 @@ using namespace crepe::api; -ResourceManager* ResourceManager::get_instance(){ +ResourceManager& ResourceManager::get_instance(){ static ResourceManager instance; - return &instance; + return instance; } diff --git a/src/crepe/api/resource_manager.h b/src/crepe/api/resource_manager.h index 1b91524..5b0e0e1 100644 --- a/src/crepe/api/resource_manager.h +++ b/src/crepe/api/resource_manager.h @@ -8,7 +8,7 @@ #include <utility> -#include "api/resource.h" +#include "Resource.h" #include "fabricator/resource_fabricator.h" diff --git a/src/crepe/api/spritesheet.h b/src/crepe/api/spritesheet.h index 7f49156..e7530c2 100644 --- a/src/crepe/api/spritesheet.h +++ b/src/crepe/api/spritesheet.h @@ -3,7 +3,7 @@ -#include "resource.h" +#include "Resource.h" #include <string> |