diff --git a/TempScriptsFolder/AIPrototype.cs b/Assets/Scripts/AIPrototype.cs similarity index 100% rename from TempScriptsFolder/AIPrototype.cs rename to Assets/Scripts/AIPrototype.cs diff --git a/TempScriptsFolder/CameraControl.cs b/Assets/Scripts/CameraControl.cs similarity index 100% rename from TempScriptsFolder/CameraControl.cs rename to Assets/Scripts/CameraControl.cs diff --git a/TempScriptsFolder/CameraFix.cs b/Assets/Scripts/CameraFix.cs similarity index 100% rename from TempScriptsFolder/CameraFix.cs rename to Assets/Scripts/CameraFix.cs diff --git a/TempScriptsFolder/Item.cs b/Assets/Scripts/Item.cs similarity index 100% rename from TempScriptsFolder/Item.cs rename to Assets/Scripts/Item.cs diff --git a/TempScriptsFolder/PhysicsTest.cs b/Assets/Scripts/PhysicsTest.cs similarity index 100% rename from TempScriptsFolder/PhysicsTest.cs rename to Assets/Scripts/PhysicsTest.cs diff --git a/TempScriptsFolder/PickAndThrow.cs b/Assets/Scripts/PickAndThrow.cs similarity index 100% rename from TempScriptsFolder/PickAndThrow.cs rename to Assets/Scripts/PickAndThrow.cs diff --git a/TempScriptsFolder/PlayerController.cs b/Assets/Scripts/PlayerController.cs similarity index 100% rename from TempScriptsFolder/PlayerController.cs rename to Assets/Scripts/PlayerController.cs diff --git a/TempScriptsFolder/PrintWhenActive.cs b/Assets/Scripts/PrintWhenActive.cs similarity index 100% rename from TempScriptsFolder/PrintWhenActive.cs rename to Assets/Scripts/PrintWhenActive.cs diff --git a/TempScriptsFolder/RaccoonShowcase.cs b/Assets/Scripts/RaccoonShowcase.cs similarity index 100% rename from TempScriptsFolder/RaccoonShowcase.cs rename to Assets/Scripts/RaccoonShowcase.cs diff --git a/TempScriptsFolder/RaccoonSpin.cs b/Assets/Scripts/RaccoonSpin.cs similarity index 100% rename from TempScriptsFolder/RaccoonSpin.cs rename to Assets/Scripts/RaccoonSpin.cs diff --git a/TempScriptsFolder/ThirdPersonCamera.cs b/Assets/Scripts/ThirdPersonCamera.cs similarity index 100% rename from TempScriptsFolder/ThirdPersonCamera.cs rename to Assets/Scripts/ThirdPersonCamera.cs diff --git a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp index c3c7ef03..c913030b 100644 --- a/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp +++ b/SHADE_Engine/src/AudioSystem/SHAudioSystem.cpp @@ -17,6 +17,8 @@ #include #include +const std::string AUDIO_FOLDER_PATH{ std::string(ASSET_ROOT)+ "/Audio/" }; + namespace SHADE { SHAudioSystem::SHAudioSystem() @@ -79,10 +81,10 @@ namespace SHADE //SHResourceManager::LoadAllAudio(system, soundList); - LoadBank("../../Assets/Audio/Master.bank"); - LoadBank("../../Assets/Audio/Master.strings.bank"); - //LoadBank("../../Assets/Audio/Music.bank"); - LoadBank("../../Assets/Audio/footsteps.bank"); + LoadBank((AUDIO_FOLDER_PATH + "Master.bank").data()); + LoadBank((AUDIO_FOLDER_PATH + "Master.strings.bank").data()); + //LoadBank((AUDIO_FOLDER_PATH + "Music.bank").data()); + LoadBank((AUDIO_FOLDER_PATH + "footsteps.bank").data()); //auto clip = CreateAudioClip("event:/Characters/sfx_footsteps_human"); //clip->Play(); diff --git a/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp b/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp index c18f0c8c..cfb36cd0 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/MenuBar/SHEditorMenuBar.cpp @@ -24,6 +24,9 @@ #include "Serialization/SHSerialization.h" #include "Serialization/Configurations/SHConfigurationManager.h" + +const std::string LAYOUT_FOLDER_PATH{ std::string(ASSET_ROOT) + "/Editor/Layouts" }; + namespace SHADE { constexpr ImGuiWindowFlags editorMenuBarFlags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | @@ -43,8 +46,7 @@ namespace SHADE void SHEditorMenuBar::Init() { SHEditorWindow::Init(); - constexpr std::string_view path = "../../Assets/Editor/Layouts"; - for(auto const& entry : std::filesystem::directory_iterator(path)) + for(auto const& entry : std::filesystem::directory_iterator(LAYOUT_FOLDER_PATH)) { layoutPaths.push_back(entry.path()); } diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index 19d147e6..c4ad3459 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -65,6 +65,10 @@ RTTR_REGISTRATION ); } +const std::string USER_LAYOUT_PATH{ std::string(ASSET_ROOT) + "/Editor/Layouts/UserLayout.ini" }; +const std::string DEFAULT_LAYOUT_PATH{ std::string(ASSET_ROOT) + "/Editor/Layouts/Default.ini" }; +const std::string FONT_FOLDER_PATH{ std::string(ASSET_ROOT) + "/Editor/Fonts/"}; + namespace SHADE { @@ -106,7 +110,7 @@ namespace SHADE io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; //Enable for Multi-Viewports io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; //Enable docking - io->IniFilename = "../../Assets/Editor/Layouts/UserLayout.ini"; + io->IniFilename = USER_LAYOUT_PATH.data(); io->ConfigWindowsMoveFromTitleBarOnly = true; InitLayout(); @@ -236,20 +240,20 @@ namespace SHADE { if(!std::filesystem::exists(io->IniFilename)) { - std::filesystem::copy_file("../../Assets/Editor/Layouts/Default.ini", io->IniFilename); + std::filesystem::copy_file(DEFAULT_LAYOUT_PATH.data(), io->IniFilename); } //eventually load preferred layout here } void SHEditor::InitFonts() noexcept { - ImFont* mainFont = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/Segoe UI.ttf", 20.f);//TODO: Change to config based assets path + ImFont* mainFont = io->Fonts->AddFontFromFileTTF(std::string(FONT_FOLDER_PATH + "Segoe UI.ttf").data(), 20.f);//TODO: Change to config based assets path ImFontConfig icons_config{}; icons_config.MergeMode = true; icons_config.GlyphOffset.y = 5.f; constexpr ImWchar icon_ranges_fa[] = { ICON_MIN_FA, ICON_MAX_FA, 0 }; - ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/fa-solid-900.ttf", 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path + ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF(std::string(FONT_FOLDER_PATH + "fa-solid-900.ttf").data(), 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path constexpr ImWchar icon_ranges_md[] = { ICON_MIN_MD, ICON_MAX_16_MD, 0 }; - ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/MaterialIcons-Regular.ttf", 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path + ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF(std::string(FONT_FOLDER_PATH + "MaterialIcons-Regular.ttf").data(), 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path io->Fonts->Build(); } diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp index 827f45a2..4f3fbce6 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.cpp +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.cpp @@ -26,13 +26,15 @@ of DigiPen Institute of Technology is prohibited. #include "Events/SHEventManager.hpp" #include "Physics/SHPhysicsSystem.h" +#include "Assets/SHAssetMacros.h" + namespace SHADE { /*-----------------------------------------------------------------------------------*/ /* Static Definitions */ /*----------------------------------------------------------------------------------*/ const std::string SHScriptEngine::DEFAULT_CSHARP_NAMESPACE = std::string("SHADE"); - const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder"; + const std::string SHScriptEngine::CSPROJ_DIR = std::string(ASSET_ROOT) + "/Scripts"; const std::string SHScriptEngine::CSPROJ_PATH = std::string(CSPROJ_DIR) + "\\SHADE_Scripting.csproj"; /*-----------------------------------------------------------------------------------*/