diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp index b15a3fc87..008cac410 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -138,7 +138,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색 - if (iPos != std::string::npos) + if (iPos != string::npos) { strExt += strEffectPath.substr(iPos + 1); strEffectName = strEffectPath.substr(0, iPos); @@ -146,7 +146,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색 - if (pos != std::string::npos) + if (pos != string::npos) strEffectName = strEffectName.substr(pos + 1); if (!strcmp(strExt.c_str(), "trail")) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 54130a091..e8a72f18e 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -332,8 +332,8 @@ HRESULT CLevel_GamePlay::Ready_Background() #endif // #ifdef 기무리 isReady_Background = true; - isReady_Hogsmeade = false; - isReady_Hogwart = false; + isReady_Hogsmeade = true; + isReady_Hogwart = true; #endif // #ifdef 인혁 isReady_Background = false; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index de1e898aa..2c3853ebd 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -372,8 +372,8 @@ HRESULT CLoader::Loading_For_GamePlay() #endif // #ifdef 기무리 isLoad_Background = true; - isLoad_Hogwart = false; - isLoad_UI_SEQUANTIAL = false; + isLoad_Hogwart = true; + isLoad_UI_SEQUANTIAL = true; isLoad_NPC = true; isLoad_Monster = true; #endif // @@ -1238,6 +1238,7 @@ HRESULT CLoader::Loading_For_GamePlay() #pragma region UI_ANI if (true == isLoad_UI_SEQUANTIAL) { + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) { diff --git a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp index 5cfaea21f..368b0985e 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp @@ -298,9 +298,9 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Door::Free() { - if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); - } + //if (nullptr != m_pRigidBody) { + // m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); + //} __super::Free(); SAFE_RELEASE(m_pRigidBody); diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp index 796f6d80d..34d962179 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp @@ -107,7 +107,7 @@ HRESULT CEffect_Container::Load_Directory(const _char* pPath) size_t iPos = {}; _string strFilePath = szFilePath; - while ((iPos = strFilePath.find(".trail")) != std::string::npos) { + while ((iPos = strFilePath.find(".trail")) != string::npos) { strFilePath.erase(iPos, 6); }; @@ -149,7 +149,7 @@ HRESULT CEffect_Container::Load_Directory(const _char* pPath) size_t iPos = {}; _string strFilePath = szFilePath; - while ((iPos = strFilePath.find(".bin")) != std::string::npos) { + while ((iPos = strFilePath.find(".bin")) != string::npos) { strFilePath.erase(iPos, 4); }; @@ -227,7 +227,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색 - if (iPos != std::string::npos) + if (iPos != string::npos) { strExt += strEffectPath.substr(iPos + 1); strEffectName = strEffectPath.substr(0, iPos); @@ -235,7 +235,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색 - if (pos != std::string::npos) + if (pos != string::npos) strEffectName = strEffectName.substr(pos + 1); if (!strcmp(strExt.c_str(), "trail")) @@ -255,7 +255,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) /*이펙트 로드 로드*/ size_t iPos = {}; - while ((iPos = strEffectPath.find(".trail")) != std::string::npos) { + while ((iPos = strEffectPath.find(".trail")) != string::npos) { strEffectPath.erase(iPos, 6); }; @@ -291,7 +291,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) size_t iPosition = {}; _string strFilePath = strEffectPath; - while ((iPosition = strFilePath.find(".bin")) != std::string::npos) { + while ((iPosition = strFilePath.find(".bin")) != string::npos) { strFilePath.erase(iPosition, 4); }; diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index dfadb0d07..fcad1f5b4 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -158,7 +158,7 @@ HRESULT CEffect_Editor::Packaging(const _char* pDirectoryPath) size_t pos = strDirectoryPath.rfind('/'); // 뒤에서부터 '/' 검색 - if (pos != std::string::npos) + if (pos != string::npos) strPerfectFilePath += strDirectoryPath.substr(pos + 1); strPerfectFilePath += ".bin"; @@ -281,7 +281,7 @@ HRESULT CEffect_Editor::ReSaveFile(const _char* pDirectoryPath) size_t iPos; - while ((iPos = strPath.find(ext)) != std::string::npos) { + while ((iPos = strPath.find(ext)) != string::npos) { strPath.erase(iPos, ext.length()); }; diff --git a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp index c433af4f4..c2a7be2fd 100644 --- a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp +++ b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp @@ -47,14 +47,14 @@ void CIMGUIUI::CanvaswstringTostring(vector& panelNames) wname.c_str(), (int)wname.size(), nullptr, 0, nullptr, nullptr); - std::string result(size, 0); + string result(size, 0); WideCharToMultiByte(CP_UTF8, 0, wname.c_str(), (int)wname.size(), &result[0], size, nullptr, nullptr); // 변환된 string 저장 - m_iCanvasNamestring.push_back(std::move(result)); + m_iCanvasNamestring.push_back(move(result)); } // vector 업데이트 @@ -64,7 +64,7 @@ void CIMGUIUI::CanvaswstringTostring(vector& panelNames) m_iCanvasCount = 999; } -void CIMGUIUI::PanelwstringTostring(vector& panelNames) +void CIMGUIUI::PanelwstringTostring(vector& panelNames) { m_iPanelNamestring.clear(); m_iPanelName.clear(); @@ -79,14 +79,14 @@ void CIMGUIUI::PanelwstringTostring(vector& panelNames) wname.c_str(), (int)wname.size(), nullptr, 0, nullptr, nullptr); - std::string result(size, 0); + string result(size, 0); WideCharToMultiByte(CP_UTF8, 0, wname.c_str(), (int)wname.size(), &result[0], size, nullptr, nullptr); // 변환된 string 저장 - m_iPanelNamestring.push_back(std::move(result)); + m_iPanelNamestring.push_back(move(result)); } // vector 업데이트 @@ -111,14 +111,14 @@ void CIMGUIUI::ElementwstringTostring(vector& panelNames) wname.c_str(), (int)wname.size(), nullptr, 0, nullptr, nullptr); - std::string result(size, 0); + string result(size, 0); WideCharToMultiByte(CP_UTF8, 0, wname.c_str(), (int)wname.size(), &result[0], size, nullptr, nullptr); // 변환된 string 저장 - m_pElementNamestring.push_back(std::move(result)); + m_pElementNamestring.push_back(move(result)); } // vector 업데이트 diff --git a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp index dca881033..1dde43fa0 100644 --- a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp @@ -14,8 +14,7 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath, } filesystem::path pathFile = pFilePath; const _wstring wstrKeyOriginal = pathFile.filename().wstring(); - - { // 브레이스 해제 금지 + { // 브레이스 해제 금지0 shared_lock sharedLock(m_smtxTexture); auto iter = m_Resources[iLevel].find(wstrKeyOriginal); @@ -28,22 +27,24 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath, SAFE_ADDREF(iter->second); return iter->second; } - else { #ifdef _DEBUG + else { lock_guard statisticsLock(m_mtxStatistics); m_mapCacheMiss[wstrKeyOriginal]++; -#endif // _DEBUG } +#endif // _DEBUG // sharedLock 소멸 - } // 브레이스 해제 금지 - + } // 브레이스 해제 금지0 +#ifdef USE_LOWTEXTURE + Replacer_SrcFilePath(pathFile); +#endif // USE_LOWTEXTURE ID3D11ShaderResourceView* pSRV = Load_SRV(pathFile); if (pSRV == nullptr){ return nullptr; } - { // 브레이스 해제 금지 + { // 브레이스 해제 금지1 unique_lock uniqueLock(m_smtxTexture); auto iter = m_Resources[iLevel].find(wstrKeyOriginal); @@ -57,7 +58,7 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath, m_Resources[iLevel].emplace(wstrKeyOriginal, pSRV); // sharedLock 소멸 - } // 브레이스 해제 금지 + } // 브레이스 해제 금지1 #ifdef _DEBUG ++m_iCount; @@ -122,6 +123,35 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const filesystem::path& pa return pSRV; } +HRESULT CResource_Manager::Replacer_SrcFilePath(filesystem::path& pathFile) +{ + if (true == pathFile.is_absolute()) { + + const std::filesystem::path inputRootPath = pathFile.root_path(); + const std::filesystem::path inputRelativePath = pathFile.relative_path(); + auto relativePathIterator = inputRelativePath.begin(); + if (relativePathIterator == inputRelativePath.end()){ + return E_FAIL; + } + else if ("MeshTable" != (*relativePathIterator).string()) { + return E_FAIL; + } + + ++relativePathIterator; + + std::filesystem::path outputPath = inputRootPath / "MeshTableTexture"; + for (; relativePathIterator != inputRelativePath.end(); ++relativePathIterator) + { + outputPath /= *relativePathIterator; + } + pathFile = outputPath; + } + else { + return E_FAIL; + } + return S_OK; +} + CResource_Manager* CResource_Manager::Create(ID3D11Device* pDevice, _uint iResourceCount, _uint iNumLevel) { CResource_Manager* pInstance = new CResource_Manager(pDevice); diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 0b13bccea..0d03a94a3 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -21,34 +21,47 @@ #define ASSERT_JINHO(expression) #define ASSERT_HYUNBIN(expression) #define ASSERT_INHYUK(expression) -#define OPTIONAL_TRUE_KEYINPUTGUICHECK +#define OPTIONAL_TRUE_KEYINPUTGUICHECK +#define USE_LOWTEXTURE +#ifndef _DEBUG +#undef USE_LOWTEXTURE +#endif // !_DEBUG + +#ifdef _DEBUG #ifdef 기무리 #undef ASSERT_NURI #define ASSERT_NURI(expression) assert(expression) +#define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false); +//#undef USE_LOWTEXTURE //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif 진우 #undef ASSERT_JINWOO #define ASSERT_JINWOO(expression) assert(expression) +#undef USE_LOWTEXTURE //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif gimch #undef ASSERT_JINHO #define ASSERT_JINHO(expression) assert(expression) +#undef USE_LOWTEXTURE #undef OPTIONAL_TRUE_KEYINPUTGUICHECK #define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif Bin #undef ASSERT_HYUNBIN #define ASSERT_HYUNBIN(expression) assert(expression) +#undef USE_LOWTEXTURE //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true #elif 인혁 #undef ASSERT_INHYUK #define ASSERT_INHYUK(expression) assert(expression) +#undef USE_LOWTEXTURE //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true #endif +#endif // _DEBUG #pragma endregion diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index d1d36466f..ae82cd7ac 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -148,7 +148,7 @@ class ENGINE_DLL CModel final : public CComponent HRESULT Ready_Bones(const aiNode* pAINode, _int iParentIndex); // 바이너리 _bool SaveAssimpModel(const _char* filename); - _int SaveNodeRecursive(const aiNode* pAINode, std::vector& outNodes, _int parentIndex); + _int SaveNodeRecursive(const aiNode* pAINode, vector& outNodes, _int parentIndex); // #endif // EDITOR_PROJECT @@ -304,7 +304,7 @@ class ENGINE_DLL CModel final : public CComponent // 바이너리 HRESULT Ready_Meshes(); HRESULT Ready_Materials(const _char* pModelFilePath, _uint iLevel); - HRESULT Ready_Bones(const std::vector& allNodes, _int currentIndex, _int parentIndex); + HRESULT Ready_Bones(const vector& allNodes, _int currentIndex, _int parentIndex); HRESULT Ready_Animations(const vector& Bones); // diff --git a/Jusin154_Team3D/Engine/Public/Resource_Manager.h b/Jusin154_Team3D/Engine/Public/Resource_Manager.h index 87d71298a..c8ca6fe9d 100644 --- a/Jusin154_Team3D/Engine/Public/Resource_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Resource_Manager.h @@ -21,6 +21,7 @@ class CResource_Manager final : public CBase private: HRESULT Initialize(_uint iResourceCount, _uint iNumLevel); ID3D11ShaderResourceView* Load_SRV(const filesystem::path& pathFile); + HRESULT Replacer_SrcFilePath(filesystem::path& pathFile); private: #ifdef _DEBUG