diff --git a/Engine/Editor/Textures/Icons/icon_statemachine_alias_state.dds.vtmeta b/Engine/Editor/Textures/Icons/icon_statemachine_alias_state.dds.vtmeta new file mode 100644 index 000000000..8087f2d87 --- /dev/null +++ b/Engine/Editor/Textures/Icons/icon_statemachine_alias_state.dds.vtmeta @@ -0,0 +1,8 @@ +Metadata: + assetHandle: 14649156906707556343 + filePath: Editor/Textures/Icons/icon_statemachine_alias_state.dds + type: 16 + Dependencies: + [] + Properties: + {} \ No newline at end of file diff --git a/Engine/Editor/Textures/Icons/icon_statemachine_animation_state.dds.vtmeta b/Engine/Editor/Textures/Icons/icon_statemachine_animation_state.dds.vtmeta new file mode 100644 index 000000000..456ffe353 --- /dev/null +++ b/Engine/Editor/Textures/Icons/icon_statemachine_animation_state.dds.vtmeta @@ -0,0 +1,8 @@ +Metadata: + assetHandle: 1700358712748332125 + filePath: Editor/Textures/Icons/icon_statemachine_animation_state.dds + type: 16 + Dependencies: + [] + Properties: + {} \ No newline at end of file diff --git a/Engine/Launcher.exe b/Engine/Launcher.exe index 08d037f74..a5c25d5b6 100644 --- a/Engine/Launcher.exe +++ b/Engine/Launcher.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c93f087dd44a83598fca6acc33a15f24336f53716b7fc06507f717b7aa606371 -size 26640896 +oid sha256:11e3faff9878d7ba4d694d65b1a22213890fec3be27aee3128a3eb8fb4d49bf3 +size 26676736 diff --git a/Engine/Sandbox.exe b/Engine/Sandbox.exe index ac296dcd3..5a2eca40c 100644 --- a/Engine/Sandbox.exe +++ b/Engine/Sandbox.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:277b4eda0a027174ff4e3cd945ee9534f511da9b98cc375fab837f7203b635ca -size 43632640 +oid sha256:28140a5c89c8b3a851edcb349a0f522f98693fae36ca4ab375a6f1d7c78bc164 +size 43717632 diff --git a/Engine/Templates/Project/Project.vtproj b/Engine/Templates/Project/Project.vtproj index 48279572f..6ce203b04 100644 --- a/Engine/Templates/Project/Project.vtproj +++ b/Engine/Templates/Project/Project.vtproj @@ -1,5 +1,5 @@ Project: - EngineVersion: 0.1.2 + EngineVersion: 0.1.4 Name: Project CompanyName: None AssetsDirectory: Assets diff --git a/SideProjects/VoltLauncher/App/Data.yaml b/SideProjects/VoltLauncher/App/Data.yaml deleted file mode 100644 index bb426f1e0..000000000 --- a/SideProjects/VoltLauncher/App/Data.yaml +++ /dev/null @@ -1,5 +0,0 @@ -Data: - engineDirectory: C:\Programming\Volt\Engine - Projects: - - name: My Project - path: C:\Users\xXRag\Documents\Volt Projects\My Project\Project.vtproj \ No newline at end of file diff --git a/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/FileSystem.cpp b/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/FileSystem.cpp index bd25ae071..22c4c1243 100644 --- a/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/FileSystem.cpp +++ b/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/FileSystem.cpp @@ -122,7 +122,11 @@ bool FileSystem::SetRegistryValue(const std::string& key, const std::string& val void FileSystem::StartProcess(const std::filesystem::path& processName, const std::wstring& commandLine) { - DWORD exitCode = 0; + std::wstring processDir = processName.parent_path().wstring(); + std::wstring tempProcessName = processName.wstring(); + tempProcessName.insert(tempProcessName.begin(), '\"'); + tempProcessName.push_back('\"'); + SHELLEXECUTEINFO ShExecInfo = { 0 }; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; @@ -130,7 +134,7 @@ void FileSystem::StartProcess(const std::filesystem::path& processName, const st ShExecInfo.lpVerb = L"open"; ShExecInfo.lpFile = processName.c_str(); ShExecInfo.lpParameters = commandLine.c_str(); - ShExecInfo.lpDirectory = processName.parent_path().c_str(); + ShExecInfo.lpDirectory = processDir.c_str(); ShExecInfo.nShow = SW_SHOW; ShExecInfo.hInstApp = NULL; ShellExecuteEx(&ShExecInfo); @@ -164,8 +168,24 @@ bool FileSystem::ShowDirectoryInExplorer(const std::filesystem::path& aPath) return false; } - ShellExecute(nullptr, L"explorer", absolutePath.c_str(), nullptr, nullptr, SW_SHOWNORMAL); - return true; + bool succeded = false; + + HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + if (SUCCEEDED(hr)) + { + ITEMIDLIST* pidl = ILCreateFromPath(absolutePath.c_str()); + if (pidl) + { + hr = SHOpenFolderAndSelectItems(pidl, 0, nullptr, 0); + + succeded = SUCCEEDED(hr); + + ILFree(pidl); + } + } + + CoUninitialize(); + return succeded; } std::filesystem::path FileSystem::PickFolderDialogue() diff --git a/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/LauncherLayer.cpp b/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/LauncherLayer.cpp index 5c2058fa0..bf08ac3a4 100644 --- a/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/LauncherLayer.cpp +++ b/SideProjects/VoltLauncher/VoltLauncher/src/Launcher/LauncherLayer.cpp @@ -241,8 +241,8 @@ void LauncherLayer::UI_DrawAboutModal() Walnut::UI::ShiftCursorX(20.0f); ImGui::BeginGroup(); - ImGui::Text("Walnut application framework"); - ImGui::Text("by Studio Cherno."); + ImGui::Text("Volt Launcher"); + ImGui::Text("by Volt."); ImGui::EndGroup(); if (Walnut::UI::ButtonCentered("Close")) @@ -406,7 +406,11 @@ void LauncherLayer::UI_DrawProjectsContent() if (ImGui::ImageButton(m_editIcon->GetDescriptorSet(), { 32, 32 })) { - FileSystem::StartProcess(m_data.engineInfo.engineDirectory / "Sandbox.exe", project.path.wstring()); + std::wstring tempProjectPath = project.path.wstring(); + tempProjectPath.push_back('"'); + tempProjectPath.insert(tempProjectPath.begin(), '"'); + + FileSystem::StartProcess(m_data.engineInfo.engineDirectory / "Sandbox.exe", tempProjectPath); } ImGui::SameLine(); @@ -498,7 +502,7 @@ void LauncherLayer::UI_DrawEnginesContent() if (ImGui::Button("Add")) { - const std::string url = "https://github.com/ChunkTreasure1/Volt/releases/download/v0.1.2/Volt.zip"; + const std::string url = "https://github.com/ChunkTreasure1/Volt/releases/latest/download/Volt.zip"; g_installProgress = 0.f; m_isInstalling = true; diff --git a/Volt/Sandbox/src/Sandbox/Modals/ConvertToWorldEngineModal.cpp b/Volt/Sandbox/src/Sandbox/Modals/ConvertToWorldEngineModal.cpp index 9911f94ba..deee97d6a 100644 --- a/Volt/Sandbox/src/Sandbox/Modals/ConvertToWorldEngineModal.cpp +++ b/Volt/Sandbox/src/Sandbox/Modals/ConvertToWorldEngineModal.cpp @@ -39,7 +39,10 @@ void ConvertToWorldEngineModal::DrawModalContent() } } - Volt::AssetManager::SaveAsset(m_scene.GetSharedPtr()); + if (Volt::AssetManager::ExistsInRegistry(m_scene->handle)) + { + Volt::AssetManager::SaveAsset(m_scene.GetSharedPtr()); + } Close(); } diff --git a/Volt/Sandbox/src/Sandbox/Window/SceneSettingsPanel.cpp b/Volt/Sandbox/src/Sandbox/Window/SceneSettingsPanel.cpp index 3ac241ea6..e828b5493 100644 --- a/Volt/Sandbox/src/Sandbox/Window/SceneSettingsPanel.cpp +++ b/Volt/Sandbox/src/Sandbox/Window/SceneSettingsPanel.cpp @@ -19,7 +19,7 @@ void SceneSettingsPanel::UpdateMainContent() if (UI::BeginProperties("sceneSettings")) { - if (UI::Property("Use World Engine", sceneSettings.useWorldEngine)) + if (UI::Property("Use World Engine", sceneSettings.useWorldEngine) && sceneSettings.useWorldEngine) { ModalSystem::GetModal(m_convertionModal).SetCurrentScene(m_editorScene); ModalSystem::GetModal(m_convertionModal).Open(); diff --git a/Volt/Volt/src/Volt/Core/Base.h b/Volt/Volt/src/Volt/Core/Base.h index 929fa54be..f6dcf46f7 100644 --- a/Volt/Volt/src/Volt/Core/Base.h +++ b/Volt/Volt/src/Volt/Core/Base.h @@ -6,7 +6,7 @@ #include #include -#define VT_VERSION Version::Create(0, 1, 3) +#define VT_VERSION Version::Create(0, 1, 4) #define BIT(X) (1 << (X)) #define TO_NORMALIZEDRGB(r, g, b) glm::vec4{ r / 255.f, g / 255.f, b / 255.f, 1.f } diff --git a/Volt/Volt/src/Volt/Project/ProjectManager.cpp b/Volt/Volt/src/Volt/Project/ProjectManager.cpp index 2c15346f3..9ca6a5442 100644 --- a/Volt/Volt/src/Volt/Project/ProjectManager.cpp +++ b/Volt/Volt/src/Volt/Project/ProjectManager.cpp @@ -36,6 +36,7 @@ namespace Volt } } + VT_CORE_INFO("[ProjectManager]: Loading project {0}", projectPath); DeserializeProject(); m_currentEngineDirectory = std::filesystem::current_path(); diff --git a/Volt/Volt/src/Volt/Utility/FileSystem.cpp b/Volt/Volt/src/Volt/Utility/FileSystem.cpp index f88ffc5c1..327800a47 100644 --- a/Volt/Volt/src/Volt/Utility/FileSystem.cpp +++ b/Volt/Volt/src/Volt/Utility/FileSystem.cpp @@ -90,13 +90,29 @@ void FileSystem::MoveToRecycleBin(const std::filesystem::path& path) bool FileSystem::ShowDirectoryInExplorer(const std::filesystem::path& aPath) { auto absolutePath = std::filesystem::canonical(aPath); - if (!Exists(absolutePath)) + if (!std::filesystem::exists(absolutePath)) { return false; } - ShellExecute(nullptr, L"explorer", absolutePath.c_str(), nullptr, nullptr, SW_SHOWNORMAL); - return true; + bool succeded = false; + + HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + if (SUCCEEDED(hr)) + { + PIDLIST_ABSOLUTE pidl = ILCreateFromPath(absolutePath.c_str()); + if (pidl) + { + hr = SHOpenFolderAndSelectItems(pidl, 0, nullptr, 0); + + succeded = SUCCEEDED(hr); + + ILFree(pidl); + } + } + + CoUninitialize(); + return succeded; } void FileSystem::Initialize() @@ -271,15 +287,20 @@ std::string FileSystem::GetCurrentUserName() void FileSystem::StartProcess(const std::filesystem::path& processPath) { - STARTUPINFO si; - PROCESS_INFORMATION pi; - - ZeroMemory(&si, sizeof(STARTUPINFO)); - ZeroMemory(&pi, sizeof(PROCESS_INFORMATION)); - - si.cb = sizeof(STARTUPINFO); - - CreateProcess(processPath.wstring().c_str(), nullptr, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi); - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); + std::wstring processDir = processPath.parent_path().wstring(); + std::wstring tempProcessName = processPath.wstring(); + tempProcessName.insert(tempProcessName.begin(), '\"'); + tempProcessName.push_back('\"'); + + SHELLEXECUTEINFO ShExecInfo = { 0 }; + ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); + ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; + ShExecInfo.hwnd = NULL; + ShExecInfo.lpVerb = L"open"; + ShExecInfo.lpFile = tempProcessName.c_str(); + ShExecInfo.lpParameters = L""; + ShExecInfo.lpDirectory = processDir.c_str(); + ShExecInfo.nShow = SW_SHOW; + ShExecInfo.hInstApp = NULL; + ShellExecuteEx(&ShExecInfo); }