diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 63bd5807c..160e6532e 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -937,9 +937,6 @@
02.GameObjects\Monster
-
- 02.GameObjects\Environment\00.MapContainer
-
02.GameObjects\Environment\00.MapContainer\BuildingContainer
diff --git a/Jusin154_Team3D/Client/Private/InstancedProp.cpp b/Jusin154_Team3D/Client/Private/InstancedProp.cpp
index 6a283284f..29f7ea3e8 100644
--- a/Jusin154_Team3D/Client/Private/InstancedProp.cpp
+++ b/Jusin154_Team3D/Client/Private/InstancedProp.cpp
@@ -124,9 +124,8 @@ HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath)
WorldMatrices.reserve(iNumWorldMatrix);
_float4x4 WorldMatrix = {};
- FileIn.read(reinterpret_cast(&WorldMatrix), sizeof(_float4x4));
- for (_uint i = 1; i < iNumWorldMatrix; ++i)
+ for (_uint i = 0; i < iNumWorldMatrix; ++i)
{
FileIn.read(reinterpret_cast(&WorldMatrix), sizeof(_float4x4));
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 60fe7b1ef..b669575bb 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -163,7 +163,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
/* 전체 맵 */
- //CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
+ CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
/* 조명 오브젝트 */
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
diff --git a/Jusin154_Team3D/Client/Private/Light_Main.cpp b/Jusin154_Team3D/Client/Private/Light_Main.cpp
index c3964fb26..0f747880e 100644
--- a/Jusin154_Team3D/Client/Private/Light_Main.cpp
+++ b/Jusin154_Team3D/Client/Private/Light_Main.cpp
@@ -38,11 +38,14 @@ void CLight_Main::Priority_Update(_float fTimeDelta)
void CLight_Main::Update(_float fTimeDelta)
{
+#ifdef _DEBUG
GUI::Begin("Main_Light");
#ifdef _DEBUG
m_pLightCom->Describe_Entity();
#endif // _DEBUG
GUI::End();
+#endif // _DEBUG
+
}
void CLight_Main::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index efd8cdf28..319634a25 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -483,6 +483,16 @@ HRESULT CLoader::Loading_For_GamePlay()
".bin", false
));
}
+ {/* Step and Stair */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/GroundSurfaces",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/GroundSurfaces",
+ ".bin", false
+ ));
+ }
}
#pragma endregion
diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp
index 470c89dbb..013927b3b 100644
--- a/Jusin154_Team3D/Client/Private/MapInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp
@@ -79,8 +79,9 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
{
const _char* pName = {};
_uint iMapContainerType = {};
- Container->QueryStringAttribute("Name", &pName);
- Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
+ //Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
+
+ Container->FirstChildElement("MapContainerType")->QueryUnsignedAttribute("type", &iMapContainerType);
CMapContainer* pContainerObject = nullptr;
diff --git a/Jusin154_Team3D/Client/Private/Terrain.cpp b/Jusin154_Team3D/Client/Private/Terrain.cpp
index f4391d732..317a14d6e 100644
--- a/Jusin154_Team3D/Client/Private/Terrain.cpp
+++ b/Jusin154_Team3D/Client/Private/Terrain.cpp
@@ -59,9 +59,7 @@ void CTerrain::Update(_float fTimeDelta)
{
#ifdef _DEBUG
Describe_Entity();
-#endif // _DEBUG
-
-
+#endif // DEBUG
}
void CTerrain::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
index 543dc2c0d..386f62b61 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
@@ -3686,4 +3686,220 @@
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2
+ Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_High_Street_Stairs_A_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_High_Street_Stairs_B_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_High_Street_Stairs_A_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_High_Street_Stairs_B_COL
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogsmeade_HeightMap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogsmeade_HeightMap.bin
index 5ec6b1988..624d8db9d 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogsmeade_HeightMap.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogsmeade_HeightMap.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b2b804eb5741b33d1c0d6a48f186ebf616ed95ac5ae61555ef7cb1ee6c88ab08
+oid sha256:70a00e80f048ff149ec44044d738d5bbbbbc7e3d6adf4877de62ab209bc4dea2
size 1052676
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes/SM_HM_TeaShop_Windows.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes/SM_HM_TeaShop_Windows.bin
index 445d37d7a..de3e06751 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes/SM_HM_TeaShop_Windows.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes/SM_HM_TeaShop_Windows.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:540a2b31d15161825316d4010fc11f0b79878525bbebe3f18816661963effb61
+oid sha256:6a62e09c2098fd51f218caa7000b1e7b36050314d910efe79e9723f4bd218080
size 1822737
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 57b727dec..b0f57bd92 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -2316,7 +2316,7 @@ HRESULT CLoader::Loading_For_MapViewer()
///* BLDG_TeaShop */
/*if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
- ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
+ ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
return E_FAIL;
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
@@ -2433,10 +2433,21 @@ HRESULT CLoader::Loading_For_MapViewer()
/* Doors */
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors",
- ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
return E_FAIL;
+ /* Barrel */
+ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes",
+ ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ /* Step */
+ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces",
+ ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces",
+ ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
#pragma endregion
@@ -2773,6 +2784,23 @@ vector*> Contents(iLoadCount);
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
+ CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
+ {
+ Desc.eType = ACTOR::BOX;
+ Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
+ Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
+ Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
+ Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
+ Desc.fContactOffset = { 0.05f };
+ Desc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
+ Desc.fDensity = 10.f;
+ Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
+ Desc.eLockFlag = {};
+ Desc.vAutoDamping = { };
+ }
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Collider */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Collider"),
diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
index 6ba73587b..32621886f 100644
--- a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
@@ -50,6 +50,9 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg)
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
#endif // _DEBUG
+ m_vBoxSize = _float3(1.f, 1.f, 1.f);
+ m_pActor = static_cast(m_pRigidBody->Get_Actor());
+
return S_OK;
}
@@ -62,20 +65,21 @@ void CMapElement_Interactable::Priority_Update(_float fTimeDelta)
void CMapElement_Interactable::Update(_float fTimeDelta)
{
-}
-
-void CMapElement_Interactable::Late_Update(_float fTimeDelta)
-{
-#ifdef _DEBUG
if (m_bSelected)
{
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
m_pTransformCom->Set_Scale(m_vScale);
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
}
+}
+
+void CMapElement_Interactable::Late_Update(_float fTimeDelta)
+{
+#ifdef _DEBUG
+
#endif
- if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
+ if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
}
@@ -92,7 +96,7 @@ HRESULT CMapElement_Interactable::Render()
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
- if (m_bSelected)
+ if (m_bSelected && m_bUseSelectColor)
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
return E_FAIL;
@@ -111,6 +115,12 @@ HRESULT CMapElement_Interactable::Render()
}
}
+#ifdef _DEBUG
+ if (FAILED(m_pRigidBody->Render())) {
+ return E_FAIL;
+ }
+#endif // _DEBUG
+
return S_OK;
}
@@ -137,6 +147,17 @@ HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
reinterpret_cast(&m_pShaderCom))))
return E_FAIL;
+
+ ELEMENT_INTERACTABLE_DESC* pPhysXDummyDesc = static_cast(pArg);
+
+ // RIGID_BODY
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
+ return E_FAIL;
+ }
+
+
return S_OK;
}
@@ -187,9 +208,14 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
void CMapElement_Interactable::Free()
{
+ if (nullptr != m_pRigidBody) {
+ m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
+ }
__super::Free();
+ SAFE_RELEASE(m_pRigidBody);
SAFE_RELEASE(m_pShaderCom);
+
for (auto& pModel : m_pModelComs)
SAFE_RELEASE(pModel);
}
@@ -201,34 +227,82 @@ void CMapElement_Interactable::Describe_Entity()
if (nullptr == m_pGameInstance)
return;
+ PSX::PxVec3 vDir = PSX::PxVec3(0.f, 1.f, 0.f);
+
+ if (GUI::CollapsingHeader("Rigid Body"))
+ {
+ GUI::InputFloat("Power", &m_fPower);
+
+ if (GUI::Button("Move Test"))
+ {
+
+ m_pActor = static_cast(m_pRigidBody->Get_Actor());
+ if(nullptr != m_pActor)
+ {
+ m_pActor->wakeUp();
+ m_pActor->addForce(vDir * m_fPower * 100000.f, PSX::PxForceMode::eFORCE);
+ }
+ }
+ if (GUI::Button("OFF_Kinematic"))
+ {
+ m_pActor = static_cast(m_pRigidBody->Get_Actor());
+ if (nullptr != m_pActor)
+ m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
+ }
+ if (GUI::Button("ON_Kinematic"))
+ {
+ m_pActor = static_cast(m_pRigidBody->Get_Actor());
+ if (nullptr != m_pActor)
+ m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
+ }
+
+ if(GUI::InputFloat("Mass", &m_fMass))
+ m_pActor->setMass(m_fMass);
+
+ m_pRigidBody->Describe_Entity();
+
+
+ }
+
+
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
m_iLodIndex = max(0, m_iLodIndex);
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
+
+ GUI::Checkbox("Select Color ON / OFF", &m_bUseSelectColor);
+
GUI::Text("----- Transfrom ----");
- GUI::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
- GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
- GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
+ _float3 vMove = {};
+ GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
+ GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
+ GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
+
+ //m_pTransformCom->Move_Right(vMove.x);
+ //m_pTransformCom->Move_Up(vMove.y);
+ //m_pTransformCom->Move_Look(vMove.z);
+
+ //XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
- CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object();
- if (nullptr != pTerrain)
+ _float3 vPosition = {};
+ if (m_pGameInstance->isPicking(&vPosition))
{
- pTerrain->Get_Component()->Picking(pTerrain->Get_Component()->Get_XMWorldMatrix(), &m_vPosition);
+ memcpy(&m_vPosition, &vPosition, sizeof(_float3));
+ m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat3(&m_vPosition));
}
-
}
GUI::Text("----- Rotation ----");
- GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
- GUI::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
- GUI::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
+ GUI::InputFloat("X##Rotation", &m_vRotation.x, 1.f, 15.f);
+ GUI::InputFloat("Y##Rotation", &m_vRotation.y, 1.f, 15.f);
+ GUI::InputFloat("Z##Rotation", &m_vRotation.z, 1.f, 15.f);
GUI::Text("----- Scale ----");
- GUI::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
- GUI::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
- GUI::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
+ GUI::InputFloat("X##Scale", &m_vScale.x, 0.05f, 0.1f);
+ GUI::InputFloat("Y##Scale", &m_vScale.y, 0.05f, 0.1f);
+ GUI::InputFloat("Z##Scale", &m_vScale.z, 0.05f, 0.1f);
m_vScale.x = max(0.01f, m_vScale.x);
m_vScale.y = max(0.01f, m_vScale.y);
@@ -239,3 +313,55 @@ void CMapElement_Interactable::Describe_Entity()
m_bSelected = true;
}
+
+HRESULT CMapElement_Interactable::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
+{
+ tinyxml2::XMLElement* object = doc.NewElement("Object");
+ object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_INTERACT));
+ object->SetAttribute("ID", ENUM_CLASS(m_eInteractableID));
+ object->SetAttribute("Lod_Level", m_iLodIndex);
+ root->InsertEndChild(object);
+
+#pragma region PROTOTYPETAG
+ for (_uint i = 0; i < m_iLodIndex + 1; ++i)
+ {
+ tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
+ prototype->SetText(CMyTools::ToString(m_ModelPrototypeTags[i]).c_str());
+ object->InsertEndChild(prototype);
+ }
+#pragma endregion
+
+#pragma region TRANSFORM
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
+
+ _float3 vScale = m_pTransformCom->Get_Scale();
+
+ _float3 vRotation = {};
+ XMStoreFloat3(&vRotation, m_pTransformCom->Get_RollPitchYawVector());
+ vRotation.x = XMConvertToDegrees(vRotation.x);
+ vRotation.y = XMConvertToDegrees(vRotation.y);
+ vRotation.z = XMConvertToDegrees(vRotation.z);
+
+ tinyxml2::XMLElement* Position = doc.NewElement("Position");
+ Position->SetAttribute("x", vPosition.x);
+ Position->SetAttribute("y", vPosition.y);
+ Position->SetAttribute("z", vPosition.z);
+ object->InsertEndChild(Position);
+
+ tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
+ Scale->SetAttribute("x", vScale.x);
+ Scale->SetAttribute("y", vScale.y);
+ Scale->SetAttribute("z", vScale.z);
+ object->InsertEndChild(Scale);
+
+ tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
+ Rotation->SetAttribute("x", vRotation.x);
+ Rotation->SetAttribute("y", vRotation.y);
+ Rotation->SetAttribute("z", vRotation.z);
+ object->InsertEndChild(Rotation);
+#pragma endregion
+
+
+ return S_OK;
+}
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
index a78565a65..f1ca463d7 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
@@ -42,7 +42,7 @@ void CMapObject_Collision::Late_Update(_float fTimeDelta)
#endif
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
- if (m_pGameInstance->Key_Pressing(DIK_V)){
+ if (m_bVisible){
if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(reinterpret_cast<_float4*>(m_CombinedWorldMatrix.m[3])), m_pTransformCom->Get_Radius())) {
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
@@ -96,7 +96,7 @@ HRESULT CMapObject_Collision::Initialize_Prototype()
HRESULT CMapObject_Collision::Initialize(void* pArg)
{
m_iMaxLodLevel = 0;
-
+ m_bVisible = true;
MAPOBJECT_LOD_DESC* pDesc = static_cast(pArg);
m_iMaxLodLevel = pDesc->iMaxLodLevel;
@@ -115,6 +115,7 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
#ifdef _DEBUG
m_bSelected = false;
+ m_bVisible = false;
m_vPosition = pDesc->vPosition;
m_vScale = pDesc->vScale;
m_vRotation = pDesc->vRotation;
@@ -233,20 +234,28 @@ void CMapObject_Collision::Describe_Entity()
//ImGui::Text(CMyTools::ToString(m_strModelPrototypeTag).c_str());
GUI::Checkbox("Visible", &m_bVisible);
+ _float3 vMove = {};
+
ImGui::Text("----- Transfrom ----");
- ImGui::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
- ImGui::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
- ImGui::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
+ ImGui::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
+ ImGui::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
+ ImGui::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
+
+ m_pTransformCom->Move_Right(vMove.x);
+ m_pTransformCom->Move_Up(vMove.y);
+ m_pTransformCom->Move_Look(vMove.z);
+
+ XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
- CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object();
- if (nullptr != pTerrain)
+ _float3 vPosition = {};
+ if (m_pGameInstance->isPicking(&vPosition))
{
- pTerrain->Get_Component()->Picking(pTerrain->Get_Component()->Get_XMWorldMatrix(), &m_vPosition);
+ memcpy(&m_vPosition, &vPosition, sizeof(_float3));
+ m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat3(&m_vPosition));
}
}
-
ImGui::Text("----- Rotation ----");
ImGui::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
ImGui::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 55431bee6..996723a33 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -58,7 +58,10 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
m_iContainerObjectIndex = 99;
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object();
- if (FAILED(Load_MapData("Map1129")))
+ if (FAILED(Load_MapData("Map1205")))
+ return E_FAIL;
+
+ if (FAILED(Load_LightObject("LightElement")))
return E_FAIL;
/*if (FAILED(Load_LightObject("LightElement")))
return E_FAIL;
@@ -409,7 +412,7 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
object->InsertEndChild(prototype);
}
-#pragma endregion
+#pragma endregion // PROTOTYPETAG
#pragma region TRANSFORM
_float3 vPosition = {};
@@ -440,11 +443,11 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
Rotation->SetAttribute("y", vRotation.y);
Rotation->SetAttribute("z", vRotation.z);
object->InsertEndChild(Rotation);
-#pragma endregion
+#pragma endregion // TRANSFORM
}
}
-#pragma endregion
+#pragma endregion // ELEMENT_INTERACTABEL
// ?ú?å
@@ -1184,8 +1187,6 @@ HRESULT CMapObject_Manager::Save_LightObject(const _char* pFileName)
tinyxml2::XMLElement* root = doc.NewElement("MapLightObjects");
doc.InsertEndChild(root);
-
-
if (nullptr != pLayer)
{
const list* pList = pLayer->Get_Objects();
@@ -1200,7 +1201,6 @@ HRESULT CMapObject_Manager::Save_LightObject(const _char* pFileName)
if (FAILED(pElement->Save_XML(doc, root)))
return E_FAIL;
}
-#pragma endregion
}
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
@@ -1302,6 +1302,101 @@ HRESULT CMapObject_Manager::Load_LightObject(const _char* pFileName)
return S_OK;
}
+HRESULT CMapObject_Manager::Save_InteractObject(const _char* pFileName)
+{
+ CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interactable"));
+
+ if (nullptr != pLayer)
+ return S_OK;
+
+ tinyxml2::XMLDocument doc;
+ string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
+
+ tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
+
+ doc.Clear();
+ doc.InsertFirstChild(doc.NewDeclaration());
+
+ tinyxml2::XMLElement* Element_Interactable = doc.NewElement("Element_Interactable");
+ doc.InsertEndChild(Element_Interactable);
+
+#pragma region ELEMENT_INTERACTABEL
+
+ if (nullptr != pLayer)
+ {
+ const list* pList = pLayer->Get_Objects();
+
+ for (auto pGamObject : *pList)
+ {
+ CMapElement* pElement = dynamic_cast(pGamObject);
+
+ if (nullptr == pElement)
+ return E_FAIL;
+
+ if (FAILED(pElement->Save_XML(doc, Element_Interactable)))
+ return E_FAIL;
+ }
+ }
+#pragma endregion // ELEMENT_INTERACTABEL
+
+ return S_OK;
+}
+HRESULT CMapObject_Manager::Load_InteractObject(const _char* pFileName)
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("MapLightObjects");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CMapElement_Interactable::ELEMENT_INTERACTABLE_DESC Desc = {};
+
+ /* Model Prototypes */
+ Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
+ Object->QueryUnsignedAttribute("Lod_Level", &Desc.iInteractableID);
+
+ string strTag = {};
+ for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
+ {
+ strTag = PrototypeTag->GetText();
+
+ Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
+ }
+
+ /* Transform */
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ auto* Scale = Object->FirstChildElement("Scale");
+ Scale->QueryFloatAttribute("x", &Desc.vScale.x);
+ Scale->QueryFloatAttribute("y", &Desc.vScale.y);
+ Scale->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ auto* Rotation = Object->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interactable"), &Desc)))
+ return E_FAIL;
+ }
+ MSG_BOX("Successed to Create Interactalbe Element");
+
+ return S_OK;
+}
void CMapObject_Manager::Update_PrototypeList()
{
GUI::Begin("Model Prototype List");
@@ -1594,6 +1689,7 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
{
MAPOBJECT_LOD_DESC Desc = {};
CMapElement_Light::MAPELEMENT_LIGHT_DESC Light_Desc = {};
+ CMapElement_Interactable::ELEMENT_INTERACTABLE_DESC Interactable_Desc = {};
vector<_wstring> PrototypeTags;
vector<_uint> LodModelIndices;
@@ -1607,13 +1703,13 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
PrototypeTags.push_back(strLodTag);
}
- Light_Desc.iMaxLodLevel = Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
- Light_Desc.ModelPrototypeTags = Desc.ModelPrototypeTags = PrototypeTags;
- Light_Desc.pParentTransform = Desc.pParentTransform = m_pTransformCom;
- Light_Desc.vPosition = Desc.vPosition = _float3(0.f, 0.f, 0.f);
- Light_Desc.vRotation = Desc.vRotation = _float3(0.f, 0.f, 0.f);
- Light_Desc.vScale = Desc.vScale = _float3(1.f, 1.f, 1.f);
- Light_Desc.pModelPathIndices =Desc.pModelPathIndices = &LodModelIndices;
+ Interactable_Desc.iMaxLodLevel = Light_Desc.iMaxLodLevel = Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
+ Interactable_Desc.ModelPrototypeTags = Light_Desc.ModelPrototypeTags = Desc.ModelPrototypeTags = PrototypeTags;
+ Interactable_Desc.pParentTransform = Light_Desc.pParentTransform = Desc.pParentTransform = m_pTransformCom;
+ Interactable_Desc.vPosition = Light_Desc.vPosition = Desc.vPosition = _float3(0.f, 0.f, 0.f);
+ Interactable_Desc.vRotation = Light_Desc.vRotation = Desc.vRotation = _float3(0.f, 0.f, 0.f);
+ Interactable_Desc.vScale = Light_Desc.vScale = Desc.vScale = _float3(1.f, 1.f, 1.f);
+ Interactable_Desc.pModelPathIndices = Light_Desc.pModelPathIndices =Desc.pModelPathIndices = &LodModelIndices;
if (ADD_TYPE::ELEMENT_STATIC == m_eType)
{
@@ -1621,6 +1717,8 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
}
else if (ADD_TYPE::ELEMENT_INTERACT == m_eType)
{
+ Interactable_Desc.iInteractableID = 0;
+
m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
}
else if (ADD_TYPE::ELEMENT_LIGHT == m_eType)
diff --git a/Jusin154_Team3D/Editor/Private/Terrain.cpp b/Jusin154_Team3D/Editor/Private/Terrain.cpp
index 9cb5a4222..a869ffdb1 100644
--- a/Jusin154_Team3D/Editor/Private/Terrain.cpp
+++ b/Jusin154_Team3D/Editor/Private/Terrain.cpp
@@ -86,9 +86,9 @@ void CTerrain::Priority_Update(_float fTimeDelta)
#pragma endregion
#pragma region HEIGHT MAP
- //HRESULT hr = {};
- //if(GUI::Button("Save HeightMap"))
- // hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap.bin");
+ HRESULT hr = {};
+ if(GUI::Button("Save HeightMap"))
+ hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap2.bin");
//if(GUI::Button("Load HeightMap"))
// hr = m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin");
#pragma endregion
diff --git a/Jusin154_Team3D/Editor/Public/Dummy_PhysXPlayable.h b/Jusin154_Team3D/Editor/Public/Dummy_PhysXPlayable.h
index 8bb90775e..753024292 100644
--- a/Jusin154_Team3D/Editor/Public/Dummy_PhysXPlayable.h
+++ b/Jusin154_Team3D/Editor/Public/Dummy_PhysXPlayable.h
@@ -1,4 +1,4 @@
-#pragma once
+ #pragma once
#include "Editor_Define.h"
#include "GameObject.h"
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 6e637b091..23c900d92 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -45,6 +45,8 @@ namespace Editor
};
enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END};
+
+ enum class ELEMENT_INTERACTABLE_ID {BARREL, END};
}
using namespace Editor;
diff --git a/Jusin154_Team3D/Editor/Public/MapElement_Interactable.h b/Jusin154_Team3D/Editor/Public/MapElement_Interactable.h
index fea0da680..9fe03d66e 100644
--- a/Jusin154_Team3D/Editor/Public/MapElement_Interactable.h
+++ b/Jusin154_Team3D/Editor/Public/MapElement_Interactable.h
@@ -1,12 +1,19 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "MapElement.h"
NS_BEGIN(Editor)
-class CMapElement_Interactable : public CMapElement
+class CMapElement_Interactable final : public CMapElement
{
+public:
+ typedef struct tagElement_Interactable_Desc : MAPOBJECT_LOD_DESC
+ {
+ _uint iInteractableID = {};
+ _uint iSubKind = {};
+ }ELEMENT_INTERACTABLE_DESC;
+
private:
CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CMapElement_Interactable(const CMapElement_Interactable& rhs);
@@ -19,7 +26,19 @@ class CMapElement_Interactable : public CMapElement
virtual HRESULT Render() override;
private:
- _uint m_iSaveIndex = {}; // ¿ø·¡ À§ġ ¹ƿö§ ÇʿäÇÑ À妽º
+ ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END};
+
+ CRigidBody* m_pRigidBody = { nullptr };
+ PSX::PxRigidDynamic* m_pActor = { nullptr };
+
+#ifdef _DEBUG
+ _bool m_bUseSelectColor = { true };
+
+ _float m_fPower = {};
+ _float m_fMass = {};
+ _float3 m_vBoxSize = {};
+#endif // _DEBUG
+
private:
virtual HRESULT Initialize_Prototype() override;
@@ -32,6 +51,7 @@ class CMapElement_Interactable : public CMapElement
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
+ virtual HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
index 586779c86..9f48ed6e1 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
@@ -64,6 +64,9 @@ class CMapObject_Manager final : public CGameObject
HRESULT Save_LightObject(const _char* pFileName);
HRESULT Load_LightObject(const _char* pFileName);
+
+ HRESULT Save_InteractObject(const _char* pFileName);
+ HRESULT Load_InteractObject(const _char* pFileName);
#pragma endregion
void Update_PrototypeList();
diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
index 4f0f2accf..a9bc1ea18 100644
--- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp
+++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
@@ -114,7 +114,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
return E_FAIL;
}
- m_pResource_Manager = CResource_Manager::Create(*ppDevice, 500);
+ m_pResource_Manager = CResource_Manager::Create(*ppDevice, 1000);
if (nullptr == m_pResource_Manager) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Engine/Private/Material.cpp b/Jusin154_Team3D/Engine/Private/Material.cpp
index 205ec83cb..a07fd6f60 100644
--- a/Jusin154_Team3D/Engine/Private/Material.cpp
+++ b/Jusin154_Team3D/Engine/Private/Material.cpp
@@ -83,7 +83,7 @@ HRESULT CMaterial::Initialize(const _char* pModelFilePath, const aiMaterial* pAI
if (FAILED(hr)) {
return E_FAIL;
}
- m_strPath[i].push_back(szSaveDir);
+ //m_strPath[i].push_back(szSaveDir);
m_SRVs[i].push_back(pSRV);
}
}
@@ -353,32 +353,6 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
strTexturePath = CMyTools::ToString(szTextureFilePath);
}
- //_string strPrefix = "C:";
- //_string strSearchString = "MeshTable";
- //_string strResultPath = {};
-
- //size_t mapRePos = strTexturePath.find(strSearchString);
-
- //if (mapRePos != std::string::npos)
- //{
- // size_t startPos = mapRePos + strSearchString.length();
-
- // // 'MapRe' 뒤에 오는 경로 건너뛰기
- // if (startPos < strTexturePath.length() &&
- // (strTexturePath[startPos] == '\\' || strTexturePath[startPos] == '/')) {
- // startPos++;
- // }
-
- // // 'MapRe' 이후의 나머지 경로를 추출
- // strResultPath = strTexturePath;//.substr(startPos);
- //}
- //else
- //{
- // MSG_BOX("FAILED to Find Path");
- //}
-
- //replace(strResultPath.begin(), strResultPath.end(), '\\', '/');
-
m_SaveMaterial.Path[ENUM_CLASS(eTexture)].push_back(strTexturePath);
m_SRVs[ENUM_CLASS(eTexture)].push_back(pSRV);
diff --git a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
index cab730328..29a6760f8 100644
--- a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
+++ b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
@@ -68,7 +68,7 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
HRESULT hr = {};
- hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV, 1024); // 일단 dds로 시도하고
+ hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV); // 일단 dds로 시도하고
if (FAILED(hr)) {
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
strcat_s(szTextureFilePath, szTextureFileName);
@@ -87,7 +87,9 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
return nullptr;
m_Resources.emplace(CMyTools::ToWstring(szFileName), pSRV);
+#ifdef _DEBUG
++m_iCount;
+#endif // _DEBUG
return pSRV;
}
diff --git a/Jusin154_Team3D/Engine/Private/Texture.cpp b/Jusin154_Team3D/Engine/Private/Texture.cpp
index f6070ff79..611e7278c 100644
--- a/Jusin154_Team3D/Engine/Private/Texture.cpp
+++ b/Jusin154_Team3D/Engine/Private/Texture.cpp
@@ -40,11 +40,13 @@ _uint CTexture::Get_Size()
{
return (_uint)m_SRVs.size();
}
-
+#ifdef EDITOR_PROJECT
_bool CTexture::Compare_GroupName(_wstring wstrGroupName)
{
return m_wstrPrototypeName == wstrGroupName;
}
+#endif // EDITOR_PROJECT
+
#ifdef _DEBUG
void CTexture::HoverName()
@@ -78,8 +80,10 @@ HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pT
default:
break;
}
-
+#ifdef EDITOR_PROJECT
m_wstrPrototypeName = wstrPrototypeName;
+#endif // EDITOR_PROJECT
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h
index 21b640eb4..a9d125084 100644
--- a/Jusin154_Team3D/Engine/Public/GameInstance.h
+++ b/Jusin154_Team3D/Engine/Public/GameInstance.h
@@ -278,11 +278,10 @@ class ENGINE_DLL CGameInstance final : public CBase
class CThreadHolder* m_pThreadHolder = { nullptr };
class CFog* m_pFog = { nullptr };
class CResource_Manager* m_pResource_Manager = { nullptr };
+
mt19937 m_Rng{ random_device{}() };
-
#ifdef _DEBUG
private:
-
_float m_fTimer_PriorityUpdate = { 0.f };
_float m_fTimer_Update = { 0.f };
_float m_fTimer_LateUpdate = { 0.f };
diff --git a/Jusin154_Team3D/Engine/Public/Material.h b/Jusin154_Team3D/Engine/Public/Material.h
index ab0c0678b..34b76519b 100644
--- a/Jusin154_Team3D/Engine/Public/Material.h
+++ b/Jusin154_Team3D/Engine/Public/Material.h
@@ -12,21 +12,24 @@ class ENGINE_DLL CMaterial final : public CBase
public:
HRESULT Bind_SRV(class CShader* pShader);
- SaveMaterial Get_SaveMaterial() { return m_SaveMaterial; }
+
private:
- class CGameInstance* m_pGameInstance = { nullptr };
- ID3D11Device* m_pDevice = { nullptr };
- ID3D11DeviceContext* m_pContext = { nullptr };
+ class CGameInstance* m_pGameInstance = { nullptr };
+ ID3D11Device* m_pDevice = { nullptr };
+ ID3D11DeviceContext* m_pContext = { nullptr };
vector m_SRVs[AI_TEXTURE_TYPE_MAX];
- SaveMaterial m_SaveMaterial;
+
#ifdef EDITOR_PROJECT
public:
+ SaveMaterial Get_SaveMaterial() { return m_SaveMaterial; }
+
static CMaterial* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, const aiMaterial* pAIMaterial);
static CMaterial* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pMaterialFilePath, const _char* pTextureFilePath);
private:
- vector m_strPath[AI_TEXTURE_TYPE_MAX];
+ SaveMaterial m_SaveMaterial;
+
HRESULT Initialize(const _char* pModelFilePath, const aiMaterial* pAIMaterial);
HRESULT Initialize(const _char* pMaterialFilePath, const _char* pTextureFilePath);
HRESULT Read_MaterialFile(const _char* pMaterialFilePath, const _char* pTextureFolderPath);
diff --git a/Jusin154_Team3D/Engine/Public/Resource_Manager.h b/Jusin154_Team3D/Engine/Public/Resource_Manager.h
index 485d71ce3..3b27f4892 100644
--- a/Jusin154_Team3D/Engine/Public/Resource_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Resource_Manager.h
@@ -20,7 +20,10 @@ class CResource_Manager final : public CBase
ID3D11ShaderResourceView* Load_SRV(const _char* pFilePath);
private:
+#ifdef _DEBUG
_uint m_iCount = {};
+#endif // DEBUG
+
ID3D11Device* m_pDevice = { nullptr };
unordered_map<_wstring, ID3D11ShaderResourceView*> m_Resources;
diff --git a/Jusin154_Team3D/Engine/Public/Texture.h b/Jusin154_Team3D/Engine/Public/Texture.h
index 07a5d1569..eb512a2b6 100644
--- a/Jusin154_Team3D/Engine/Public/Texture.h
+++ b/Jusin154_Team3D/Engine/Public/Texture.h
@@ -18,7 +18,9 @@ class ENGINE_DLL CTexture final :
vector* Get_Texture() { return &m_SRVs; }
ID3D11ShaderResourceView* Get_SRV(_uint iTextureIndex);
_uint Get_Size();
+#ifdef EDITOR_PROJECT
_bool Compare_GroupName(_wstring wstrGroupName);
+#endif //
#ifdef _DEBUG
void HoverName();