From 932b6b690d692c22f5318560e9fa10153c4a0591 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 12:15:20 +0900 Subject: [PATCH 01/22] [add] ReleasesPAtch --- .../Client/Private/CamPosition_Shoulder.cpp | 19 +- .../Client/Private/Camera_Debug.cpp | 3 + .../Client/Private/Camera_Gaze.cpp | 2 + Jusin154_Team3D/Client/Private/EffectPool.cpp | 15 -- .../Client/Private/Level_GamePlay.cpp | 13 +- .../Client/Private/MiniMap_Camera.cpp | 3 + .../Client/Private/NPC_Ollivander.cpp | 7 +- Jusin154_Team3D/Client/Public/Barral_Splesh.h | 3 + Jusin154_Team3D/Client/Public/Box_Splesh.h | 2 + .../Client/Public/CamPosition_Shoulder.h | 2 + Jusin154_Team3D/Client/Public/Chair_Splesh.h | 2 + Jusin154_Team3D/Client/Public/MageSide.h | 2 + .../Client/Public/Mage_Down_Attack.h | 2 + .../Client/Public/Mage_Nomal_Attack.h | 2 + Jusin154_Team3D/Client/Public/StunEffect.h | 2 + Jusin154_Team3D/Editor/Bin/AnimIndex.txt | 194 ++---------------- 16 files changed, 77 insertions(+), 196 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index d59ff7c5e..fd1dfeda2 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -43,6 +43,7 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg) m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos); m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos)); } + m_bDampingParentPos = false; return S_OK; } @@ -153,6 +154,15 @@ void CCamPosition_Shoulder::Late_Update(_float fTimeDelta) m_fFollowTargetIncludedAngleDegree = CMyTools::Lerp_f1D(m_vShoulderLerpDegree.x, m_vShoulderLerpDegree.y, fLerpRatio); } } + if (true == m_bStartGame) { + m_vStartLerpTimer.x += fTimeDelta; + if (m_vStartLerpTimer.x >= m_vStartLerpTimer.y) { + m_vStartLerpTimer.x = 0.f; + m_bDampingParentPos = true; + m_bStartGame = false; + } + m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); + } } HRESULT CCamPosition_Shoulder::Render() @@ -297,9 +307,11 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CCamPosition_Target::CAMERAPOSITION_TARGET_DESC Desc{}; Desc.pParentTransform = m_pTransformCom; m_pTarget_LookPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc); + m_pTarget_LookPart->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -10.4f, 1.f)); m_pTarget_FollowPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc); + m_pTarget_FollowPart->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f)); } - + CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{}; CameraDesc.fFovy = XMConvertToRadians(60.0f); CameraDesc.fNear = 0.1f; @@ -321,8 +333,11 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() { return E_FAIL; } + m_pGameInstance->Add_Camera(g_iStaticLevel, m_pBinded_Camera, CAMERA_SHOULDER); - + if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index 7fe2793d2..b5da3e13c 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -17,7 +17,10 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs) void CCamera_Debug::Priority_Update(_float fTimeDelta) { +#ifdef _DEBUG m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false); +#endif // _DEBUG + } void CCamera_Debug::Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index fff36f194..6dce3a592 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -127,6 +127,8 @@ HRESULT CCamera_Gaze::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) { return E_FAIL; } + m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_WorldPostion()); + m_pTransformCom->LookAt(m_pLookTarget->Get_WorldPostion()); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 2508cc975..09c1978b7 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -171,19 +171,6 @@ HRESULT CEffectPool::Bind_ShaderResources() HRESULT CEffectPool::Ready_Effect() { -#ifdef 기무리 - if (FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { - CNomalJap* pEffect = nullptr; - - pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); - - return pEffect; } - ))) return E_FAIL; - -#endif // 기무리 - - -#ifndef 기무리 if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CNomalJap* pEffect = nullptr; @@ -326,8 +313,6 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; -#endif // !기무리 - return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index a4fa92b76..055710513 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -260,14 +260,15 @@ HRESULT CLevel_GamePlay::Ready_Background() else { /* 전체 맵 */ - //CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); + CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); /* 물 오브젝트 */ - if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) + if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))){ return E_FAIL; + } /* 조명 오브젝트 */ - /*CInfoInstance::GetInstance()->Load_LightElements("LightElement");*/ + CInfoInstance::GetInstance()->Load_LightElements("LightElement"); /* 상호작용 오브젝트 */ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel"); @@ -437,6 +438,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Camera() { +#ifdef _DEBUG CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{}; Camera_Desc.fFovy = XMConvertToRadians(60.0f); Camera_Desc.fNear = 0.1f; @@ -461,6 +463,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() return E_FAIL; } +#endif // _DEBUG + + if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp index 071f397ac..620553ebd 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp @@ -93,7 +93,10 @@ void CMiniMap_Camera::Free() { __super::Free(); } +#ifdef _DEBUG void CMiniMap_Camera::Describe_Entity() { } + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index e28b231a6..c9b60c53b 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -25,7 +25,9 @@ void CNPC_Ollivander::Priority_Update(_float fTimeDelta) void CNPC_Ollivander::Update(_float fTimeDelta) { m_pFSM->Update_State(fTimeDelta); - + if (m_pModelCom->IsFinishedAnim()) { + m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); + } m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); __super::Update(fTimeDelta); #ifdef _DEBUG @@ -39,6 +41,7 @@ void CNPC_Ollivander::Late_Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, m_pTransformCom->Get_EstimatedPositionByMomentum()); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); __super::Late_Update(fTimeDelta); } @@ -137,7 +140,7 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) { return E_FAIL; } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f)); return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/Barral_Splesh.h b/Jusin154_Team3D/Client/Public/Barral_Splesh.h index 5967b2a22..29c699f3e 100644 --- a/Jusin154_Team3D/Client/Public/Barral_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Barral_Splesh.h @@ -36,7 +36,10 @@ class CBarral_Splesh final : public CEffect_Container static CBarral_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Box_Splesh.h b/Jusin154_Team3D/Client/Public/Box_Splesh.h index d165b109f..4c8c6b95a 100644 --- a/Jusin154_Team3D/Client/Public/Box_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Box_Splesh.h @@ -36,7 +36,9 @@ class CBox_Splesh final : public CEffect_Container static CBox_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h index 110c98dba..29ca69de3 100644 --- a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h +++ b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h @@ -48,11 +48,13 @@ class CCamPosition_Shoulder final : public CCamPosition _float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f }; #pragma endregion #pragma region Lerp + _bool m_bStartGame = { true }; _bool m_bDampingParentPos = { true }; _bool m_bShoulderLerp = { false }; _bool m_bRightShoulderActive = { true }; _float2 m_vShoulderLerpTimer = { 0.f, 0.30f }; _float2 m_vDampingLerpTimer = { 0.f, 0.10f }; + _float2 m_vStartLerpTimer = { 0.f, 0.30f }; _float2 m_vShoulderLerpDegree = { }; _float2 m_vShoulderLerpIncludedAngleDegree = { -20.f, 20.f }; diff --git a/Jusin154_Team3D/Client/Public/Chair_Splesh.h b/Jusin154_Team3D/Client/Public/Chair_Splesh.h index 23793a329..158ba8fd5 100644 --- a/Jusin154_Team3D/Client/Public/Chair_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Chair_Splesh.h @@ -36,7 +36,9 @@ class CChair_Splesh final : public CEffect_Container static CChair_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/MageSide.h b/Jusin154_Team3D/Client/Public/MageSide.h index 70b20f270..e14ec3870 100644 --- a/Jusin154_Team3D/Client/Public/MageSide.h +++ b/Jusin154_Team3D/Client/Public/MageSide.h @@ -44,7 +44,9 @@ class CMageSide final : public CEffect_Container static CMageSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h index 116acdc82..5730924ea 100644 --- a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h +++ b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h @@ -38,7 +38,9 @@ class CMage_Down_Attack final : public CEffect_Container static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h index 6716d924a..dd3b7fefa 100644 --- a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h +++ b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h @@ -48,7 +48,9 @@ class CMage_Nomal_Attack final : public CEffect_Container static CMage_Nomal_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/StunEffect.h b/Jusin154_Team3D/Client/Public/StunEffect.h index ed8f17034..a7dbb968a 100644 --- a/Jusin154_Team3D/Client/Public/StunEffect.h +++ b/Jusin154_Team3D/Client/Public/StunEffect.h @@ -38,7 +38,9 @@ class CStunEffect final : public CEffect_Container static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Editor/Bin/AnimIndex.txt b/Jusin154_Team3D/Editor/Bin/AnimIndex.txt index 409d38ad4..a4a8adbb4 100644 --- a/Jusin154_Team3D/Editor/Bin/AnimIndex.txt +++ b/Jusin154_Team3D/Editor/Bin/AnimIndex.txt @@ -1,174 +1,20 @@ -0 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_135_anm -1 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_180_anm -2 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_45_anm -3 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_90_anm -4 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_135_anm -5 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_180_anm -6 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_90_anm -7 Trl_BM_Alert_Look_2Cmbt_180L_anm -8 Trl_BM_Alert_Look_2Cmbt_180R_anm -9 Trl_BM_Alert_Look_2Cmbt_90L_anm -10 Trl_BM_Alert_Look_2Cmbt_90R_anm -11 Trl_BM_Alert_Look_2Cmbt_A_anm -12 Trl_BM_Alert_Look_2Cmbt_anm -13 Trl_BM_Alert_Look_2Cmbt_B_anm -14 Trl_BM_Alert_Look_2Cmbt_C_ClubSwing_anm -15 Trl_BM_Alert_Look_End_Fwd_anm -16 Trl_BM_Alert_Look_Loop_anm -17 Trl_BM_Alert_Look_Loop_v01_anm -18 Trl_BM_Alert_Look_Loop_v02_anm -19 Trl_BM_Alert_Look_Start_Fwd_anm -20 Trl_BM_Alert_Look_Turn_InPlace_A_anm -21 Trl_BM_Alert_Look_Turn_InPlace_B_anm -22 Trl_BM_Alert_Walk_Loop_Fwd_anm -23 Trl_BM_Alert_Walk_Loop_Fwd_End_anm -24 Trl_BM_Alert_Walk_Loop_Fwd_Start_anm -25 Trl_BM_Idle_01_Face_anm -26 Trl_BM_Idle_Break_01_anm -27 Trl_BM_Idle_Break_01_Face_anm -28 Trl_BM_Idle_Break_02_anm -29 Trl_BM_Idle_Break_02_Face_anm -30 Trl_BM_Idle_Break_03_anm -31 Trl_BM_Idle_Break_04_anm -32 Trl_BM_Lean_0_anm -33 Trl_BM_LF_Idle_anm -34 Trl_BM_LF_Walk_Turn_Start_Lft_135_anm -35 Trl_BM_LF_Walk_Turn_Start_Lft_180_anm -36 Trl_BM_LF_Walk_Turn_Start_Lft_45_anm -37 Trl_BM_LF_Walk_Turn_Start_Lft_90_anm -38 Trl_BM_LF_Walk_Turn_Start_Rht_135_anm -39 Trl_BM_LF_Walk_Turn_Start_Rht_180_anm -40 Trl_BM_LF_Walk_Turn_Start_Rht_45_anm -41 Trl_BM_LF_Walk_Turn_Start_Rht_90_anm -42 Trl_BM_Walk_Loop_Fwd_End_Wander_anm -43 Trl_BM_Walk_Loop_Fwd_Lft_45_Wander_anm -44 Trl_BM_Walk_Loop_Fwd_Rht_45_Wander_anm -45 Trl_BM_Walk_Loop_Fwd_Start_Wander_anm -46 Trl_BM_Walk_Loop_Fwd_Wander_anm -47 Trl_Cmbt_Atk_01_Face_anm -48 Trl_Cmbt_Atk_02_Face_anm -49 Trl_Cmbt_Atk_03_Face_anm -50 Trl_Cmbt_Atk_Charge_Check_anm -51 Trl_Cmbt_Atk_Charge_Knee_End_anm -52 Trl_Cmbt_Atk_Charge_Knee_Loop_anm -53 Trl_Cmbt_Atk_Charge_Knee_Start_anm -54 Trl_Cmbt_Atk_Charge_Loop_anm -55 Trl_Cmbt_Atk_Charge_Start_anm -56 Trl_Cmbt_Atk_Charge_Stop_RU_anm -57 Trl_Cmbt_Atk_Charge_Stop_Turn_Lft_anm -58 Trl_Cmbt_Atk_Charge_Stop_Turn_Rht_anm -59 Trl_Cmbt_Atk_Charge_Stumble_Fwd_anm -60 Trl_Cmbt_Atk_Charge_Stun_anm -61 Trl_Cmbt_Atk_Hop_Bckhnd_RU_anm -62 Trl_Cmbt_Atk_Hop_Forhnd_LU_anm -63 Trl_Cmbt_Atk_LF_Stomp_Bck_anm -64 Trl_Cmbt_Atk_LF_Stomp_Fwd_anm -65 Trl_Cmbt_Atk_LF_Stomp_Lft_anm -66 Trl_Cmbt_Atk_Overhead_Slam_anm -67 Trl_Cmbt_Atk_Overhead_Slam_BckHnd_anm -68 Trl_Cmbt_Atk_Overhead_Slam_Jog_anm -69 Trl_Cmbt_Atk_Overhead_Slam_Lft_180_anm -70 Trl_Cmbt_Atk_Overhead_Slam_Lft_90_anm -71 Trl_Cmbt_Atk_Overhead_Slam_Rht_180_anm -72 Trl_Cmbt_Atk_Overhead_Slam_Rht_90_anm -73 Trl_Cmbt_Atk_RF_Stomp_Rht_anm -74 Trl_cmbt_Atk_RockThrow_Fwd_anm -75 Trl_Cmbt_Atk_RockThrow_Lft_anm -76 Trl_Cmbt_Atk_RockThrow_Rht_anm -77 Trl_Cmbt_Atk_Rockthrow_Start_anm -78 Trl_Cmbt_Atk_StepBack_Swing_Fwd_anm -79 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_anm -80 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_Splt_anm -81 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_anm -82 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_Splt_anm -83 Trl_Cmbt_Atk_StepSwing_Lft_180_BckHnd_anm -84 Trl_Cmbt_Atk_StepSwing_Lft_90_BckHnd_anm -85 Trl_Cmbt_Atk_StepSwing_Rht_180_ForHnd_Splt_anm -86 Trl_Cmbt_Atk_StepSwing_Rht_90_ForHnd_anm -87 Trl_Cmbt_Atk_Swing_Fwd_anm -88 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_anm -89 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Jog_anm -90 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Splt_anm -91 Trl_Cmbt_Atk_Swing_Fwd_Jog_anm -92 Trl_Cmbt_Atk_Swing_Fwd_Splt_anm -93 Trl_Cmbt_Atk_Swing_Lft_anm -94 Trl_Cmbt_Atk_Swing_Rht_anm -95 Trl_Cmbt_Atk_Swipe_anm -96 Trl_Cmbt_Atk_Swipe_Lft_180_anm -97 Trl_Cmbt_Atk_Swipe_Lft_90_anm -98 Trl_Cmbt_Atk_Swipe_Rht_90_anm -99 Trl_Cmbt_Atk_Tantrum_01_anm -100 Trl_Cmbt_Atk_Tantrum_02_anm -101 Trl_Cmbt_Idle_01_anm -102 Trl_Cmbt_idle_01_Face_anm -103 Trl_Cmbt_Jog_Loop_Fwd_anm -104 Trl_Cmbt_Jog_Start_Fwd_anm -105 Trl_Cmbt_Jog_Turn_Start_Lft_135_anm -106 Trl_Cmbt_Jog_Turn_Start_Lft_180_anm -107 Trl_Cmbt_Jog_Turn_Start_Lft_45_anm -108 Trl_Cmbt_Jog_Turn_Start_Lft_90_anm -109 Trl_Cmbt_Jog_Turn_Start_Rht_135_anm -110 Trl_Cmbt_Jog_Turn_Start_Rht_180_anm -111 Trl_Cmbt_Jog_Turn_Start_Rht_45_anm -112 Trl_Cmbt_Jog_Turn_Start_Rht_90_anm -113 Trl_Cmbt_LF_Idle_Turn_Lft_135_anm -114 Trl_Cmbt_LF_Idle_Turn_Lft_180_anm -115 Trl_Cmbt_LF_Idle_Turn_Lft_45_anm -116 Trl_Cmbt_LF_Idle_Turn_Lft_90_anm -117 Trl_Cmbt_LF_Idle_Turn_Rht_135_anm -118 Trl_Cmbt_LF_Idle_Turn_Rht_180_anm -119 Trl_Cmbt_LF_Idle_Turn_Rht_45_anm -120 Trl_Cmbt_LF_Idle_Turn_Rht_90_anm -121 Trl_Cmbt_Look_Lft_anm -122 Trl_Cmbt_Look_Rht_anm -123 Trl_Cmbt_OverHead_Slam_Taunt_01_anm -124 Trl_Cmbt_OverHead_Slam_Taunt_02_anm -125 Trl_Cmbt_Rct_Death_01_Face_anm -126 Trl_Cmbt_Rct_Death_02_Face_anm -127 Trl_Cmbt_Rct_Flinch_Charge_anm -128 Trl_Cmbt_Rct_Hit_01_Face_anm -129 Trl_Cmbt_Rct_Hit_02_Face_anm -130 Trl_Cmbt_Rct_Hit_03_Face_anm -131 Trl_Cmbt_Rct_Mandrake_Loop_anm -132 Trl_Cmbt_Rct_Mandrake_Start_anm -133 Trl_Cmbt_Rct_Mandrake_Stop_anm -134 Trl_Cmbt_Roar_01_Face_anm -135 Trl_Cmbt_Roar_02_Face_anm -136 Trl_Cmbt_Roar_03_Face_anm -137 Trl_Cmbt_Spawn_Ink_02_anm -138 Trl_Cmbt_Spawn_Ink_anm -139 Trl_Cmbt_Spwn_Breakthrough_01_anm -140 Trl_Cmbt_Spwn_Breakthrough_02_anm -141 Trl_Cmbt_Taunt_Fwd_05_anm -142 Trl_Cmbt_Taunt_Fwd_06_anm -143 Trl_Cmbt_Taunt_Fwd_07_anm -144 Trl_Cmbt_Taunt_Fwd_08_anm -145 Trl_Cmbt_Taunt_Fwd_09_anm -146 Trl_Cmbt_Taunt_Lft_135_anm -147 Trl_Cmbt_Taunt_Lft_180_anm -148 Trl_Cmbt_Taunt_Lft_45_07_anm -149 Trl_Cmbt_Taunt_Lft_90_07_anm -150 Trl_Cmbt_Taunt_Lft_90_anm -151 Trl_Cmbt_Taunt_Rht_135_anm -152 Trl_Cmbt_Taunt_Rht_180_anm -153 Trl_Cmbt_Taunt_Rht_45_07_anm -154 Trl_Cmbt_Taunt_Rht_90_07_anm -155 Trl_Cmbt_Taunt_Rht_90_anm -156 Trl_Rct_Club_Face_anm -157 Trl_Rct_Club_Face_End_anm -158 Trl_Rct_Dazed_End_anm -159 Trl_Rct_Dazed_Loop_anm -160 Trl_Rct_Dazed_Start_anm -161 Trl_Rct_Hitch_Bwd_Add_anm -162 Trl_Rct_Hitch_Fwd_Add_anm -163 Trl_Rct_Hitch_Lft_Add_anm -164 Trl_Rct_Hitch_Rht_Add_anm -165 Trl_Rct_KnckDn_Bck_anm -166 Trl_Rct_Spell_Petrificus_Start_anm -167 Trl_Rct_Stumble_Bck_02_anm -168 Trl_Rct_Stumble_Bck_03_anm -169 Trl_Rct_Stumble_Bck_04_anm -170 Trl_Rct_Stumble_Fwd_anm -171 Trl_Rct_Stumble_Lft_anm -172 Trl_Rct_Stumble_Rht_anm -173 Trl_STN_Grnd_Sleep_End_v01_anm +0 CCL_Activity_WandSelection_Clip10_Ollivander_anm +1 CCL_Activity_WandSelection_Clip11_Ollivander_anm +2 CCL_Activity_WandSelection_Clip12_Ollivander_anm +3 CCL_Activity_WandSelection_Clip13_Ollivander_anm +4 CCL_Activity_WandSelection_Clip1_Ollivander_anm +5 CCL_Activity_WandSelection_Clip21_Ollivander_anm +6 CCL_Activity_WandSelection_Clip23_Ollivander_anm +7 CCL_Activity_WandSelection_Clip24_Ollivander_anm +8 CCL_Activity_WandSelection_Clip25_Ollivander_anm +9 CCL_Activity_WandSelection_Clip26_Ollivander_anm +10 CCL_Activity_WandSelection_Clip28_Ollivander_anm +11 CCL_Activity_WandSelection_Clip29_Ollivander_anm +12 CCL_Activity_WandSelection_Clip2_Ollivander_anm +13 CCL_Activity_WandSelection_Clip3_Ollivander_anm +14 CCL_Activity_WandSelection_Clip4_Ollivander_anm +15 CCL_Activity_WandSelection_Clip5_Ollivander_anm +16 CCL_Activity_WandSelection_Clip6_Ollivander_anm +17 CCL_Activity_WandSelection_Clip7_Ollivander_anm +18 CCL_Activity_WandSelection_Clip8_Ollivander_anm +19 CCL_Activity_WandSelection_Clip9_Ollivander_anm From f84e48b71b139a1882254f88ee35c9d7446e3231 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 12 Dec 2025 13:15:36 +0900 Subject: [PATCH 02/22] =?UTF-8?q?[Add]=20=EB=8F=84=EB=81=BC=20=EC=B6=A9?= =?UTF-8?q?=EB=8F=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/Goblin_BattleAxe.cpp | 103 +++++++++++++++++- .../Client/Private/Level_GamePlay.cpp | 4 +- Jusin154_Team3D/Client/Private/Loader.cpp | 2 +- .../Client/Private/Player_States.cpp | 16 ++- .../Client/Public/Goblin_BattleAxe.h | 13 +++ 5 files changed, 128 insertions(+), 10 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp index f80a96b46..667ae32c3 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp @@ -44,6 +44,10 @@ HRESULT CGoblin_BattleAxe::Initialize(void* pArg) void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta) { + if (m_bVisible) { + XMStoreFloat4(&m_vStartAxePos, Get_WorldPostion()); + XMStoreFloat4(&m_vStartGripPos, Get_WorldPostion()); + } m_pModelCom->Combined_BoneMatrix(); _matrix socketMatrix = {}; @@ -75,7 +79,13 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta) void CGoblin_BattleAxe::Late_Update(_float fTimeDelta) { - m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + SwingHit(m_bPlayerHit); + } + else { + m_bPlayerHit = false; + } } HRESULT CGoblin_BattleAxe::Render() @@ -83,8 +93,10 @@ HRESULT CGoblin_BattleAxe::Render() if (!m_pModelCom) return S_OK; - if (!m_bVisible) + if (!m_bVisible) { + return S_OK; + } if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -193,6 +205,93 @@ HRESULT CGoblin_BattleAxe::Bind_ShaderResources() return S_OK; } +void CGoblin_BattleAxe::CheckAxeHits(_uint& iHitCount, vector& pxHits) +{ + { + _vector vStartPos = XMLoadFloat4(&m_vStartAxePos); + _vector vEndPos = XMVectorSet(m_vAxeMat._41, m_vAxeMat._42, m_vAxeMat._43,1.f); + _vector vDir = vEndPos - vStartPos; + _float fDistance = XMVectorGetX(XMVector4Length(vDir)); + vDir = XMVector4Normalize(vDir); + + _bool bCollision = false; + m_SweepBufferAxe = {}; + bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferAxe); + if (true == bCollision) { + iHitCount += m_SweepBufferAxe.getNbTouches() + m_SweepBufferAxe.hasBlock; + auto touches = m_SweepBufferAxe.getTouches(); + for (_uint i = 0; i < m_SweepBufferAxe.nbTouches; ++i) { + pxHits.push_back(m_SweepBufferAxe.touches[i]); + } + if (true == m_SweepBufferAxe.hasBlock) { + pxHits.push_back(m_SweepBufferAxe.block); + } + } + } + { + _vector vStartPos = XMLoadFloat4(&m_vStartGripPos); + _vector vEndPos = m_pTransformCom->Get_State(STATE::POSITION); + _vector vDir = vEndPos - vStartPos; + _float fDistance = XMVectorGetX(XMVector4Length(vDir)); + vDir = XMVector4Normalize(vDir); + + _bool bCollision = false; + m_SweepBufferGrip = {}; + bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip); + if (true == bCollision) { + iHitCount += m_SweepBufferGrip.getNbTouches() + m_SweepBufferGrip.hasBlock; + auto touches = m_SweepBufferGrip.getTouches(); + for (_uint i = 0; i < m_SweepBufferGrip.nbTouches; ++i) { + pxHits.push_back(m_SweepBufferGrip.touches[i]); + } + if (true == m_SweepBufferGrip.hasBlock) { + pxHits.push_back(m_SweepBufferGrip.block); + } + } + } +} + + +void CGoblin_BattleAxe::SwingHit(_bool& bPlayerHit) +{ + vector pxHits; + _uint iHitCount = 0; + CheckAxeHits(iHitCount, pxHits); + { + for (_uint i = 0; i < pxHits.size(); ++i) { + PSX::PxActor* pxHitActor = pxHits[i].actor; + if (nullptr != pxHitActor && nullptr != pxHitActor->userData) { + PhsXUserData* pUserData = (PhsXUserData*)pxHitActor->userData; + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::PLAYER: + { + if (true == bPlayerHit) { + continue; + } + CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); + pStat->Get_Damage(20.f); + bPlayerHit = true; + pUserData->pOwner->OnCollision(this); + } break; + case PXOBJECT::ALLY_HITBOX: + break; + case PXOBJECT::ENVIRIONMENT: + break; + case PXOBJECT::TERRAIN: + break; + case PXOBJECT::BOX: + break; + case PXOBJECT::NPC: + break; + default: + break; + } + } + } + } +} + CGoblin_BattleAxe* CGoblin_BattleAxe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 6d3dcfb54..3226b3dce 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -238,7 +238,7 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Background = true; #endif // gimch #ifdef Bin - isReady_Background = false; + isReady_Background = true; #endif // #ifdef 진우 isReady_Background = true; @@ -267,7 +267,7 @@ HRESULT CLevel_GamePlay::Ready_Background() return E_FAIL; /* 조명 오브젝트 */ - /*CInfoInstance::GetInstance()->Load_LightElements("LightElement"); */ + CInfoInstance::GetInstance()->Load_LightElements("LightElement"); /* 상호작용 오브젝트 */ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel"); diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index f472d6cd8..995765791 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -312,7 +312,7 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_Background = true; #endif // gimch #ifdef Bin - isLoad_Background = false; + isLoad_Background = true; #endif // #ifdef 진우 isLoad_Background = true; diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index d47a4daa2..2dd4f4dd8 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -989,7 +989,7 @@ void CPlayer::Behavior_LightAttackEnter() Add_Event(pairAnimInfo.first, [this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject(), &iIndex); }, - 0.1f); + 0.07f); Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject()); }, @@ -1016,7 +1016,13 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck(_float fTimeDelta) _uint iNext = iCurr + 1; pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; pairAnimInfo.first = iNext; - + _float fAttackRatio; + if (pairAnimInfo.first - m_Animation[STATEANIM::LIGHT_ATTACK].first == 3) { + fAttackRatio = 0.12f; + } + else { + fAttackRatio = 0.07f; + } Add_Event(pairAnimInfo.first, [this]() {m_bLookAt = true; @@ -1032,7 +1038,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck(_float fTimeDelta) _uint comboIndex = m_pModelCom->Get_AnimIndex() - m_Animation[STATEANIM::LIGHT_ATTACK].first; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject(), &comboIndex); }, - 0.05f); + fAttackRatio); Add_Event(iNext, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE,Get_PartObject()); @@ -1831,7 +1837,7 @@ void CPlayer::Behavior_Broom_DismountEnter() m_pTransformCom->Set_State(STATE::RIGHT, right); m_pTransformCom->Set_State(STATE::UP, up); m_pTransformCom->Set_State(STATE::LOOK, look); - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.3f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.6f); } HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) @@ -2310,7 +2316,7 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::SPELL_90_L] = { 826,false }; m_Animation[STATEANIM::MAPHELP] = { 122,false }; - m_Animation[STATEANIM::POTION] = { 114,false }; // 114 포션 // 909 루모스 + m_Animation[STATEANIM::POTION] = { 115,false }; // 114 포션 // 909 루모스 m_Animation[STATEANIM::ACCIO] = { 417,false }; m_Animation[STATEANIM::DESCENDO] = { 857,false }; m_Animation[STATEANIM::DEPULSO] = { 858,false }; diff --git a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h index 4df150f5c..97263633d 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h +++ b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h @@ -35,6 +35,15 @@ class CGoblin_BattleAxe final : public CPartObject _float4x4 m_vAxeMat= {}; + + PSX::PxSweepBufferN<12> m_SweepBufferAxe = {}; + PSX::PxSweepBufferN<12> m_SweepBufferGrip = {}; + const _float4* m_pAxePos = { nullptr }; + const _float4* m_pAxeGripPos = { nullptr }; + _float4 m_vStartAxePos = { }; + _float4 m_vStartGripPos = { }; + _bool m_bPlayerHit = {}; + #ifdef _DEBUG unique_ptr m_pGripShape = { nullptr }; unique_ptr m_pSubShape = { nullptr }; @@ -45,6 +54,10 @@ class CGoblin_BattleAxe final : public CPartObject HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); + void CheckAxeHits(_uint& iHitCount, vector& pxHits); + + void SwingHit(_bool& bPlayerHit); + public: static CGoblin_BattleAxe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override; From 91c176973a16f8121ed8844c18f86dcf7f8a0c30 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 12 Dec 2025 13:19:50 +0900 Subject: [PATCH 03/22] =?UTF-8?q?[Fix]=20=ED=8A=B8=EB=A1=A4=20=EC=B6=A9?= =?UTF-8?q?=EB=8F=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/MiniMap_Camera.cpp | 4 ++ .../Client/Private/NPC_Ollivander.cpp | 2 + Jusin154_Team3D/Client/Private/Player.cpp | 10 +++- Jusin154_Team3D/Client/Private/Troll.cpp | 54 ++++++++++++------- .../Private/Troll_State_BackHand_Swing.cpp | 4 +- .../Client/Private/Troll_States.cpp | 2 +- Jusin154_Team3D/Client/Public/Barral_Splesh.h | 3 ++ Jusin154_Team3D/Client/Public/Box_Splesh.h | 3 ++ Jusin154_Team3D/Client/Public/Chair_Splesh.h | 3 ++ Jusin154_Team3D/Client/Public/MageSide.h | 4 ++ .../Client/Public/Mage_Down_Attack.h | 3 ++ .../Client/Public/Mage_Nomal_Attack.h | 4 ++ Jusin154_Team3D/Client/Public/Player.h | 3 +- Jusin154_Team3D/Client/Public/StunEffect.h | 3 ++ .../Public/Troll_State_BackHand_Swing.h | 5 +- .../Engine/Private/GameInstance.cpp | 50 +++++++++-------- 16 files changed, 105 insertions(+), 52 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp index 071f397ac..d9a4ddf53 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp @@ -94,6 +94,10 @@ void CMiniMap_Camera::Free() __super::Free(); } +#ifdef _DEBUG void CMiniMap_Camera::Describe_Entity() { } +#endif // _DEBUG + + diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index e28b231a6..472f1bf11 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -26,6 +26,8 @@ void CNPC_Ollivander::Update(_float fTimeDelta) { m_pFSM->Update_State(fTimeDelta); + m_pModelCom->Set_AnimationIndex(0); + m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); __super::Update(fTimeDelta); #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 603ff43e6..25b87d1ee 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -147,6 +147,14 @@ __super::Update(fTimeDelta); m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP)); m_bAim = false; } + + if (m_pGameInstance->Key_Down(DIK_1)) { + if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first) + { + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second); + } + } + } void CPlayer::UpdateGrapInteractive(_float fTimeDelta) @@ -310,7 +318,6 @@ void CPlayer::OnCollision(CGameObject* pOther, void* pDesc) void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller) { } -#ifdef _DEBUG void CPlayer::Start_CameraShake(_float fTime, _float fIntense) { @@ -319,6 +326,7 @@ void CPlayer::Start_CameraShake(_float fTime, _float fIntense) m_fCameraShakeIntense = fIntense; m_bCameraShake = true; } +#ifdef _DEBUG void CPlayer::Render_CameraCoordinateSystem() { diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index dff963c67..8f48141dc 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -337,29 +337,45 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); - _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; + _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()), m_pTransformCom->Get_XMWorldMatrix()).r[3]; m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); - _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); - auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); - switch (iSkillType) + CEffect_Container* pEffect_Container = dynamic_cast(pOther); + + pair<_float, _float> damagePair = {}; + + if (pEffect_Container != nullptr) { - case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::FLIPENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); - break; - case ENUM_CLASS(SKILL_TYPE::JAP): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); - break; - default: - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); - break; + _uint iSkillType = pEffect_Container->Get_SkillType(); + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + switch (iSkillType) + { + case ENUM_CLASS(SKILL_TYPE::DESCENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::FLIPENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + break; + default: + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); + break; + } } + + CMapElement_Interactable* pProps = dynamic_cast(pOther); + + if (pProps != nullptr) + { + m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + } + m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { diff --git a/Jusin154_Team3D/Client/Private/Troll_State_BackHand_Swing.cpp b/Jusin154_Team3D/Client/Private/Troll_State_BackHand_Swing.cpp index 9f9f0384c..6c118d2ed 100644 --- a/Jusin154_Team3D/Client/Private/Troll_State_BackHand_Swing.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_State_BackHand_Swing.cpp @@ -10,6 +10,7 @@ CTroll_State_BackHand_Swing::CTroll_State_BackHand_Swing() void CTroll_State_BackHand_Swing::Enter() { + m_bPlayerHit = false; __super::Enter(); } @@ -22,13 +23,14 @@ HRESULT CTroll_State_BackHand_Swing::Update(_float fTimeDelta) return E_FAIL; } if (nullptr != m_funcLateUpdate) { - m_funcLateUpdate(fTimeDelta); + m_funcLateUpdate(fTimeDelta, m_bPlayerHit); } return S_OK; } void CTroll_State_BackHand_Swing::Exit() { + m_bPlayerHit = false; __super::Exit(); } diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index e9a87bf1c..2f8fa7435 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -811,7 +811,7 @@ void CTroll::Add_FSM() Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BackHandSwingExitCheck(fTimeDelta); }; Desc.funcExitEvent = [this]() { Behavior_BackHandSwingExit(); }; Desc.funcPriorityUpdate = nullptr; - Desc.funcLateUpdate = nullptr; + Desc.funcLateUpdate = [this](_float fTimeDelta, _bool& bHit) { SwingHit(bHit); }; m_States.emplace(FSMSTATE::BACKHAND_SWING, CTroll_State_BackHand_Swing::Create(&Desc)); } #pragma endregion diff --git a/Jusin154_Team3D/Client/Public/Barral_Splesh.h b/Jusin154_Team3D/Client/Public/Barral_Splesh.h index 5967b2a22..29c699f3e 100644 --- a/Jusin154_Team3D/Client/Public/Barral_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Barral_Splesh.h @@ -36,7 +36,10 @@ class CBarral_Splesh final : public CEffect_Container static CBarral_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Box_Splesh.h b/Jusin154_Team3D/Client/Public/Box_Splesh.h index d165b109f..b28178fc8 100644 --- a/Jusin154_Team3D/Client/Public/Box_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Box_Splesh.h @@ -36,7 +36,10 @@ class CBox_Splesh final : public CEffect_Container static CBox_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Chair_Splesh.h b/Jusin154_Team3D/Client/Public/Chair_Splesh.h index 23793a329..5b53343d7 100644 --- a/Jusin154_Team3D/Client/Public/Chair_Splesh.h +++ b/Jusin154_Team3D/Client/Public/Chair_Splesh.h @@ -36,7 +36,10 @@ class CChair_Splesh final : public CEffect_Container static CChair_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/MageSide.h b/Jusin154_Team3D/Client/Public/MageSide.h index 70b20f270..a8db89826 100644 --- a/Jusin154_Team3D/Client/Public/MageSide.h +++ b/Jusin154_Team3D/Client/Public/MageSide.h @@ -44,7 +44,11 @@ class CMageSide final : public CEffect_Container static CMageSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h index 2ff45b120..8b29f128a 100644 --- a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h +++ b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h @@ -40,7 +40,10 @@ class CMage_Down_Attack final : public CEffect_Container static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h index 6716d924a..1025b5d42 100644 --- a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h +++ b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h @@ -48,7 +48,11 @@ class CMage_Nomal_Attack final : public CEffect_Container static CMage_Nomal_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // DEBUG + + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 846062e92..54dffda3e 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -121,8 +121,7 @@ class CPlayer final : public CUnit _float3 m_BroomScale = { 0.f, 0.f, 0.f }; _float3 m_TargetScale = { 1.f, 1.f, 1.f }; _float m_fScaleSmoothSpeed = 2.5f; - - + _bool m_bLumos = {}; HRESULT InputAction(); HRESULT InputMove(); diff --git a/Jusin154_Team3D/Client/Public/StunEffect.h b/Jusin154_Team3D/Client/Public/StunEffect.h index ed8f17034..bdfcdb62b 100644 --- a/Jusin154_Team3D/Client/Public/StunEffect.h +++ b/Jusin154_Team3D/Client/Public/StunEffect.h @@ -38,7 +38,10 @@ class CStunEffect final : public CEffect_Container static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll_State_BackHand_Swing.h b/Jusin154_Team3D/Client/Public/Troll_State_BackHand_Swing.h index 1096cf03d..60d3624d1 100644 --- a/Jusin154_Team3D/Client/Public/Troll_State_BackHand_Swing.h +++ b/Jusin154_Team3D/Client/Public/Troll_State_BackHand_Swing.h @@ -9,7 +9,7 @@ class CTroll_State_BackHand_Swing final : public CState_Root public: typedef struct tagTrollBackHandSwing : public CState_Root::STATE_ROOT_DESC { function funcPriorityUpdate = { nullptr }; - function funcLateUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; }TROLL_STATE_BACK_HAND_SWING_DESC; public: CTroll_State_BackHand_Swing(); @@ -22,7 +22,8 @@ class CTroll_State_BackHand_Swing final : public CState_Root private: function m_funcPriorityUpdate = { nullptr }; - function m_funcLateUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + _bool m_bPlayerHit = false; private: HRESULT Initialize(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc); diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 770b11204..79b840b82 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -241,10 +241,6 @@ void CGameInstance::BillBoard(CTransform* pTransform) } - -#ifdef EDITOR_PROJECT - - void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime) { if (fTime <= 0 || fSlowIntense <= 0) @@ -255,6 +251,30 @@ void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime) m_fSlowIntense = fSlowIntense; } +_float CGameInstance::Update_SlowMotion(_float fTimeDelta) +{ + _float fExcuteTimeDelta = {}; + + if (m_isSlowMotion == false) + return fTimeDelta; + + m_vSlowTime.x += fTimeDelta; + + if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면 + { + m_isSlowMotion = false; + m_vSlowTime.x = 0.f; + } + else + { + fExcuteTimeDelta = m_fSlowIntense * fTimeDelta; + } + + return fExcuteTimeDelta; +} + +#ifdef EDITOR_PROJECT + void CGameInstance::Save_ModelFilePath(const _char* FilePath) { m_FilePaths.push_back(FilePath); @@ -283,28 +303,6 @@ size_t CGameInstance::ModelFilePathCount() return m_FilePaths.size(); } -_float CGameInstance::Update_SlowMotion(_float fTimeDelta) -{ - _float fExcuteTimeDelta = {}; - - if (m_isSlowMotion == false) - return fTimeDelta; - - m_vSlowTime.x += fTimeDelta; - - if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면 - { - m_isSlowMotion = false; - m_vSlowTime.x = 0.f; - } - else - { - fExcuteTimeDelta = m_fSlowIntense * fTimeDelta; - } - - return fExcuteTimeDelta; -} - #endif // EDITOR_PROJECT void CGameInstance::Render_Begin(const _float4* pClearColor) { From 94896e34386a76acc807bebfdcbaa86aaf3ceb18 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 14:40:26 +0900 Subject: [PATCH 04/22] [add] LerpTimer --- Jusin154_Team3D/Client/Private/Camera_Debug.cpp | 3 +++ Jusin154_Team3D/Client/Private/InteractiveInfo.cpp | 9 ++++++--- Jusin154_Team3D/Client/Private/MapElement_Door.cpp | 8 ++++---- Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp | 1 - Jusin154_Team3D/Client/Private/MonsterInfo.cpp | 4 +++- Jusin154_Team3D/Client/Private/Player.cpp | 1 + Jusin154_Team3D/Client/Private/Terrain.cpp | 4 +--- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index b5da3e13c..42de744a8 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -17,9 +17,12 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs) void CCamera_Debug::Priority_Update(_float fTimeDelta) { +#ifndef 기무리 #ifdef _DEBUG m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false); #endif // _DEBUG +#endif // !기무리 + } diff --git a/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp b/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp index f01b2c22d..de70af286 100644 --- a/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp +++ b/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp @@ -61,7 +61,7 @@ HRESULT CInteractiveInfo::Refresh_LockOnTarget() _vector vCameraPos = m_pGameInstance->Get_CamXMPosition(); _float fMaxDot = { 0.f }; - _vector vMonsterPos; + _vector vInteractablePos; _vector vToMonsterDir; _bool bAim = false; _float fFovy = 0.f; @@ -83,8 +83,11 @@ HRESULT CInteractiveInfo::Refresh_LockOnTarget() // (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상 CMapElement_Interactable* pInteractive = (*iter); - vMonsterPos = pInteractive->Get_LockOnPos(); - vToMonsterDir = vMonsterPos - vCameraPos; + vInteractablePos = pInteractive->Get_LockOnPos(); + vToMonsterDir = vInteractablePos - vCameraPos; + if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) { + continue; + } _float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir); if (fDotResult <= cosf(fFovy)) { continue; diff --git a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp index 8d6a22b82..dd541d6ec 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp @@ -43,11 +43,11 @@ HRESULT CMapElement_Door::Initialize(void* pArg) m_pTransformCom->Set_Scale(pDesc->vScale); m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z)); - m_vBoxSize = _float3(1.f, 1.f, 1.f);/* - m_pActor = static_cast(m_pRigidBody->Get_Actor()); + //m_vBoxSize = _float3(1.f, 1.f, 1.f); + //m_pActor = static_cast(m_pRigidBody->Get_Actor()); - static_cast(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize); - static_cast(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);*/ + //static_cast(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize); + //static_cast(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp index 82f113ff6..d9a4ddf53 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp @@ -93,7 +93,6 @@ void CMiniMap_Camera::Free() { __super::Free(); } -#ifdef _DEBUG #ifdef _DEBUG void CMiniMap_Camera::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp index 789d1815a..6ce1b881f 100644 --- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp @@ -142,7 +142,6 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters() { // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기 for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) { - // (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상 CMonster* pMonster = (*iter); if (pMonster->Get_Hp().x <= 0) { @@ -150,6 +149,9 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters() } vMonsterPos = pMonster->Get_LockOnPos(); vToMonsterDir = vMonsterPos - vCameraPos; + if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) { + continue; + } _float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir); if (fDotResult <= cosf(fFovy)) { continue; diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 25b87d1ee..f5dc94ce6 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -92,6 +92,7 @@ HRESULT CPlayer::Initialize(void* pArg) m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage); m_pCharacter_Controller->Set_Position(XMVectorSet(-34.f, 5, -11.4f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f)); #ifdef _DEBUG m_BasicEffect = make_unique(m_pDevice); diff --git a/Jusin154_Team3D/Client/Private/Terrain.cpp b/Jusin154_Team3D/Client/Private/Terrain.cpp index 45f376a03..ab2082b9a 100644 --- a/Jusin154_Team3D/Client/Private/Terrain.cpp +++ b/Jusin154_Team3D/Client/Private/Terrain.cpp @@ -55,9 +55,7 @@ void CTerrain::Priority_Update(_float fTimeDelta) void CTerrain::Update(_float fTimeDelta) { -#ifdef _DEBUG - //Describe_Entity(); -#endif // DEBUG + } void CTerrain::Late_Update(_float fTimeDelta) From 8e65c775083c6cf0caf11430d06424838009cbe4 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 14:40:40 +0900 Subject: [PATCH 05/22] [add] Release Camera --- .../Client/Private/CamPosition_Shoulder.cpp | 25 +- .../Client/Private/Camera_Gaze.cpp | 14 +- Jusin154_Team3D/Client/Private/EffectPool.cpp | 6 +- Jusin154_Team3D/Client/Private/Loader.cpp | 400 +++++++++--------- Jusin154_Team3D/Jusin154_Team3D.sln | 1 - 5 files changed, 234 insertions(+), 212 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index fd1dfeda2..a46a4728b 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -41,9 +41,9 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg) _vector vLookTargetPos = Calc_LookTargetPos(); m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos); - m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos)); + m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos) + XMVectorSet(0.f, 0.f, 1.f, 0.f)); } - m_bDampingParentPos = false; + m_bDampingParentPos = true; return S_OK; } @@ -195,8 +195,19 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_vector vLookTargetWorldPos) _vector fRotQ = XMQuaternionRotationAxis(XMVectorSet(0.f, 1.f, 0.f, 0.f), XMConvertToRadians(-m_fFollowTargetIncludedAngleDegree)); _vector vDestPos = Calc_DampingParentPos(); _vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f); - _vector vDir = XMVector3Normalize(vHeadPos - vLookTargetWorldPos); - vDir = XMVector3Rotate(vDir, fRotQ); + _vector vDir = vHeadPos - vLookTargetWorldPos; + _float fLengthSQ = XMVectorGetX(XMVector3LengthSq(vDir)); + + if (fLengthSQ < FLT_EPSILON) + { + vDir = XMVectorSet(0.f, 0.f, 1.f, 0.f); + vDir = XMVector3Rotate(vDir, fRotQ); + } + else + { + vDir = XMVector3Normalize(vDir); + vDir = XMVector3Rotate(vDir, fRotQ); + } m_BufferHit = {}; _bool bHit = m_pGameInstance->SphereCast( 0.25f, vLookTargetWorldPos, vDir, fBestFollowTargetDistance, @@ -260,7 +271,11 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_vector vLookTargetWorldPos) } _vector CCamPosition_Shoulder::Calc_DampingParentPos() { - return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), m_vDampingLerpTimer.x / m_vDampingLerpTimer.y); + _float duration = max(m_vDampingLerpTimer.y, FLT_EPSILON); + _float fTime = m_vDampingLerpTimer.x / duration; + fTime = CMyTools::Saturate(fTime); // 0~1 + + return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), fTime); } void CCamPosition_Shoulder::Set_CameraShake(_float fXShock, _float fYShock) { diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index 6dce3a592..55725ff98 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -20,14 +20,16 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta) } if (false == m_bIsCurrentTransition) { if (m_bEnable_FollowLerp) { - _vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), m_vFollowLerpTime.x / m_vFollowLerpTime.y), 1.f); + _float fTimeDenom = max(m_vFollowLerpTime.y, FLT_EPSILON); + _vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), CMyTools::Saturate(m_vFollowLerpTime.x / fTimeDenom)), 1.f); m_pTransformCom->Set_State(STATE::POSITION, vNewPos); } else { m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component()->Get_State(STATE::POSITION)); } if (m_bEnable_LookLerp) { - _vector vNewLook = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vLookPos_Src), XMLoadFloat3(&m_vLookPos_Dest), m_vLookLerpTime.x / m_vLookLerpTime.y), 1.f); + _float fTimeDenom = max(m_vLookLerpTime.y, FLT_EPSILON); + _vector vNewLook = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vLookPos_Src), XMLoadFloat3(&m_vLookPos_Dest), CMyTools::Saturate(m_vLookLerpTime.x / fTimeDenom)), 1.f); m_pTransformCom->LookAt(vNewLook); } else { @@ -82,14 +84,18 @@ void CCamera_Gaze::Enable_FollowLerp() { m_bEnable_FollowLerp = true; m_vFollowLerpTime.x = 0.f; - XMStoreFloat3(&m_vFollowPos_Src, m_pFollowTarget->Get_WorldPostion()); + + XMStoreFloat3(&m_vFollowPos_Src, m_pTransformCom->Get_State(STATE::POSITION)); + XMStoreFloat3(&m_vFollowPos_Dest, m_pFollowTarget->Get_WorldPostion()); } void CCamera_Gaze::Enable_LookLerp() { m_bEnable_LookLerp = true; m_vLookLerpTime.x = 0.f; - XMStoreFloat3(&m_vLookPos_Src, m_pLookTarget->Get_WorldPostion()); + _vector vLookTargetPos = m_pLookTarget->Get_WorldPostion(); + XMStoreFloat3(&m_vLookPos_Src, vLookTargetPos); + XMStoreFloat3(&m_vLookPos_Dest, vLookTargetPos); } void CCamera_Gaze::Toggle_Priority() diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 09c1978b7..d7d45b819 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -58,6 +58,8 @@ HRESULT CEffectPool::Initialize(void* pArg) return E_FAIL; } + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; #ifdef _DEBUG #ifdef gimch @@ -73,8 +75,8 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveMonsterEffectCreate = true; #endif // #ifdef 기무리 - m_isActiveEffectCreate = true; - m_isActiveMonsterEffectCreate = true; + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; #endif // #ifdef 인혁 m_isActiveEffectCreate = false; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 995765791..7b6d1f4cc 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -871,206 +871,206 @@ HRESULT CLoader::Loading_For_GamePlay() m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png"); } #pragma endregion -#pragma region UI_ANI - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) - { - return E_FAIL; - } - - 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)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) - { - return E_FAIL; - } - -#pragma endregion +//#pragma region UI_ANI +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) +// { +// return E_FAIL; +// } +// +// 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)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) +// { +// return E_FAIL; +// } +// +//#pragma endregion #pragma region TERRAIN_TEXTURE /* Terrain_Diffuse */ diff --git a/Jusin154_Team3D/Jusin154_Team3D.sln b/Jusin154_Team3D/Jusin154_Team3D.sln index 78e5e4dca..08c3e18a8 100644 --- a/Jusin154_Team3D/Jusin154_Team3D.sln +++ b/Jusin154_Team3D/Jusin154_Team3D.sln @@ -61,7 +61,6 @@ Global {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.ActiveCfg = Debug|Win32 {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.Build.0 = Debug|Win32 {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.ActiveCfg = Release|x64 - {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.Build.0 = Release|x64 {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.ActiveCfg = Release|Win32 {F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.Build.0 = Release|Win32 {2133313A-E5E1-41CD-B976-21753FBCD083}.Debug|x64.ActiveCfg = Debug|x64 From b3fbce6ac7dc59d38c6730cd940909b4cb1f6be7 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 14:41:31 +0900 Subject: [PATCH 06/22] [fix] #ifdef --- Jusin154_Team3D/Client/Private/EffectPool.cpp | 6 +- Jusin154_Team3D/Client/Private/Loader.cpp | 400 +++++++++--------- 2 files changed, 202 insertions(+), 204 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index d7d45b819..09c1978b7 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -58,8 +58,6 @@ HRESULT CEffectPool::Initialize(void* pArg) return E_FAIL; } - m_isActiveEffectCreate = false; - m_isActiveMonsterEffectCreate = false; #ifdef _DEBUG #ifdef gimch @@ -75,8 +73,8 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveMonsterEffectCreate = true; #endif // #ifdef 기무리 - m_isActiveEffectCreate = false; - m_isActiveMonsterEffectCreate = false; + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; #endif // #ifdef 인혁 m_isActiveEffectCreate = false; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 7b6d1f4cc..995765791 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -871,206 +871,206 @@ HRESULT CLoader::Loading_For_GamePlay() m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png"); } #pragma endregion -//#pragma region UI_ANI -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) -// { -// return E_FAIL; -// } -// -// 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)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) -// { -// return E_FAIL; -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), -// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) -// { -// return E_FAIL; -// } -// -//#pragma endregion +#pragma region UI_ANI + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) + { + return E_FAIL; + } + + 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)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) + { + return E_FAIL; + } + +#pragma endregion #pragma region TERRAIN_TEXTURE /* Terrain_Diffuse */ From 2aefa6a6caab1c348c84f2b360613f77b19a0678 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 14:55:08 +0900 Subject: [PATCH 07/22] [add] Ollivander --- Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index c9b60c53b..e79d87d7f 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -141,6 +141,7 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) return E_FAIL; } m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f)); + m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); return S_OK; } From fc4dc7122489ed34520a29b1d5d89bd1898fe2e0 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 12 Dec 2025 15:01:31 +0900 Subject: [PATCH 08/22] =?UTF-8?q?[Add]=20=ED=8F=AC=EC=85=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 15 +- .../Client/Private/Item_Potion.cpp | 200 ++++++++++++++++++ Jusin154_Team3D/Client/Private/Loader.cpp | 10 + Jusin154_Team3D/Client/Private/Player.cpp | 13 ++ .../Client/Private/Player_States.cpp | 4 + .../Client/Private/Troll_States.cpp | 4 +- Jusin154_Team3D/Client/Public/Item_Potion.h | 54 +++++ .../Object/Potion/SM_Bottle_EmptyCapOff.bin | 3 + Jusin154_Team3D/Editor/Private/Loader.cpp | 6 + 10 files changed, 306 insertions(+), 5 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Item_Potion.cpp create mode 100644 Jusin154_Team3D/Client/Public/Item_Potion.h create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 49dd2a365..a6bbfcca4 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -185,6 +185,7 @@ call Update_Resources.bat + @@ -366,6 +367,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 519fe9a6b..31269e643 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -532,7 +532,7 @@ 02.GameObjects\Effect\PropsEffect\Barral - + 04.Mechanic\State\Broom_Player\State_Broom_Hover @@ -554,6 +554,9 @@ 02.GameObjects\Environment\03.MapElement\Door + + 02.GameObjects\Item\Potion + @@ -1148,7 +1151,7 @@ {3103c6e1-60cb-438b-a3eb-844b919ccd43} - + {24f6903f-8f6b-46ff-a387-ecb44d673887} @@ -1170,6 +1173,9 @@ {b09f9ada-6cf4-41a4-ad28-f00855509825} + + {ace6c64f-901a-424e-99da-53f281413d77} + @@ -1646,7 +1652,7 @@ 02.GameObjects\Effect\PropsEffect\Chair - + 04.Mechanic\State\Broom_Player\State_Broom_Hover @@ -1668,6 +1674,9 @@ 02.GameObjects\Environment\03.MapElement\Door + + 02.GameObjects\Item\Potion + diff --git a/Jusin154_Team3D/Client/Private/Item_Potion.cpp b/Jusin154_Team3D/Client/Private/Item_Potion.cpp new file mode 100644 index 000000000..1609a2c54 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Item_Potion.cpp @@ -0,0 +1,200 @@ +#include "pch.h" +#include "Item_Potion.h" + +#include "GameInstance.h" + +CItem_Potion::CItem_Potion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CPartObject(pDevice, pContext) +{ +} + +CItem_Potion::CItem_Potion(const CItem_Potion& Prototype) + : CPartObject(Prototype) +{ +} + +HRESULT CItem_Potion::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CItem_Potion::Initialize(void* pArg) +{ + POTION_DESC* pDesc = static_cast (pArg); + m_pSocketMatrices = pDesc->pSocketMatrices; + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + + if (FAILED(Ready_Components())) { + return E_FAIL; + } + + return S_OK; +} + +void CItem_Potion::Priority_Update(_float fTimeDelta) +{ + + +#ifdef _DEBUG + Describe_Entity(); + +#endif // _DEBUG +} + +void CItem_Potion::Update(_float fTimeDelta) +{ + m_pModelCom->Combined_BoneMatrix(); + +} + +void CItem_Potion::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) + { + m_fTimer += fTimeDelta; + if (m_fTimer >= 1.7f) { + m_fTimer = 0.f; + m_bVisible = false; + } + + } + if (m_bAttach) + { + _matrix socketMatrix = {}; + + socketMatrix = XMLoadFloat4x4(m_pSocketMatrices); + + for (int i = 0; i < 3; ++i) { + socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); + } + + m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); + } + + + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); +} + +HRESULT CItem_Potion::Render() +{ + if (!m_pModelCom) + return S_OK; + + if (!m_bVisible) + return S_OK; + + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + +void CItem_Potion::Set_Attach(_bool Attach) +{ + m_bAttach = Attach; +} + + +HRESULT CItem_Potion::Ready_Components() +{ + __super::Ready_Components(nullptr); + + + /* Com_Model */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Potion_Model"), + reinterpret_cast(&m_pModelCom)))) + return E_FAIL; + + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH, + reinterpret_cast(&m_pShaderCom)))) + return E_FAIL; + + return S_OK; +} + +HRESULT CItem_Potion::Bind_ShaderResources() +{ + if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + return E_FAIL; + } + + return S_OK; +} + + +CItem_Potion* CItem_Potion::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CItem_Potion* pInstance = new CItem_Potion(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CItem_Potion"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CItem_Potion::Clone(void* pArg, CGameObject* pOwner) +{ + CItem_Potion* pInstance = new CItem_Potion(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CItem_Potion"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CItem_Potion::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pModelCom); + +} +#ifdef _DEBUG + +void CItem_Potion::Describe_Entity() +{ + +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 995765791..8f56c753e 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -18,6 +18,7 @@ #include "Troll_Rock.h" #include "Goblin_Dagger.h" #include "Wand.h" +#include "Item_Potion.h" #include "Goblin_BattleAxe.h" #pragma region ACTOR @@ -1471,6 +1472,11 @@ HRESULT CLoader::Loading_For_GamePlay() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Potion_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin", XMMatrixIdentity())))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"), CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) return E_FAIL; @@ -2188,6 +2194,10 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_Potion */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CItem_Potion::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_Troll_Weapon */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext)))) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index f5dc94ce6..c0fa3dd2e 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -7,6 +7,7 @@ #include "Camera_Gaze.h" #include "CamPosition_Arm.h" #include "Wand.h" +#include "Item_Potion.h" #include "Character_Controller.h" #include "CallBack_Playable_Behavior.h" #include "CamPosition_Shoulder.h" @@ -463,6 +464,18 @@ HRESULT CPlayer::Ready_Parts() return E_FAIL; } + CItem_Potion::POTION_DESC PotionDesc{}; + + PotionDesc.pParentTransform = m_pTransformCom; + PotionDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand"); + + if (FAILED(Add_PartObject("Potion", g_iStaticLevel, nullptr, &PotionDesc))) + { + return E_FAIL; + } + + Get_PartObject()->Set_Visible(false); + { CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc; Desc.pParentTransform = m_pTransformCom; diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 2dd4f4dd8..34b638498 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -8,6 +8,7 @@ #include "Camera_Gaze.h" #include "CamPosition_Arm.h" #include "Wand.h" +#include "Item_Potion.h" #include "Character_Controller.h" #include "MapElement_Interactable.h" #include "CallBack_Playable_Behavior.h" @@ -215,6 +216,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { + Get_PartObject()->Set_Visible(true); m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } else if (m_pGameInstance->Key_Down(DIK_B)) { @@ -408,6 +410,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { + Get_PartObject()->Set_Visible(true); m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } @@ -640,6 +643,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) return S_OK; } + if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT) || !SUCCEEDED(InputMove())) { if (!m_pFSM->IsEnable(FSMSTATE::STOP)) diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 2f8fa7435..8192ce1f5 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -912,7 +912,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector& pxHits) _bool bCollision = false; m_SweepBufferHammer = {}; - bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer); + bCollision = m_pGameInstance->SphereCast(2.f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer); if (true == bCollision) { iHitCount += m_SweepBufferHammer.getNbTouches() + m_SweepBufferHammer.hasBlock; auto touches = m_SweepBufferHammer.getTouches(); @@ -933,7 +933,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector& pxHits) _bool bCollision = false; m_SweepBufferGrip = {}; - bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip); + bCollision = m_pGameInstance->SphereCast(2.f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip); if (true == bCollision) { iHitCount += m_SweepBufferGrip.getNbTouches() + m_SweepBufferGrip.hasBlock; auto touches = m_SweepBufferGrip.getTouches(); diff --git a/Jusin154_Team3D/Client/Public/Item_Potion.h b/Jusin154_Team3D/Client/Public/Item_Potion.h new file mode 100644 index 000000000..983d862fd --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Item_Potion.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "PartObject.h" + +NS_BEGIN(Client) + +class CItem_Potion final : public CPartObject +{ +public: + typedef struct tagPotion : public CPartObject::PARTOBJECT_DESC + { + const _float4x4* pSocketMatrices = { }; + }POTION_DESC; +private: + CItem_Potion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CItem_Potion(const CItem_Potion& Prototype); + virtual ~CItem_Potion() = default; + +public: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + void Set_Attach(_bool Attach); +public: + +private: + const _float4x4* m_pSocketMatrices = { }; + CShader* m_pShaderCom = { nullptr }; + CModel* m_pModelCom = { nullptr }; + + _float4x4 m_pWandTipMatrix = {}; + _float3 m_Offset = {}; + _bool m_bAttach = { true }; + _float m_fTimer = {}; + +private: + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CItem_Potion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override; + virtual void Free() override; + +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin new file mode 100644 index 000000000..3bf94078e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f1494c242f4b9eff1a15b759e0ac6d48b58c529e88c53ba59e0e58dff688607 +size 160154 diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 13fc18866..2e138f5c9 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -2130,6 +2130,12 @@ HRESULT CLoader::Loading_For_ObjectViewer() vector*>> futures = {}; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SM_Bottle_EmptyCapOff_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM_LOCAL, "C:/MeshTable\\Game\\Cinematics\\Props\\SM_Bottle_EmptyCapOff.fbx", XMMatrixIdentity())))) { + return E_FAIL; + } + + #pragma region BODY futures.emplace_back(Deferred_ModelLoad( From eafb2bacd50dabb28263addcc7b9fd64aaa028a1 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 12 Dec 2025 15:31:53 +0900 Subject: [PATCH 09/22] =?UTF-8?q?[Fix]=20=ED=8A=B8=EB=A1=A4=20=EC=8A=A4?= =?UTF-8?q?=EC=9C=99=20=EC=88=98=EC=A0=95=20[Fix]=20=ED=94=8C=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EB=8D=98=EC=A7=80=EA=B8=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Player_States.cpp | 6 ++++++ Jusin154_Team3D/Client/Private/Troll_States.cpp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 34b638498..38505d5f3 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -848,6 +848,12 @@ void CPlayer::Behavior_CombatEnter() Add_Event(pairAnimInfo.first, [this]() { Throwing_Interactive(); }, 0.2f); + + Add_Event(pairAnimInfo.first, + [this]() { + m_pGameInstance->SlowMotion(0.1f, 0.35f); + }, + 0.1f); } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 8192ce1f5..fc834321a 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -579,7 +579,7 @@ HRESULT CTroll::Behavior_BackHandSwingExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; } - return E_FAIL; + return S_OK; } void CTroll::Behavior_BackHandSwingExit() @@ -912,7 +912,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector& pxHits) _bool bCollision = false; m_SweepBufferHammer = {}; - bCollision = m_pGameInstance->SphereCast(2.f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer); + bCollision = m_pGameInstance->SphereCast(1.5f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer); if (true == bCollision) { iHitCount += m_SweepBufferHammer.getNbTouches() + m_SweepBufferHammer.hasBlock; auto touches = m_SweepBufferHammer.getTouches(); @@ -933,7 +933,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector& pxHits) _bool bCollision = false; m_SweepBufferGrip = {}; - bCollision = m_pGameInstance->SphereCast(2.f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip); + bCollision = m_pGameInstance->SphereCast(1.5f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip); if (true == bCollision) { iHitCount += m_SweepBufferGrip.getNbTouches() + m_SweepBufferGrip.hasBlock; auto touches = m_SweepBufferGrip.getTouches(); From 8e03b68a050c8e3ae211f0ad37e12c0c4a38932a Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Fri, 12 Dec 2025 15:34:07 +0900 Subject: [PATCH 10/22] commit --- .../Client/Private/Barral_Splesh.cpp | 6 +- Jusin154_Team3D/Client/Private/Bombard.cpp | 11 +- .../Client/Private/BombardSide.cpp | 6 +- Jusin154_Team3D/Client/Private/Box_Splesh.cpp | 6 +- .../Client/Private/Chair_Splesh.cpp | 5 +- Jusin154_Team3D/Client/Private/Decendo.cpp | 5 +- .../Client/Private/DecendoSide.cpp | 6 +- .../Client/Private/EffectObject.cpp | 168 +++++++- .../Client/Private/Effect_Container.cpp | 399 +++++++++++++++-- .../Client/Private/Goblin_Attack.cpp | 7 +- .../Client/Private/Goblin_Protego.cpp | 4 +- Jusin154_Team3D/Client/Private/Levioso.cpp | 11 +- .../Client/Private/LeviosoSide.cpp | 5 +- Jusin154_Team3D/Client/Private/Loader.cpp | 400 +++++++++--------- Jusin154_Team3D/Client/Private/Lumos.cpp | 13 +- Jusin154_Team3D/Client/Private/MageSide.cpp | 6 +- .../Client/Private/Mage_Down_Attack.cpp | 7 +- .../Client/Private/Mage_Nomal_Attack.cpp | 7 +- Jusin154_Team3D/Client/Private/NomalJap.cpp | 9 +- .../Client/Private/NomalJapSide.cpp | 5 +- Jusin154_Team3D/Client/Private/Protego.cpp | 6 +- Jusin154_Team3D/Client/Private/Revelio.cpp | 7 +- Jusin154_Team3D/Client/Private/StunEffect.cpp | 6 +- .../Client/Private/TrailObject.cpp | 78 +++- Jusin154_Team3D/Client/Private/Troll.cpp | 55 ++- Jusin154_Team3D/Client/Private/TrollSwing.cpp | 6 +- .../Client/Private/Troll_Nomal_Smoke.cpp | 6 +- .../Client/Private/Troll_Rush_Hit.cpp | 7 +- Jusin154_Team3D/Client/Private/WandEnd.cpp | 6 +- Jusin154_Team3D/Client/Public/Client_Struct.h | 191 +++++++++ Jusin154_Team3D/Client/Public/EffectObject.h | 138 +----- Jusin154_Team3D/Client/Public/EffectParts.h | 1 + .../Client/Public/Effect_Container.h | 41 ++ Jusin154_Team3D/Client/Public/NomalJap.h | 8 +- Jusin154_Team3D/Client/Public/TrailObject.h | 82 +--- .../Engine/Private/Instance_Model.cpp | 10 + Jusin154_Team3D/Engine/Private/Trail.cpp | 6 + .../Engine/Public/Instance_Model.h | 1 + Jusin154_Team3D/Engine/Public/Trail.h | 1 + 39 files changed, 1189 insertions(+), 553 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp index 49a0f1db5..340d6c908 100644 --- a/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp +++ b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp @@ -18,6 +18,8 @@ CBarral_Splesh::CBarral_Splesh(const CBarral_Splesh& rhs) HRESULT CBarral_Splesh::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Barral"))) + return E_FAIL; return S_OK; @@ -31,11 +33,9 @@ HRESULT CBarral_Splesh::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Barral"))) + if (FAILED(Create_Effect())) return E_FAIL; - m_wstrEffectName = L"Barral_Splesh"; diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp index 4dc21fca4..5b57f7d1e 100644 --- a/Jusin154_Team3D/Client/Private/Bombard.cpp +++ b/Jusin154_Team3D/Client/Private/Bombard.cpp @@ -21,6 +21,9 @@ CBombard::CBombard(const CBombard& rhs) HRESULT CBombard::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard"))) + return E_FAIL; + return S_OK; } @@ -32,13 +35,11 @@ HRESULT CBombard::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - m_iSkillType = ENUM_CLASS(SKILL_TYPE::BOMBARDA); - - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard"))) + + if (FAILED(Create_Effect())) return E_FAIL; + m_iSkillType = ENUM_CLASS(SKILL_TYPE::BOMBARDA); m_wstrEffectName = L"Bombard"; diff --git a/Jusin154_Team3D/Client/Private/BombardSide.cpp b/Jusin154_Team3D/Client/Private/BombardSide.cpp index 93b3e0ef0..9e44140a2 100644 --- a/Jusin154_Team3D/Client/Private/BombardSide.cpp +++ b/Jusin154_Team3D/Client/Private/BombardSide.cpp @@ -21,6 +21,9 @@ CBombardSide::CBombardSide(const CBombardSide& rhs) HRESULT CBombardSide::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/BombardaSide"))) + return E_FAIL; + return S_OK; } @@ -33,8 +36,7 @@ HRESULT CBombardSide::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/BombardaSide"))) + if (FAILED(Create_Effect())) return E_FAIL; m_wstrEffectName = L"BombardSide"; diff --git a/Jusin154_Team3D/Client/Private/Box_Splesh.cpp b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp index 4d516417d..27ca4d715 100644 --- a/Jusin154_Team3D/Client/Private/Box_Splesh.cpp +++ b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp @@ -19,6 +19,9 @@ CBox_Splesh::CBox_Splesh(const CBox_Splesh& rhs) HRESULT CBox_Splesh::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Box"))) + return E_FAIL; + return S_OK; } @@ -31,8 +34,7 @@ HRESULT CBox_Splesh::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Box"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp index bb123e405..7741d227a 100644 --- a/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp +++ b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp @@ -18,6 +18,8 @@ CChair_Splesh::CChair_Splesh(const CChair_Splesh& rhs) HRESULT CChair_Splesh::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Chair"))) + return E_FAIL; return S_OK; @@ -31,8 +33,7 @@ HRESULT CChair_Splesh::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Chair"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp index 449a67bd5..cb65b9416 100644 --- a/Jusin154_Team3D/Client/Private/Decendo.cpp +++ b/Jusin154_Team3D/Client/Private/Decendo.cpp @@ -25,6 +25,9 @@ CDecendo::CDecendo(const CDecendo& rhs) HRESULT CDecendo::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo"))) + return E_FAIL; + return S_OK; } @@ -37,7 +40,7 @@ HRESULT CDecendo::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo"))) + if (FAILED(Create_Effect())) return E_FAIL; m_iSkillType = ENUM_CLASS(SKILL_TYPE::DESCENDO); diff --git a/Jusin154_Team3D/Client/Private/DecendoSide.cpp b/Jusin154_Team3D/Client/Private/DecendoSide.cpp index 346b95904..481332cbf 100644 --- a/Jusin154_Team3D/Client/Private/DecendoSide.cpp +++ b/Jusin154_Team3D/Client/Private/DecendoSide.cpp @@ -22,6 +22,9 @@ CDecendoSide::CDecendoSide(const CDecendoSide& rhs) HRESULT CDecendoSide::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/DecendoSide"))) + return E_FAIL; + return S_OK; } @@ -34,8 +37,7 @@ HRESULT CDecendoSide::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/DecendoSide"))) + if (FAILED(Create_Effect())) return E_FAIL; m_wstrEffectName = L"DecendoSide"; diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index 264111807..3c71aee13 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "EffectObject.h" #include "GameInstance.h" +#include "Effect_Container.h" CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPartObject(pDevice, pContext) @@ -220,6 +221,143 @@ HRESULT CEffectObject::Render_Bloom() +HRESULT CEffectObject::Load(CEffect_Container::EFFECT_SAVE_INFO EffectSaveInfo, LEVEL eLevel) +{ + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pNoise_TextureCom); + SAFE_RELEASE(m_pMasking_TextureCom); + SAFE_RELEASE(m_pDissolve_TextureCom); + SAFE_RELEASE(m_pEmissive_TextureCom); + SAFE_RELEASE(m_pInstance_ModelCom); + + if (m_pLightCom != nullptr) + SAFE_RELEASE(m_pLightCom); + + m_EffectInfo = EffectSaveInfo.EffectInfo; + + m_EffectInfo.LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION); + m_EffectInfo.LightDesc.iLevel = ENUM_CLASS(eLevel); + + + if (m_EffectInfo.LightDesc.eType != LIGHT::DIRECTIONAL) // 0이 아닐때만 생성 + { + if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc))) + { + return E_FAIL; + } + + m_pLightCom->Set_LightIntensity(m_EffectInfo.fLightIntensity); + } + + if (m_EffectInfo.isDiffuse) + { + + m_strDiffuseName = EffectSaveInfo.wstrDiffuseName; + + if (m_strDiffuseName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strDiffuseName, + reinterpret_cast(&m_pDiffuse_TextureCom)))) + { + return E_FAIL; + } + } + + } + + if (m_EffectInfo.isNoise) + { + m_strNoiseName = EffectSaveInfo.wstrNoiseName; + + if (m_strNoiseName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strNoiseName, + reinterpret_cast(&m_pNoise_TextureCom)))) + return E_FAIL; + } + + } + + + if (m_EffectInfo.isMasking) + { + m_strMaskingName = EffectSaveInfo.wstrMaskingName; + + if (m_strMaskingName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strMaskingName, + reinterpret_cast(&m_pMasking_TextureCom)))) + { + return E_FAIL; + } + } + + } + + if (m_EffectInfo.isDissolve) + { + m_strDissolveName = EffectSaveInfo.wstrDissolveName; + + if (m_strDissolveName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strDissolveName, + reinterpret_cast(&m_pDissolve_TextureCom)))) + { + return E_FAIL; + } + } + + + } + + if (m_EffectInfo.isEmissive) + { + + m_strEmissiveName = EffectSaveInfo.wstrEmissiveName; + + if (m_strEmissiveName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strEmissiveName, + reinterpret_cast(&m_pEmissive_TextureCom)))) + { + + return E_FAIL; + } + } + + } + + if (m_EffectInfo.isDistortion) + { + + m_strDistortionName = EffectSaveInfo.wstrDistortionName;; + + if (m_strDistortionName.length() > 0) + { + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strDistortionName, + reinterpret_cast(&m_pDistortion_TextureCom)))) + { + + return E_FAIL; + } + } + } + + m_strModelName = EffectSaveInfo.wstrModelName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strModelName, + reinterpret_cast(&m_pInstance_ModelCom)))) + { + return E_FAIL;; + } + + + m_pInstance_ModelCom->Load_InstanceModel(EffectSaveInfo.InstanceModelInfo); + + return S_OK; +} + + HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) { SAFE_RELEASE(m_pDiffuse_TextureCom); @@ -299,9 +437,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strDiffuseName = szName; + m_strDiffuseName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strDiffuseName, reinterpret_cast(&m_pDiffuse_TextureCom)))) { CloseHandle(hFile); @@ -332,9 +470,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strNoiseName = szName; + m_strNoiseName = CMyTools::ToWstring(szName);; - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strNoiseName, reinterpret_cast(&m_pNoise_TextureCom)))) return E_FAIL; } @@ -361,9 +499,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strMaskingName = szName; + m_strMaskingName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strMaskingName, reinterpret_cast(&m_pMasking_TextureCom)))) { CloseHandle(hFile); @@ -392,9 +530,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strDissolveName = szName; + m_strDissolveName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel),m_strDissolveName, reinterpret_cast(&m_pDissolve_TextureCom)))) { CloseHandle(hFile); @@ -425,9 +563,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strEmissiveName = szName; + m_strEmissiveName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strEmissiveName, reinterpret_cast(&m_pEmissive_TextureCom)))) { CloseHandle(hFile); @@ -456,9 +594,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strDistortionName = szName; + m_strDistortionName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strDistortionName, reinterpret_cast(&m_pDistortion_TextureCom)))) { CloseHandle(hFile); @@ -486,9 +624,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return E_FAIL; } - m_strModelName = szName; + m_strModelName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strModelName, reinterpret_cast(&m_pInstance_ModelCom)))) { CloseHandle(hFile); @@ -507,8 +645,6 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel) return S_OK; } - - HRESULT CEffectObject::Bind_ShaderResources() { if (m_pParentMatrix != nullptr) diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp index 46c6cdf10..fb9f1c131 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -14,7 +14,9 @@ CEffect_Container::CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* } CEffect_Container::CEffect_Container(const CEffect_Container& rhs) - : CContainerObject(rhs) + : CContainerObject(rhs), + m_EffectsInfo(rhs.m_EffectsInfo), + m_TrailsInfo(rhs.m_TrailsInfo) { } @@ -150,72 +152,377 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) if (!strcmp(strExt.c_str(), "trail")) { - CTrailObject* pTrail = nullptr; + + Load_Trail_Data(strEffectPath.c_str()); - CPartObject::PARTOBJECT_DESC PartsDesc{}; + m_TrailsInfo.back().wstrTrailName = CMyTools::ToWstring(strEffectName); + continue; + } - PartsDesc.pParentTransform = m_pTransformCom; + ///////////////////////////// + + _string strFilePath = strEffectPath; + Load_Data(strFilePath.c_str()); + + m_EffectsInfo.back().wstrEffectName = CMyTools::ToWstring(strEffectName); + } - if (FAILED(Add_PartObject(strEffectName, g_iStaticLevel, &pTrail, &PartsDesc))) { - assert(false); + CloseHandle(hFile); + + return S_OK; +} + +HRESULT CEffect_Container::Load_Data(const _char* pPath) +{ + _string strPerfectFilePath = pPath; + + HANDLE hFile = CreateFileW( + CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름 + GENERIC_READ, // 읽기 모드 + FILE_SHARE_READ, // 다른 프로세스도 읽기 가능 + NULL, + OPEN_EXISTING, // 기존 파일 열기 + FILE_ATTRIBUTE_NORMAL, + NULL + ); + + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK); + return E_FAIL; + } + + // 나중에 패키징할때 패스를 저장할거임 + + EFFECT_SAVE_INFO EffectSaveInfo = {}; + + DWORD dwByte(0); + + if (!ReadFile(hFile, &EffectSaveInfo.EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (EffectSaveInfo.EffectInfo.isDiffuse) + { + size_t iComponentLength = {}; + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + EffectSaveInfo.wstrDiffuseName = CMyTools::ToWstring(szName); + } + + + } + + if (EffectSaveInfo.EffectInfo.isNoise) + { + size_t iComponentLength = {}; + + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + EffectSaveInfo.wstrNoiseName = CMyTools::ToWstring(szName); + } + + + } + + if (EffectSaveInfo.EffectInfo.isMasking) + { + size_t iComponentLength = {}; + + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } - /*이펙트 로드 로드*/ - size_t iPos = {}; - - while ((iPos = strEffectPath.find(".trail")) != std::string::npos) { - strEffectPath.erase(iPos, 6); - }; - - - if (FAILED(pTrail->Load_Trail(strEffectPath.c_str() , static_cast(NEXT_LEVEL)))) - { - Safe_Release(pTrail); - continue; - } - - Safe_Release(pTrail); - - continue; + EffectSaveInfo.wstrMaskingName = CMyTools::ToWstring(szName); } - ///////////////////////////// + } - CEffectParts* pEffectParts = nullptr; + if (EffectSaveInfo.EffectInfo.isDissolve) + { + size_t iComponentLength = {}; - CPartObject::PARTOBJECT_DESC PartsDesc{}; - - PartsDesc.pParentTransform = m_pTransformCom; - - /*이펙트 껍데기 생성*/ - - if (FAILED(Add_PartObject(strEffectName, g_iStaticLevel, &pEffectParts, &PartsDesc))) { - assert(false); + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } - /*이펙트 로드 로드*/ - size_t iPosition = {}; - _string strFilePath = strEffectPath; - - while ((iPosition = strFilePath.find(".bin")) != std::string::npos) { - strFilePath.erase(iPosition, 4); - }; - - - if (FAILED(pEffectParts->Load(strFilePath.c_str(), static_cast(NEXT_LEVEL)))) + if (iComponentLength != 0) { - Safe_Release(pEffectParts); - continue; + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + EffectSaveInfo.wstrDissolveName = CMyTools::ToWstring(szName); } - Safe_Release(pEffectParts); } + if (EffectSaveInfo.EffectInfo.isEmissive) + { + size_t iComponentLength = {}; + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + EffectSaveInfo.wstrEmissiveName = CMyTools::ToWstring(szName); + } + + + } + + if (EffectSaveInfo.EffectInfo.isDistortion) + { + size_t iComponentLength = {}; + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + EffectSaveInfo.wstrDistortionName = CMyTools::ToWstring(szName); + } + + + } + + size_t iComponentLength = {}; + + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)(DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); + return E_FAIL; + } + + + EffectSaveInfo.wstrModelName = CMyTools::ToWstring(szName); + } + + if (!ReadFile(hFile, &EffectSaveInfo.InstanceModelInfo, sizeof(CInstance_Model::INSTANCE_DESC), &dwByte, nullptr)) { + return E_FAIL; + } + + + CloseHandle(hFile); + + m_EffectsInfo.push_back(EffectSaveInfo); + + return S_OK; +} + +HRESULT CEffect_Container::Create_Effect() +{ + CEffectParts* pEffectParts = nullptr; + CTrailObject* pTrail = nullptr; + + CPartObject::PARTOBJECT_DESC PartsDesc{}; + + PartsDesc.pParentTransform = m_pTransformCom; + + /*이펙트 껍데기 생성*/ + + + + for (auto& EffectInfo : m_EffectsInfo) + { + + if (FAILED(Add_PartObject(CMyTools::ToString(EffectInfo.wstrEffectName), g_iStaticLevel, &pEffectParts, &PartsDesc))) { + return E_FAIL; + } + + pEffectParts->Load(EffectInfo, static_cast(NEXT_LEVEL)); + + Safe_Release(pEffectParts); + } + + for (auto& TrailInfo : m_TrailsInfo) + { + if (FAILED(Add_PartObject(CMyTools::ToString(TrailInfo.wstrTrailName), g_iStaticLevel, &pTrail, &PartsDesc))) { + return E_FAIL; + } + + pTrail->Load_Trail(TrailInfo, static_cast(NEXT_LEVEL)); + + Safe_Release(pTrail); + } + + + return S_OK; +} + +HRESULT CEffect_Container::Load_Trail_Data(const _char* pPath) +{ + _string strPerfectFilePath = pPath; + + DWORD dwByte(0); + + HANDLE hFile = CreateFileW( + CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름 + GENERIC_READ, // 읽기 모드 + FILE_SHARE_READ, // 다른 프로세스도 읽기 가능 + NULL, + OPEN_EXISTING, // 기존 파일 열기 + FILE_ATTRIBUTE_NORMAL, + NULL + ); + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK); + return E_FAIL; + } + + TRAIL_SAVE_INFO Trail_Save_Info = {}; + + + size_t iComponentLength = {}; + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + Trail_Save_Info.wstrDiffuseName = CMyTools::ToWstring(szName); + } + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + Trail_Save_Info.wstrNoiseName = CMyTools::ToWstring(szName); + + } + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + Trail_Save_Info.wstrMaskingName = CMyTools::ToWstring(szName); + } + + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + Trail_Save_Info.wstrDistortionName = CMyTools::ToWstring(szName); + + } + + if (!ReadFile(hFile, &Trail_Save_Info.TrailComponentDesc, sizeof(CTrail::TRAIL_DESC), &dwByte, nullptr)) { + return E_FAIL; + } + + if (!ReadFile(hFile, &Trail_Save_Info.TrailDesc, sizeof(TRAIL_INFO), &dwByte, nullptr)) { + return E_FAIL; + } + + + m_TrailsInfo.push_back(Trail_Save_Info); + CloseHandle(hFile); return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp b/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp index ac7f6ba94..a4e3e0eb7 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp @@ -20,6 +20,9 @@ CGoblin_Attack::CGoblin_Attack(const CGoblin_Attack& rhs) HRESULT CGoblin_Attack::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack"))) + return E_FAIL; + return S_OK; } @@ -32,11 +35,11 @@ HRESULT CGoblin_Attack::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack"))) + if (FAILED(Create_Effect())) return E_FAIL; + m_wstrEffectName = L"GoblinAttack"; m_pPT1 = Get_PartObject("Goblin_Particle"); diff --git a/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp index 4bcbad546..923f66544 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp @@ -17,6 +17,8 @@ CGoblin_Protego::CGoblin_Protego(const CGoblin_Protego& rhs) HRESULT CGoblin_Protego::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinProtego"))) + return E_FAIL; return S_OK; @@ -30,7 +32,7 @@ HRESULT CGoblin_Protego::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinProtego"))) + if (FAILED(Create_Effect())) return E_FAIL; m_pSphere = Get_PartObject("ProtegoSphere"); diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp index 66212275a..b9574384e 100644 --- a/Jusin154_Team3D/Client/Private/Levioso.cpp +++ b/Jusin154_Team3D/Client/Private/Levioso.cpp @@ -23,8 +23,10 @@ CLevioso::CLevioso(const CLevioso& rhs) HRESULT CLevioso::Initialize_Prototype() { - return S_OK; + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Levioso"))) + return E_FAIL; + return S_OK; } HRESULT CLevioso::Initialize(void* pArg) @@ -35,12 +37,11 @@ HRESULT CLevioso::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - m_iSkillType = ENUM_CLASS(SKILL_TYPE::LEVIOSO); - - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Levioso"))) + if (FAILED(Create_Effect())) return E_FAIL; + m_iSkillType = ENUM_CLASS(SKILL_TYPE::LEVIOSO); + m_pLeviosoPJ_0 = Get_PartObject("Levioso_PJ0"); m_pTrail_PT_0 = Get_PartObject("Trail_PT0"); diff --git a/Jusin154_Team3D/Client/Private/LeviosoSide.cpp b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp index a49fc9a6e..77f3a1dc6 100644 --- a/Jusin154_Team3D/Client/Private/LeviosoSide.cpp +++ b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp @@ -20,6 +20,8 @@ CLeviosoSide::CLeviosoSide(const CLeviosoSide& rhs) HRESULT CLeviosoSide::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/LeviosoSide"))) + return E_FAIL; return S_OK; @@ -33,8 +35,7 @@ HRESULT CLeviosoSide::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/LeviosoSide"))) + if (FAILED(Create_Effect())) return E_FAIL; m_wstrEffectName = L"LeviosoSide"; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index c1811a8c2..de380fbee 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -870,206 +870,206 @@ HRESULT CLoader::Loading_For_GamePlay() m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png"); } #pragma endregion -#pragma region UI_ANI - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) - { - return E_FAIL; - } - - 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)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) - { - return E_FAIL; - } - -#pragma endregion +//#pragma region UI_ANI +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) +// { +// return E_FAIL; +// } +// +// 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)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) +// { +// return E_FAIL; +// } +// +//#pragma endregion #pragma region TERRAIN_TEXTURE /* Terrain_Diffuse */ diff --git a/Jusin154_Team3D/Client/Private/Lumos.cpp b/Jusin154_Team3D/Client/Private/Lumos.cpp index 9159605c9..de17df799 100644 --- a/Jusin154_Team3D/Client/Private/Lumos.cpp +++ b/Jusin154_Team3D/Client/Private/Lumos.cpp @@ -17,9 +17,11 @@ CLumos::CLumos(const CLumos& rhs) HRESULT CLumos::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Lumos"))) + return E_FAIL; + return S_OK; - } HRESULT CLumos::Initialize(void* pArg) @@ -30,8 +32,7 @@ HRESULT CLumos::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Lumos"))) + if (FAILED(Create_Effect())) return E_FAIL; m_wstrEffectName = L"Lumos"; @@ -67,6 +68,12 @@ void CLumos::Update(_float fTimeDelta) __super::Update(fTimeDelta); Update_Event(fTimeDelta); + + if (910!= m_pOwner->Get_Owner()->Get_Component()->Get_SecondAnimIndex()) + { + _int iIndex = m_pOwner->Get_Owner()->Get_Component()->Get_SecondAnimIndex(); + m_bVisible = false; + } } void CLumos::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/MageSide.cpp b/Jusin154_Team3D/Client/Private/MageSide.cpp index ae98ce65e..af2994919 100644 --- a/Jusin154_Team3D/Client/Private/MageSide.cpp +++ b/Jusin154_Team3D/Client/Private/MageSide.cpp @@ -20,6 +20,9 @@ CMageSide::CMageSide(const CMageSide& rhs) HRESULT CMageSide::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide"))) + return E_FAIL; + return S_OK; } @@ -32,8 +35,7 @@ HRESULT CMageSide::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp index 14c4221e7..a203b5d76 100644 --- a/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp +++ b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp @@ -22,6 +22,9 @@ CMage_Down_Attack::CMage_Down_Attack(const CMage_Down_Attack& rhs) HRESULT CMage_Down_Attack::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack"))) + return E_FAIL; + return S_OK; } @@ -34,11 +37,9 @@ HRESULT CMage_Down_Attack::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack"))) + if (FAILED(Create_Effect())) return E_FAIL; - m_wstrEffectName = L"DownAttack"; diff --git a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp index 90b466488..810b37b30 100644 --- a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp +++ b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp @@ -22,6 +22,10 @@ CMage_Nomal_Attack::CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs) HRESULT CMage_Nomal_Attack::Initialize_Prototype() { + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack"))) + return E_FAIL; + return S_OK; } @@ -34,8 +38,7 @@ HRESULT CMage_Nomal_Attack::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index 39a435990..2bc1ae9f6 100644 --- a/Jusin154_Team3D/Client/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp @@ -22,6 +22,9 @@ CNomalJap::CNomalJap(const CNomalJap& rhs) HRESULT CNomalJap::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))) { + return E_FAIL; + } return S_OK; @@ -35,14 +38,14 @@ HRESULT CNomalJap::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; + if (FAILED(Create_Effect())) + return E_FAIL; + m_iSkillType = ENUM_CLASS(SKILL_TYPE::JAP); m_wstrEffectName = L"Nomal_Jap"; - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))) { - return E_FAIL; - } m_pProjectile_Side = Get_PartObject("JapProjSide"); diff --git a/Jusin154_Team3D/Client/Private/NomalJapSide.cpp b/Jusin154_Team3D/Client/Private/NomalJapSide.cpp index 98c485063..f88375f27 100644 --- a/Jusin154_Team3D/Client/Private/NomalJapSide.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJapSide.cpp @@ -20,9 +20,10 @@ CNomalJapSide::CNomalJapSide(const CNomalJapSide& rhs) HRESULT CNomalJapSide::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/JapsideEffect"))) + return E_FAIL; return S_OK; - } HRESULT CNomalJapSide::Initialize(void* pArg) @@ -34,7 +35,7 @@ HRESULT CNomalJapSide::Initialize(void* pArg) return E_FAIL; - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/JapsideEffect"))) + if (FAILED(Create_Effect())) return E_FAIL; m_wstrEffectName = L"JapSideEffect"; diff --git a/Jusin154_Team3D/Client/Private/Protego.cpp b/Jusin154_Team3D/Client/Private/Protego.cpp index 8d6cdb002..46cec841b 100644 --- a/Jusin154_Team3D/Client/Private/Protego.cpp +++ b/Jusin154_Team3D/Client/Private/Protego.cpp @@ -18,6 +18,9 @@ CProtego::CProtego(const CProtego& rhs) HRESULT CProtego::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Protego"))) + return E_FAIL; + return S_OK; } @@ -30,8 +33,7 @@ HRESULT CProtego::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Protego"))) + if (FAILED(Create_Effect())) return E_FAIL; m_pSphere = Get_PartObject("ProtegoSphere"); diff --git a/Jusin154_Team3D/Client/Private/Revelio.cpp b/Jusin154_Team3D/Client/Private/Revelio.cpp index b8d35c78a..118d337b9 100644 --- a/Jusin154_Team3D/Client/Private/Revelio.cpp +++ b/Jusin154_Team3D/Client/Private/Revelio.cpp @@ -19,6 +19,9 @@ CRevelio::CRevelio(const CRevelio& rhs) HRESULT CRevelio::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Revelio"))) + return E_FAIL; + return S_OK; } @@ -31,10 +34,10 @@ HRESULT CRevelio::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Revelio"))) + if (FAILED(Create_Effect())) return E_FAIL; + m_pRevelioPT_Y = Get_PartObject("WandPT_Y"); m_pRevelioPT_B = Get_PartObject("WandPT_B"); m_pRevelioPT_R = Get_PartObject("WandPT_R"); diff --git a/Jusin154_Team3D/Client/Private/StunEffect.cpp b/Jusin154_Team3D/Client/Private/StunEffect.cpp index 5db5fb195..04e22c8e9 100644 --- a/Jusin154_Team3D/Client/Private/StunEffect.cpp +++ b/Jusin154_Team3D/Client/Private/StunEffect.cpp @@ -19,6 +19,9 @@ CStunEffect::CStunEffect(const CStunEffect& rhs) HRESULT CStunEffect::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun"))) + return E_FAIL; + return S_OK; } @@ -31,8 +34,7 @@ HRESULT CStunEffect::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp index 50ec43e8d..6e5c66e94 100644 --- a/Jusin154_Team3D/Client/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp @@ -3,6 +3,7 @@ #include "GameInstance.h" #include "Trail.h" +#include "Effect_Container.h" CTrailObject::CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -96,6 +97,67 @@ void CTrailObject::Late_Update(_float fTimeDelta) } +HRESULT CTrailObject::Load_Trail(CEffect_Container::TRAIL_SAVE_INFO Trail_Save_Info, LEVEL eLevel) +{ + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pMasking_TextureCom); + SAFE_RELEASE(m_pNoise_TextureCom); + SAFE_RELEASE(m_pDistortion_TextureCom); + + + if (Trail_Save_Info.wstrDiffuseName.length() != 0) + { + + m_strTrailDiffuseName = Trail_Save_Info.wstrDiffuseName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailDiffuseName, + reinterpret_cast(&m_pDiffuse_TextureCom)))) + return E_FAIL; + } + + if (Trail_Save_Info.wstrNoiseName.length() != 0) + { + + m_strTrailNoiseName = Trail_Save_Info.wstrNoiseName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailNoiseName, + reinterpret_cast(&m_pNoise_TextureCom)))) + return E_FAIL; + } + + + if (Trail_Save_Info.wstrMaskingName.length() != 0) + { + + m_strTrailMaskingName = Trail_Save_Info.wstrMaskingName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailMaskingName, + reinterpret_cast(&m_pMasking_TextureCom)))) + return E_FAIL; + } + + + if (Trail_Save_Info.wstrDistortionName.length() != 0) + { + + m_strTrailDistortionName = Trail_Save_Info.wstrDistortionName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailDistortionName, + reinterpret_cast(&m_pDistortion_TextureCom)))) + return E_FAIL; + + + } + + m_pTrailCom->Load_Trail(Trail_Save_Info.TrailComponentDesc); + + m_TrailInfo = Trail_Save_Info.TrailDesc; + + m_pTrailCom->ReStructVB(m_TrailInfo.iNumVertex); + + return S_OK; +} + HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) { SAFE_RELEASE(m_pDiffuse_TextureCom); @@ -140,9 +202,9 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) return E_FAIL; } - m_strTrailDiffuseName = szName; + m_strTrailDiffuseName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailDiffuseName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailDiffuseName, reinterpret_cast(&m_pDiffuse_TextureCom)))) return E_FAIL; } @@ -159,9 +221,9 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) return E_FAIL; } - m_strTrailNoiseName = szName; + m_strTrailNoiseName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailNoiseName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailNoiseName, reinterpret_cast(&m_pNoise_TextureCom)))) return E_FAIL; @@ -179,9 +241,9 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) return E_FAIL; } - m_strTrailMaskingName = szName; + m_strTrailMaskingName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailMaskingName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailMaskingName, reinterpret_cast(&m_pMasking_TextureCom)))) return E_FAIL; } @@ -199,9 +261,9 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) return E_FAIL; } - m_strTrailDistortionName = szName; + m_strTrailDistortionName = CMyTools::ToWstring(szName); - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailDistortionName), + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strTrailDistortionName , reinterpret_cast(&m_pDistortion_TextureCom)))) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index dff963c67..06902dbb3 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -340,26 +340,43 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); - _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); - auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); - switch (iSkillType) + CEffect_Container* pEffect_Container = dynamic_cast(pOther); + + pair<_float, _float> damagePair = {}; + + if (pEffect_Container != nullptr) { - case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::FLIPENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); - break; - case ENUM_CLASS(SKILL_TYPE::JAP): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); - break; - default: - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); - break; + _uint iSkillType = pEffect_Container->Get_SkillType(); + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + switch (iSkillType) + { + case ENUM_CLASS(SKILL_TYPE::DESCENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::FLIPENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + break; + default: + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); + break; + } } + + + CMapElement_Interactable* pProps = dynamic_cast(pOther); + + if (pProps != nullptr) + { + m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + } + m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { @@ -367,6 +384,8 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) return; } m_pFSM->Change_State(FSMSTATE::HIT); + + } void CTroll::OnHit(CGameObject* pOther, CGameObject* pCaller) diff --git a/Jusin154_Team3D/Client/Private/TrollSwing.cpp b/Jusin154_Team3D/Client/Private/TrollSwing.cpp index 3af43f8a4..1be9ce040 100644 --- a/Jusin154_Team3D/Client/Private/TrollSwing.cpp +++ b/Jusin154_Team3D/Client/Private/TrollSwing.cpp @@ -22,6 +22,9 @@ CTrollSwing::CTrollSwing(const CTrollSwing& rhs) HRESULT CTrollSwing::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollSwing"))) + return E_FAIL; + return S_OK; } @@ -34,8 +37,7 @@ HRESULT CTrollSwing::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollSwing"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp index 47fea75e4..061d54e27 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp @@ -19,6 +19,9 @@ CTroll_Nomal_Smoke::CTroll_Nomal_Smoke(const CTroll_Nomal_Smoke& rhs) HRESULT CTroll_Nomal_Smoke::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollNomalSmoke"))) + return E_FAIL; + return S_OK; } @@ -31,8 +34,7 @@ HRESULT CTroll_Nomal_Smoke::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollNomalSmoke"))) + if (FAILED(Create_Effect())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp index 3eb510cec..4cfc6f8b7 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp @@ -22,6 +22,9 @@ CTroll_Rush_Hit::CTroll_Rush_Hit(const CTroll_Rush_Hit& rhs) HRESULT CTroll_Rush_Hit::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollRush"))) + return E_FAIL; + return S_OK; } @@ -34,11 +37,9 @@ HRESULT CTroll_Rush_Hit::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollRush"))) + if (FAILED(Create_Effect())) return E_FAIL; - m_wstrEffectName = L"Troll_Nomal_Smoke"; diff --git a/Jusin154_Team3D/Client/Private/WandEnd.cpp b/Jusin154_Team3D/Client/Private/WandEnd.cpp index 366c24ff3..fecd9d466 100644 --- a/Jusin154_Team3D/Client/Private/WandEnd.cpp +++ b/Jusin154_Team3D/Client/Private/WandEnd.cpp @@ -17,6 +17,8 @@ CWandEnd::CWandEnd(const CWandEnd& rhs) HRESULT CWandEnd::Initialize_Prototype() { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/WandEnd"))) + return E_FAIL; return S_OK; @@ -30,10 +32,10 @@ HRESULT CWandEnd::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/WandEnd"))) + if (FAILED(Create_Effect())) return E_FAIL; + m_wstrEffectName = L"Lumos"; m_pWandPt = Get_PartObject("WandParticle_R"); diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 81caf6be1..b71d1d2b5 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -65,4 +65,195 @@ namespace Client _float fDamage{}; DAMAGE_TYPE eType = DAMAGE_TYPE::NOMAL; }DAMAGE_INFO; + + + typedef struct tagEffectInfo + { + _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; + + _float2 vDiffuseUVGainAmount = {}; + _float2 vMaskingUVGainAmount = {}; + _float2 vNoiseUVGainAmount = {}; + + _float2 vDistortionTime = {}; + _float2 vMaskDistortionUVGainAmount = {}; + + _float2 vUVCutting = { 1.f ,1.f }; + _float2 vUVMaskCutting = { 1.f ,1.f }; + + _int iMaskMoveLerpOption = { 0 }; + _int iDiffuseMoveLerpOption = { 0 }; + _int iNoiseMoveLerpOption = { 0 }; + + _int iMaskDistortionMoveLerpOption = { 0 }; + _int iDiffuseDistortionMoveLerpOption = { 0 }; + + _int iBlurWeight = { 0 }; + + + _bool isDiffuse = {}; + _bool isMasking = {}; + _bool isDissolve = {}; + _bool isNoise = {}; + _bool isEmissive = {}; + _bool isDistortion = {}; + _bool isDiffuseUVMove = {}; + _bool isNoiseUVMove = {}; + _bool isMaskUVMove = {}; + _bool isBlur = {}; + _bool isBillboard = {}; + + _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; + _float fDiffuseAlpha = { 1.f }; + _float fBlurIntensity = {}; + _float fNoiseDistortionIntensity = {}; + _float fEmissiveStrength = { 0.f }; + + LIGHT_DESC LightDesc = {}; + RENDER eRenderOrder = { RENDER::EFFECT }; + + _bool isReverseDissolve = {}; + + EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; + + _bool isEmissiveDissolve = { false }; + + _bool isMaskClampSample = { false }; + _bool isNoiseColor = { false }; + _bool isNoiseAlpha = { false }; + _bool isNomalDissolve = {}; + + _float fSoftenExp = { 1.31429f }; + _float fSoftStrength = {}; + _float fCoreBoost = {}; + _float fRadius = {}; + + _float fSoftMaskEdge = {}; + _float fSoftMask = {}; + + _bool isEmissiveDissolveReverse = { false }; + _bool isOnlyBlur = { false }; + + SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; + + _bool isBlurNoEmissive = {}; + _bool isTexBlur = {}; + _bool isBlurDissolve = {}; + _bool isBlurReverseDissolve = {}; + + _float fBluringStrength = { 0.01f }; + + _bool isBloom = {}; + _bool isBloomDissolve = {}; + _bool isBloomReverseDissolve = {}; + _float fBloomStrength = {}; + BLOOM_TYPE eBloomType = {}; + + + _float fDissolveDelay = {}; + _float fReverseDissolveDelay = {}; + _float2 vDissolveUVGainAmount = {}; + _bool isDissolveMove = {}; + + _float3 vDissolveValue = {}; + + + _float2 vPadding0 = {}; + + _float fLightDeley = {}; + _float fLightIntensity = {}; + _float isLightTime = { 0.f }; + _bool isLightDissolve = {}; + + _bool isPadding0 = {}; + + _float4 vDissolveColor = {}; + _float2 vDissolveColorCut = {}; + + _float fEmissiveColorCut = {}; + + _float2 vPadding1 = {}; + _float4 vNoiseColor = {}; + _float4 vPadding3 = {}; + _float4 vPadding4 = {}; + _float4 vPadding5 = {}; + + _bool isPadding1 = {}; + _bool isPadding2 = {}; + _bool isPadding3 = {}; + _bool isPadding4 = {}; + }EFFECT_INFO; + + typedef struct tagTrailInfo + { + EFFECT_TYPE eEffectType = { EFFECT_TYPE::TRAIL }; + /* 디퓨즈 */ + _bool isDiffuse = {}; + _float fDiffuseAlpha = { 1.f }; + _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; + + /* 마스크 */ + _bool isMask = {}; + _float fSoftMaskEdge = {}; + _float fSoftMask = {}; + + /* 노이즈 */ + _bool isNoise = {}; + _bool isNoiseColor = { false }; + _bool isNoiseAlpha = { false }; + _float fNoiseStrength = {}; + + /* 디스 토션 */ + _bool isDistortion = {}; + _float2 vDistortionTime = {}; + _float2 vDiffuseDistortioUVAmount = {}; + _float2 vMaskDistortionUVAmount = {}; + _float fDistortionIntensity = {}; + + /* 이미시브 */ + _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; + + _float fEmissiveStrength = { 0.f }; + _float fSoftenExp = { 1.31429f }; + _float fSoftStrength = {}; + _float fCoreBoost = {}; + _float fRadius = {}; + + + /* 블러 */ + _bool isBlur = {}; + _bool isOnlyBlur = { false }; + _float fBlurIntensity = {}; + _int iBlurWeight = {}; + + /* 블룸 */ + _bool isBloom = {}; + + _bool isBloomDissolve = {}; + _bool isBloomReverseDissolve = {}; + + _float fBloomStrength = {}; + + BLOOM_TYPE eBloomType = {}; + _float2 vBloomTime = {}; + + _int iNumVertex = {}; + + + RENDER eRenderOrder = { RENDER::EFFECT }; + SHADER_PASS_POSTEX eShaderPass = { SHADER_PASS_POSTEX::TRAIL }; + + _float3 vPadding0 = {}; + _float3 vPadding1 = {}; + _float3 vPadding2 = {}; + + _float fPadding0 = {}; + _float fPadding1 = {}; + _float fPadding2 = {}; + + _bool isPadding0 = {}; + _bool isPadding1 = {}; + _bool isPadding2 = {}; + + }TRAIL_INFO; }; diff --git a/Jusin154_Team3D/Client/Public/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h index 055336155..9fca23590 100644 --- a/Jusin154_Team3D/Client/Public/EffectObject.h +++ b/Jusin154_Team3D/Client/Public/EffectObject.h @@ -2,6 +2,7 @@ #include "Client_Define.h" #include "PartObject.h" +#include "Effect_Container.h" NS_BEGIN(Engine) class CInstance_Model; @@ -15,125 +16,6 @@ NS_BEGIN(Client) class CEffectObject abstract : public CPartObject { -public: - typedef struct tagEffectInfo - { - _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; - - _float2 vDiffuseUVGainAmount = {}; - _float2 vMaskingUVGainAmount = {}; - _float2 vNoiseUVGainAmount = {}; - - _float2 vDistortionTime = {}; - _float2 vMaskDistortionUVGainAmount = {}; - - _float2 vUVCutting = { 1.f ,1.f }; - _float2 vUVMaskCutting = { 1.f ,1.f }; - - _int iMaskMoveLerpOption = { 0 }; - _int iDiffuseMoveLerpOption = { 0 }; - _int iNoiseMoveLerpOption = { 0 }; - - _int iMaskDistortionMoveLerpOption = { 0 }; - _int iDiffuseDistortionMoveLerpOption = { 0 }; - - _int iBlurWeight = { 0 }; - - - _bool isDiffuse = {}; - _bool isMasking = {}; - _bool isDissolve = {}; - _bool isNoise = {}; - _bool isEmissive = {}; - _bool isDistortion = {}; - _bool isDiffuseUVMove = {}; - _bool isNoiseUVMove = {}; - _bool isMaskUVMove = {}; - _bool isBlur = {}; - _bool isBillboard = {}; - - _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; - _float fDiffuseAlpha = { 1.f }; - _float fBlurIntensity = {}; - _float fNoiseDistortionIntensity = {}; - _float fEmissiveStrength = { 0.f }; - - LIGHT_DESC LightDesc = {}; - RENDER eRenderOrder = { RENDER::EFFECT }; - - _bool isReverseDissolve = {}; - - EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; - - _bool isEmissiveDissolve = { false }; - - _bool isMaskClampSample = { false }; - _bool isNoiseColor = { false }; - _bool isNoiseAlpha = { false }; - _bool isNomalDissolve = {}; - - _float fSoftenExp = { 1.31429f }; - _float fSoftStrength = {}; - _float fCoreBoost = {}; - _float fRadius = {}; - - _float fSoftMaskEdge = {}; - _float fSoftMask = {}; - - _bool isEmissiveDissolveReverse = { false }; - _bool isOnlyBlur = { false }; - - SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; - - _bool isBlurNoEmissive = {}; - _bool isTexBlur = {}; - _bool isBlurDissolve = {}; - _bool isBlurReverseDissolve = {}; - - _float fBluringStrength = { 0.01f }; - - _bool isBloom = {}; - _bool isBloomDissolve = {}; - _bool isBloomReverseDissolve = {}; - _float fBloomStrength = {}; - BLOOM_TYPE eBloomType = {}; - - - _float fDissolveDelay = {}; - _float fReverseDissolveDelay = {}; - _float2 vDissolveUVGainAmount = {}; - _bool isDissolveMove = {}; - - _float3 vDissolveValue = {}; - - - _float2 vPadding0 = {}; - - _float fLightDeley = {}; - _float fLightIntensity = {}; - _float isLightTime = { 0.f }; - _bool isLightDissolve = {}; - - _bool isPadding0 = {}; - - _float4 vDissolveColor = {}; - _float2 vDissolveColorCut = {}; - - _float fEmissiveColorCut = {}; - - _float2 vPadding1 = {}; - _float4 vNoiseColor = {}; - _float4 vPadding3 = {}; - _float4 vPadding4 = {}; - _float4 vPadding5 = {}; - - _bool isPadding1 = {}; - _bool isPadding2 = {}; - _bool isPadding3 = {}; - _bool isPadding4 = {}; - }EFFECT_INFO; - - protected: CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CEffectObject(const CEffectObject& rhs); @@ -147,8 +29,8 @@ class CEffectObject abstract : public CPartObject virtual HRESULT Render_Blur() override; virtual HRESULT Render_Bloom() override; public: + HRESULT Load(CEffect_Container::EFFECT_SAVE_INFO EffectSaveInfo, LEVEL eLevel); HRESULT Load(const _char* pFilePath, LEVEL eLevel); - void Disable_Light(); void Add_Light(); void FollowParents(const _float4x4* pParentsMat, const _float4x4* pOffsetMat = nullptr); @@ -175,14 +57,14 @@ class CEffectObject abstract : public CPartObject _float4x4 m_FinalParentMatrix; protected: - EFFECT_INFO m_EffectInfo = {}; - _string m_strDiffuseName = {}; - _string m_strNoiseName = {}; - _string m_strMaskingName = {}; - _string m_strDissolveName = {}; - _string m_strModelName = {}; - _string m_strEmissiveName = {}; - _string m_strDistortionName = {}; + EFFECT_INFO m_EffectInfo = {}; + _wstring m_strDiffuseName = {}; + _wstring m_strNoiseName = {}; + _wstring m_strMaskingName = {}; + _wstring m_strDissolveName = {}; + _wstring m_strModelName = {}; + _wstring m_strEmissiveName = {}; + _wstring m_strDistortionName = {}; public: virtual void Free() override; diff --git a/Jusin154_Team3D/Client/Public/EffectParts.h b/Jusin154_Team3D/Client/Public/EffectParts.h index bd937d140..cd7cfd11d 100644 --- a/Jusin154_Team3D/Client/Public/EffectParts.h +++ b/Jusin154_Team3D/Client/Public/EffectParts.h @@ -3,6 +3,7 @@ #include "Client_Define.h" #include "EffectObject.h" + NS_BEGIN(Engine) class CModel; class CShader; diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h index ae284374e..6ba718be1 100644 --- a/Jusin154_Team3D/Client/Public/Effect_Container.h +++ b/Jusin154_Team3D/Client/Public/Effect_Container.h @@ -2,14 +2,49 @@ #include "Client_Define.h" #include "ContainerObject.h" +#include "Trail.h" NS_BEGIN(Engine) +class CInstance_Model; +class CTrail; NS_END NS_BEGIN(Client) class CEffect_Container abstract : public CContainerObject { +public: + typedef struct tagEffectSaveInfo + { + EFFECT_INFO EffectInfo = {}; + LIGHT_DESC LightInfo = {}; + + _wstring wstrDiffuseName = {}; + _wstring wstrNoiseName = {}; + _wstring wstrMaskingName = {}; + _wstring wstrDissolveName = {}; + _wstring wstrEmissiveName = {}; + _wstring wstrDistortionName = {}; + _wstring wstrModelName = {}; + + _wstring wstrEffectName = {}; + + CInstance_Model::INSTANCE_DESC InstanceModelInfo = {}; + }EFFECT_SAVE_INFO; + + typedef struct tagTrailSaveInfo + { + _wstring wstrDiffuseName = {}; + _wstring wstrNoiseName = {}; + _wstring wstrMaskingName = {}; + _wstring wstrDistortionName = {}; + + _wstring wstrTrailName = {}; + + CTrail::TRAIL_DESC TrailComponentDesc = {}; + TRAIL_INFO TrailDesc = {}; + }TRAIL_SAVE_INFO; + protected: CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CEffect_Container(const CEffect_Container& rhs); @@ -24,6 +59,9 @@ class CEffect_Container abstract : public CContainerObject HRESULT Load_Directory(const _char* pPath); virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr); HRESULT Load_Package(const _char* pPath); + HRESULT Load_Data(const _char* pPath); + HRESULT Create_Effect(); + HRESULT Load_Trail_Data(const _char* pPath); _uint Get_SkillType() const { return m_iSkillType; } void Reset_Light(); @@ -60,6 +98,9 @@ class CEffect_Container abstract : public CContainerObject _uint m_iSkillType = ENUM_CLASS(SKILL_TYPE::END); _bool m_bHasDamage = { false }; LOCKON_INFO m_Info = {}; +private: + vector m_EffectsInfo = {}; + vector m_TrailsInfo = {}; public: virtual void Free() override; }; diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h index f599fc6a6..f35e408ca 100644 --- a/Jusin154_Team3D/Client/Public/NomalJap.h +++ b/Jusin154_Team3D/Client/Public/NomalJap.h @@ -34,10 +34,10 @@ class CNomalJap final : public CEffect_Container class CInfoInstance* m_pInfoInstance = { nullptr }; _wstring m_wstrEffectName = {}; - _float4 m_vJapData[4] = { _float4(65.f , 330.f , 35.f , 20.f) - , _float4(55.f , 100.f , 55.f , 200.f) - , _float4(55.f , 0.f , 0.f , 0.f) - , _float4(65.f , 250.f , 35.f , 60.f) }; + _float4 m_vJapData[4] = { _float4(105.f , 330.f , 35.f , 20.f) + , _float4(95.f , 100.f , 55.f , 200.f) + , _float4(95.f , 0.f , 0.f , 0.f) + , _float4(105.f , 250.f , 35.f , 60.f) }; class CPartObject* m_pProjectile = {}; class CPartObject* m_pProjectile_Side = {}; diff --git a/Jusin154_Team3D/Client/Public/TrailObject.h b/Jusin154_Team3D/Client/Public/TrailObject.h index eacf2e3e4..653a1e806 100644 --- a/Jusin154_Team3D/Client/Public/TrailObject.h +++ b/Jusin154_Team3D/Client/Public/TrailObject.h @@ -2,6 +2,7 @@ #include "Client_Define.h" #include "EffectObject.h" +#include "Effect_Container.h" NS_BEGIN(Engine) class CShader; @@ -14,78 +15,7 @@ NS_BEGIN(Client) class CTrailObject final : public CPartObject { public: - typedef struct tagTrailInfo - { - EFFECT_TYPE eEffectType = { EFFECT_TYPE::TRAIL }; - /* 디퓨즈 */ - _bool isDiffuse = {}; - _float fDiffuseAlpha = { 1.f }; - _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; - /* 마스크 */ - _bool isMask = {}; - _float fSoftMaskEdge = {}; - _float fSoftMask = {}; - - /* 노이즈 */ - _bool isNoise = {}; - _bool isNoiseColor = { false }; - _bool isNoiseAlpha = { false }; - _float fNoiseStrength = {}; - - /* 디스 토션 */ - _bool isDistortion = {}; - _float2 vDistortionTime = {}; - _float2 vDiffuseDistortioUVAmount = {}; - _float2 vMaskDistortionUVAmount = {}; - _float fDistortionIntensity = {}; - - /* 이미시브 */ - _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; - - _float fEmissiveStrength = { 0.f }; - _float fSoftenExp = { 1.31429f }; - _float fSoftStrength = {}; - _float fCoreBoost = {}; - _float fRadius = {}; - - - /* 블러 */ - _bool isBlur = {}; - _bool isOnlyBlur = { false }; - _float fBlurIntensity = {}; - _int iBlurWeight = {}; - - /* 블룸 */ - _bool isBloom = {}; - - _bool isBloomDissolve = {}; - _bool isBloomReverseDissolve = {}; - - _float fBloomStrength = {}; - - BLOOM_TYPE eBloomType = {}; - _float2 vBloomTime = {}; - - _int iNumVertex = {}; - - - RENDER eRenderOrder = { RENDER::EFFECT }; - SHADER_PASS_POSTEX eShaderPass = { SHADER_PASS_POSTEX::TRAIL }; - - _float3 vPadding0 = {}; - _float3 vPadding1 = {}; - _float3 vPadding2 = {}; - - _float fPadding0 = {}; - _float fPadding1 = {}; - _float fPadding2 = {}; - - _bool isPadding0 = {}; - _bool isPadding1 = {}; - _bool isPadding2 = {}; - - }TRAIL_INFO; private: CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CTrailObject(const CTrailObject& rhs); @@ -98,9 +28,9 @@ class CTrailObject final : public CPartObject public: void Trail_Update(_fmatrix WorldMat, _float fTimeDelta); + HRESULT Load_Trail(CEffect_Container::TRAIL_SAVE_INFO Trail_Save_Info, LEVEL eLevel); HRESULT Load_Trail(const _char* pPath, LEVEL eLevel); - private: HRESULT Bind_ShaderResources() override; virtual HRESULT Initialize_Prototype() override; @@ -128,10 +58,10 @@ class CTrailObject final : public CPartObject CShader* m_pShaderCom = { nullptr }; CTrail* m_pTrailCom = { nullptr }; - _string m_strTrailDiffuseName = {}; - _string m_strTrailNoiseName = {}; - _string m_strTrailMaskingName = {}; - _string m_strTrailDistortionName = {}; + _wstring m_strTrailDiffuseName = {}; + _wstring m_strTrailNoiseName = {}; + _wstring m_strTrailMaskingName = {}; + _wstring m_strTrailDistortionName = {}; _string m_strPath = {}; _string m_strName = {}; diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 9cc90197e..2607e65f5 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -336,6 +336,16 @@ HRESULT CInstance_Model::Save_InstanceModel(HANDLE hFile) #endif +HRESULT CInstance_Model::Load_InstanceModel(INSTANCE_DESC InstanceDesc) +{ + + m_InstanceDesc = InstanceDesc; + + Change_NumInstance(); + + return S_OK; +} + HRESULT CInstance_Model::Load_InstanceModel(HANDLE hFile) { DWORD dwByte = {}; diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index a0c9f988d..33e62dc6a 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -272,6 +272,12 @@ HRESULT CTrail::Save_Trail(HANDLE hFile) } #endif +HRESULT CTrail::Load_Trail(TRAIL_DESC TrailDesc) +{ + m_TrailDesc = TrailDesc; + return S_OK; +} + HRESULT CTrail::Load_Trail(HANDLE hFile) { DWORD dwByte(0); diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index a7e3917b9..ec8211681 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -255,6 +255,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent //HRESULT Bind_Value_Buffer(class CShader* pShader, const _char* pConstantName); HRESULT Bind_OutPut_SRV_VS(_uint Index, _uint iBufferIndex); INSTANCE_DESC Get_EffectValue() { return m_InstanceDesc; } + HRESULT Load_InstanceModel(INSTANCE_DESC InstanceDesc); HRESULT Load_InstanceModel(HANDLE hFile); HRESULT Bind_CS_Output(_uint Index, _uint iBufferIndex); private: diff --git a/Jusin154_Team3D/Engine/Public/Trail.h b/Jusin154_Team3D/Engine/Public/Trail.h index 6fba6782e..78731a568 100644 --- a/Jusin154_Team3D/Engine/Public/Trail.h +++ b/Jusin154_Team3D/Engine/Public/Trail.h @@ -25,6 +25,7 @@ class ENGINE_DLL CTrail final : #ifdef _DEBUG HRESULT Save_Trail(HANDLE hFile); #endif + HRESULT Load_Trail(TRAIL_DESC TrailDesc); HRESULT Load_Trail(HANDLE hFile); public: From dd5387f68076ec79ca3a0d63541d9a053d580b95 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 15:41:53 +0900 Subject: [PATCH 11/22] [add] StepOFfset --- Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp | 6 +++++- Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp | 2 +- Jusin154_Team3D/Client/Private/Goblin.cpp | 2 +- Jusin154_Team3D/Client/Private/Goblin_Mage.cpp | 2 +- Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp | 2 +- Jusin154_Team3D/Client/Private/Player.cpp | 2 +- Jusin154_Team3D/Client/Private/Troll.cpp | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp index 4ad79b15f..fa796e600 100644 --- a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp +++ b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp @@ -51,7 +51,11 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit) class CUnit* pOwner = (CUnit*)m_pController->Get_Owner(); _vector vLook = pOwner->Get_Component()->Get_State(STATE::LOOK); _float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook)); - if (fDot > cosf(XM_PIDIV4)) { +#ifdef _DEBUG + GUI::Text("DOTDOT %f", fDot); +#endif // _DEBUG + + if (fDot > cosf(XM_PIDIV4) && vWorldPos.y >= XMVectorGetY(pOwnerActorData->pCharacter->Get_Position()) - FLT_EPSILON3) { CModel* pModel = pOwner->Get_Component(); _uint iAnimIndex = pModel->Get_AnimIndex(); if (pOwner->Get_AnimInfo(STATEANIM::RUSH_LOOP).first == iAnimIndex) { diff --git a/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp b/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp index 30a8de624..505f7360d 100644 --- a/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp +++ b/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp @@ -129,7 +129,7 @@ HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg) Desc.fContactOffset = 0.001f; Desc.fMaterial = { 0.5f, 0.5f, 0.6f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.001f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 0.5f; Desc.fHeight = 1.0f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index dd69b5710..9346bf60e 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -329,7 +329,7 @@ HRESULT CGoblin::Ready_Components() Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.001f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 0.6f; Desc.fHeight = 0.7f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index 8c651b2bf..c4f48b804 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -338,7 +338,7 @@ HRESULT CGoblin_Mage::Ready_Components() Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.001f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 0.6f; Desc.fHeight = 0.7f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp index e2b24e27e..e89837b23 100644 --- a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp +++ b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp @@ -106,7 +106,7 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg) Desc.fContactOffset = 0.3f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.05f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 0.5f; Desc.fHeight = 1.0f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index f5dc94ce6..f2d97fee8 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -426,7 +426,7 @@ HRESULT CPlayer::Ready_Components() Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.001f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 0.5f; Desc.fHeight = 0.6f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 8f48141dc..5e4244183 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -427,7 +427,7 @@ HRESULT CTroll::Ready_Components() Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.001f }; + Desc.fStepOffset = { 0.02f }; Desc.fRadius = 1.2f; Desc.fHeight = 1.5f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Troll_HitReport::Create(); From ad943683d0f6a37deba4c2fa5bf0f837ced5d444 Mon Sep 17 00:00:00 2001 From: qordlsgur <127704460+qordlsgur@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:54:40 +0900 Subject: [PATCH 12/22] =?UTF-8?q?[Modify]=20=ED=8A=B8=EB=A1=A4=20=ED=95=9C?= =?UTF-8?q?=EB=B0=A9=EC=97=90=20=EC=A3=BD=EB=8A=94=EA=B1=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShaderFiles/Shader_UIEditor.hlsl | 5 ++++- .../Client/Private/Damage_Font.cpp | 2 +- Jusin154_Team3D/Client/Private/Goblin.cpp | 4 ++-- .../Client/Private/Loding_Panel.cpp | 12 +++++------ Jusin154_Team3D/Client/Private/Skill_Data.cpp | 1 + Jusin154_Team3D/Client/Private/Troll.cpp | 11 ++++++---- Jusin154_Team3D/Client/Public/Goblin_Mage.h | 4 ++++ .../ShaderFiles/Shader_UIEditor.hlsl | 5 ++++- .../Engine/Private/Character_Controller.cpp | 8 +++++++ .../Engine/Private/RigidBody_Dynamic.cpp | 21 +++++++++++++++++++ .../Engine/Public/Character_Controller.h | 1 + .../Engine/Public/RigidBody_Dynamic.h | 1 + 12 files changed, 59 insertions(+), 16 deletions(-) diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index d70673f30..8d7423e2f 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1526,8 +1526,11 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) float3 vertexPos = worldCenter + dirRight + dirUp; + float2 TexCoord = In.vTexcoord; + TexCoord.y = 1.f - TexCoord.y; + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); - Out.vTexcoord = 1.f - In.vTexcoord; + Out.vTexcoord = TexCoord; return Out; } diff --git a/Jusin154_Team3D/Client/Private/Damage_Font.cpp b/Jusin154_Team3D/Client/Private/Damage_Font.cpp index 7a0c176d7..de6fb1310 100644 --- a/Jusin154_Team3D/Client/Private/Damage_Font.cpp +++ b/Jusin154_Team3D/Client/Private/Damage_Font.cpp @@ -104,7 +104,7 @@ void CDamage_Font::Add_Damage(void* pArg) pInfo = *reinterpret_cast(pArg); DAMAGE_FONT_INFO Desc{}; - Desc.vTarget_Pos =pInfo.vTarget_Pos , XMVectorSet(m_pGameInstance->Real_Random_Float(2,5), 1.f, m_pGameInstance->Real_Random_Float(2, 5), 0.f); + Desc.vTarget_Pos = pInfo.vTarget_Pos; Desc.pDamage = to_wstring(static_cast<_int>(pInfo.fDamage)); if (pInfo.eType == DAMAGE_TYPE::NOMAL) { diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index dd69b5710..052d4934f 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -252,8 +252,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) if (true == m_bDead) { return; } - _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; - m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); + m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); + m_pGoblinSpector->Set_Visible(false); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp index a8fca9392..d65d0d073 100644 --- a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp @@ -61,7 +61,6 @@ void CLoding_Panel::Priority_Update(_float fTimeDelta) void CLoding_Panel::Update(_float fTimeDelta) { -#ifdef _DEBUG if (m_pGameInstance->Key_Down(DIK_M)) { human++; @@ -112,7 +111,6 @@ void CLoding_Panel::Update(_float fTimeDelta) JINWOO = true; break; } -#endif // DEBUG __super::Update(fTimeDelta); } @@ -139,15 +137,15 @@ HRESULT CLoding_Panel::Render() m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M ->."), _float2(100.f, 750.f)); if (INHYUK == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nUI의 생일은 28일 이랍니다."), _float2(100.f, 800.f)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF9를 눌러 브레이크포인트를 설정할 수 있습니다."), _float2(100.f, 800.f)); if (JINHO == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n우리팀 맵툴은 최강 입니다."), _float2(100.f, 800.f)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF12를 눌러 정의로 바로 이동할 수 있습니다!."), _float2(100.f, 800.f)); if (HYUNBIN == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n이제 막 범인에서 벗어 났습니다."), _float2(100.f, 800.f)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중에도 핫 리로드로 코드를 수정할 수 있습니다."), _float2(100.f, 800.f)); if (NURI == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n이제 막 슬슬 범인 입니다."), _float2(100.f, 800.f)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nCtrl + R, R로 변수 또는 함수 이름을 프로젝트 전체에서 일괄 변경할 수 있습니다."), _float2(100.f, 800.f)); if (JINWOO == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n그는 그림자의 군주입니다."), _float2(100.f, 800.f)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중 변수에 마우스를 올리면 현재 값을 확인할 수 있습니다."), _float2(100.f, 800.f)); #endif // DEBUG return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp index 7866ae75c..b1756e7b6 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -19,6 +19,7 @@ HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon Spell_UnLock(2); Spell_UnLock(6); Spell_UnLock(11); + Spell_UnLock(14); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 8f48141dc..9f7616452 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -123,7 +123,7 @@ void CTroll::Update(_float fTimeDelta) for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); - + #pragma region TRAIL_UPDATE @@ -182,7 +182,7 @@ void CTroll::Late_Update(_float fTimeDelta) m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir)); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); -// m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); + // m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); } HRESULT CTroll::Render() @@ -337,8 +337,7 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); - _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()), m_pTransformCom->Get_XMWorldMatrix()).r[3]; - m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); + m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); CEffect_Container* pEffect_Container = dynamic_cast(pOther); @@ -368,6 +367,10 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) break; } } + else + { + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW))); + } CMapElement_Interactable* pProps = dynamic_cast(pOther); diff --git a/Jusin154_Team3D/Client/Public/Goblin_Mage.h b/Jusin154_Team3D/Client/Public/Goblin_Mage.h index 90175c73b..d4bf3e89a 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_Mage.h +++ b/Jusin154_Team3D/Client/Public/Goblin_Mage.h @@ -4,6 +4,7 @@ #include "Monster.h" #include "CallBack_Monster_Behavior.h" #include "CallBack_Monster_HitReport.h" +#include "Enemy_Detection.h" NS_BEGIN(Client) @@ -36,6 +37,7 @@ class CGoblin_Mage final : public CMonster private: CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr }; CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr }; + CEnemy_Detection* m_pDetection = { nullptr }; CCharacter_Controller* m_pCharacter_Controller = { nullptr }; CRigidBody_Dynamic* m_pRigidBody = { nullptr }; @@ -74,6 +76,8 @@ class CGoblin_Mage final : public CMonster private: class CEffectPool* m_pEffectPool = { nullptr }; + _bool m_bDetection = { false }; + _float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {}; _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 20.f,5.f,30.f,15.f }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index d70673f30..8d7423e2f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1526,8 +1526,11 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) float3 vertexPos = worldCenter + dirRight + dirUp; + float2 TexCoord = In.vTexcoord; + TexCoord.y = 1.f - TexCoord.y; + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); - Out.vTexcoord = 1.f - In.vTexcoord; + Out.vTexcoord = TexCoord; return Out; } diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp index 0e24089dd..c24899b78 100644 --- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp +++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp @@ -288,6 +288,14 @@ _vector CCharacter_Controller::Get_FootPosition() return XMVectorSet((_float)pxLVecfootPos.x, (_float)pxLVecfootPos.y, (_float)pxLVecfootPos.z, 1.f ); } +_vector CCharacter_Controller::Get_HeadPosition() +{ + PSX::PxExtendedVec3 pxLVecfootPos = m_pController->getFootPosition(); + PSX::PxExtendedVec3 pxVPos = m_pController->getPosition(); + _float pxVecDiff = (_float)(pxVPos - pxLVecfootPos).y; + return XMVectorSet((_float)pxVPos.x, (_float)pxVPos.y + pxVecDiff, (_float)pxVPos.z, 1.f); +} + HRESULT CCharacter_Controller::Initialize_Prototype() { return S_OK; diff --git a/Jusin154_Team3D/Engine/Private/RigidBody_Dynamic.cpp b/Jusin154_Team3D/Engine/Private/RigidBody_Dynamic.cpp index dcc5e0e6b..4093de2f7 100644 --- a/Jusin154_Team3D/Engine/Private/RigidBody_Dynamic.cpp +++ b/Jusin154_Team3D/Engine/Private/RigidBody_Dynamic.cpp @@ -181,6 +181,27 @@ _float3 CRigidBody_Dynamic::Get_FootPosition() return vOut; } +_float3 CRigidBody_Dynamic::Get_HeadPosition() +{ + PSX::PxTransform pxTransform = m_pRigidBody->getGlobalPose(); + switch (m_eActorType) + { + case Engine::ACTOR::BOX: + pxTransform.p.y += m_vhalfGeometryInfo.y; + break; + case Engine::ACTOR::CAPSULE: + pxTransform.p.y += m_vhalfGeometryInfo.y * 0.5f + m_vhalfGeometryInfo.x; + break; + case Engine::ACTOR::SPHERE: + pxTransform.p.y += m_vhalfGeometryInfo.x; + break; + default: + break; + } + _float3 vOut = { pxTransform.p.x , pxTransform.p.y , pxTransform.p.z }; + return vOut; +} + PSX::PxTransform CRigidBody_Dynamic::Get_FootPositionPxTransform() { PSX::PxTransform pxTransform = m_pRigidBody->getGlobalPose(); diff --git a/Jusin154_Team3D/Engine/Public/Character_Controller.h b/Jusin154_Team3D/Engine/Public/Character_Controller.h index 88043b225..ecae14333 100644 --- a/Jusin154_Team3D/Engine/Public/Character_Controller.h +++ b/Jusin154_Team3D/Engine/Public/Character_Controller.h @@ -58,6 +58,7 @@ class ENGINE_DLL CCharacter_Controller final : void Set_Position(_fvector vNewPos); // 순간이동 _vector Get_Position(); _vector Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 바닥 위치가 더 아래에 위치한다는 뜻 ) + _vector Get_HeadPosition(); PSX::PxControllerCollisionFlags Get_CollisionFlags(); void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임 diff --git a/Jusin154_Team3D/Engine/Public/RigidBody_Dynamic.h b/Jusin154_Team3D/Engine/Public/RigidBody_Dynamic.h index a93548e2c..e92899284 100644 --- a/Jusin154_Team3D/Engine/Public/RigidBody_Dynamic.h +++ b/Jusin154_Team3D/Engine/Public/RigidBody_Dynamic.h @@ -50,6 +50,7 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody _vector Get_Position(); _float3 Get_FootPosition(); + _float3 Get_HeadPosition(); PSX::PxTransform Get_FootPositionPxTransform(); private: PSX::PxRigidDynamic* m_pRigidBody = { nullptr }; // 실제 시뮬레이션을 도는 본체 From 941111a76eead7cb5fa37f3bb58d10896c616ec6 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 12 Dec 2025 16:35:00 +0900 Subject: [PATCH 13/22] [add] KinematicDoor SAmple --- .../Private/CallBack_Playable_HitReport.cpp | 11 + Jusin154_Team3D/Client/Private/EffectPool.cpp | 4 +- Jusin154_Team3D/Client/Private/Loader.cpp | 488 ++++++++++-------- .../Client/Private/MapElement_Door.cpp | 141 ++++- Jusin154_Team3D/Client/Private/Troll.cpp | 2 +- .../Client/Public/MapElement_Door.h | 8 + 6 files changed, 410 insertions(+), 244 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CallBack_Playable_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_Playable_HitReport.cpp index c8dad8188..77359c111 100644 --- a/Jusin154_Team3D/Client/Private/CallBack_Playable_HitReport.cpp +++ b/Jusin154_Team3D/Client/Private/CallBack_Playable_HitReport.cpp @@ -72,6 +72,17 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h vCompressedDir.normalize(); pDynamic->addForce(vCompressedDir * fLength* 1000.f, PSX::PxForceMode::eFORCE); } break; + case PXOBJECT::DOOR: + { + PSX::PxRigidDynamic* pDynamic = static_cast(pActor); + _float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f)); + if (fDot > 0) { + pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE); + } + else { + pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE); + } + } break; default: { } break; diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 09c1978b7..c88288733 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -73,8 +73,8 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveMonsterEffectCreate = true; #endif // #ifdef 기무리 - m_isActiveEffectCreate = true; - m_isActiveMonsterEffectCreate = true; + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; #endif // #ifdef 인혁 m_isActiveEffectCreate = false; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 995765791..5d6cc2076 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -871,206 +871,206 @@ HRESULT CLoader::Loading_For_GamePlay() m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png"); } #pragma endregion -#pragma region UI_ANI - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) - { - return E_FAIL; - } - - 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)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) - { - return E_FAIL; - } - -#pragma endregion +//#pragma region UI_ANI +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) +// { +// return E_FAIL; +// } +// +// 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)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) +// { +// return E_FAIL; +// } +// +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), +// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) +// { +// return E_FAIL; +// } +// +//#pragma endregion #pragma region TERRAIN_TEXTURE /* Terrain_Diffuse */ @@ -1392,37 +1392,69 @@ HRESULT CLoader::Loading_For_GamePlay() } - 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 = 1.f; - Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); - Desc.eLockFlag = {}; - Desc.vAutoDamping = { 1.f, 1.f }; - Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f }; - Desc.vLocalTranslation = { 0.f, 0.f, 0.f }; - } + { // LIGHT PHYSX DYNAMIC + 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 = 1.f; + Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); + Desc.eLockFlag = {}; + Desc.vAutoDamping = { 1.f, 1.f }; + Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f }; + Desc.vLocalTranslation = { 0.f, 0.f, 0.f }; + } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { - return E_FAIL; - } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) { - return E_FAIL; - } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } - //Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC }; - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { - return E_FAIL; + //Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC }; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } + } + { // DOOR PHYSX + 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.35f, 0.75f, 0.15f }; + Desc.fDensity = 10.f; + PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(0.f, 0.f, 0.f)); + Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f }; + Desc.vLocalTranslation = { 0.5f, 0.f, 0.f }; + + Desc.pxMassCenter = pxPivotTransform; + Desc.eLockFlag = { + PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X | + //PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Y | + PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z | + PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y | + PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X | + PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z + }; + Desc.vAutoDamping = { 10.f, 10.f }; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } } if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"), diff --git a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp index dd541d6ec..4d4a9138a 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp @@ -2,6 +2,7 @@ #include "MapElement_Door.h" #include "GameInstance.h" +#include "RigidBody_Dynamic.h" #include "Terrain.h" #include "Layer.h" #include "VIBuffer_Terrain.h" @@ -43,17 +44,39 @@ HRESULT CMapElement_Door::Initialize(void* pArg) m_pTransformCom->Set_Scale(pDesc->vScale); m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z)); - //m_vBoxSize = _float3(1.f, 1.f, 1.f); - //m_pActor = static_cast(m_pRigidBody->Get_Actor()); + XMStoreFloat4((_float4*)&m_pxStartQuat, m_pTransformCom->Get_QuarternionVector()); + XMStoreFloat4x4(&m_InitialMatrix, m_pTransformCom->Get_XMWorldMatrix()); - //static_cast(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize); - //static_cast(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition); + m_vRadianYAngle.y = pDesc->vRotation.z; + m_vRadianYAngle.x = m_vRadianYAngle.y + XMConvertToRadians(-70.f); + m_vRadianYAngle.z = m_vRadianYAngle.y + XMConvertToRadians(70.f); + + { // RIGID_BODY + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR); + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) { + return E_FAIL; + } + } + m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor(); return S_OK; } void CMapElement_Door::Priority_Update(_float fTimeDelta) { + if (m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC) { + m_vKinematicTimer.x += fTimeDelta; + if (m_vKinematicTimer.x < m_vKinematicTimer.z) { + // 행렬없이 럴프 버전 + _float fTime = max(0.f, ((m_vKinematicTimer.x - m_vKinematicTimer.y) / (m_vKinematicTimer.z - m_vKinematicTimer.y))); + Lerp_Matrix(fTime); + //Lerp_NonMatrix(fTime); + } + else { + m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false); + } + } } void CMapElement_Door::Update(_float fTimeDelta) @@ -63,6 +86,45 @@ void CMapElement_Door::Update(_float fTimeDelta) void CMapElement_Door::Late_Update(_float fTimeDelta) { + _vector vRPY = m_pTransformCom->Get_RollPitchYawVector(); + if (!(m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC)) { + _float fPitch = XMVectorGetX(vRPY); + _float fYaw = XMVectorGetY(vRPY); + _float fRoll = XMVectorGetZ(vRPY); + + _float fClampedYaw = ClampRadian(fYaw); + if (fClampedYaw != fYaw) { + _vector vNewQuat = XMQuaternionRotationRollPitchYaw(fPitch, fClampedYaw, fRoll); + + PSX::PxTransform actorPose = m_pActor->getGlobalPose(); + PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose(); + + PSX::PxVec3 vpxMassLocal = massLocalPose.p; + PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal); + + _vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f); + _vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f); + + _float3 vScale = m_pTransformCom->Get_Scale(); + _matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale)); + _matrix RotationMatrix = XMMatrixRotationQuaternion(vNewQuat); + + _matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal); + _matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld); + + // 최종 월드 행렬 + _matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴 + * (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용 + + m_pTransformCom->Set_WorldMatrix(world); + m_pActor->setGlobalPose(XMWorldToPx_NoScale(world)); + + m_pActor->setAngularVelocity(PSX::PxVec3(0)); + m_pActor->setLinearVelocity(PSX::PxVec3(0)); + m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true); + m_vKinematicTimer.x = 0.f; + } + } if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) { m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -125,14 +187,6 @@ HRESULT CMapElement_Door::Ready_Components(void* pArg) ELEMENT_DOOR_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; } @@ -155,6 +209,67 @@ HRESULT CMapElement_Door::Bind_ShaderResources() return S_OK; } +void CMapElement_Door::Lerp_Matrix(_float fTime) +{ + { + _float4x4 OutMatrix = {}; + _float4x4 CurrentMatrix = {}; + XMStoreFloat4x4(&CurrentMatrix, m_pTransformCom->Get_XMWorldMatrix()); + CMyTools::MatrixLerp(&CurrentMatrix, &m_InitialMatrix, OutMatrix, fTime); + m_pTransformCom->Set_WorldMatrix(OutMatrix); + } +} + +void CMapElement_Door::Lerp_NonMatrix(_float fTime) +{ + { + _vector vCurrQ = m_pTransformCom->Get_QuarternionVector(); + _vector vInitialQ = XMLoadFloat4((_float4*)&m_pxStartQuat); + _vector vLerpQuat = XMVector4Normalize(XMVectorLerp(vCurrQ, vInitialQ, fTime)); + + PSX::PxTransform actorPose = m_pActor->getGlobalPose(); + PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose(); + + PSX::PxVec3 vpxMassLocal = massLocalPose.p; + PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal); + + _vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f); + _vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f); + + + _float3 vScale = m_pTransformCom->Get_Scale(); + _matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale)); + _matrix RotationMatrix = XMMatrixRotationQuaternion(vLerpQuat); + + _matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal); + _matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld); + + // 최종 월드 행렬 + _matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴 + * (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용 + + m_pTransformCom->Set_WorldMatrix(world); + } +} + +_float CMapElement_Door::ClampRadian(_float fNewRadian) +{ + // [x, z] 사이로 잘라주는 단순한 클램프 + _float minYaw = m_vRadianYAngle.x; + _float maxYaw = m_vRadianYAngle.z; + + // 라디안 노멀라이즈 ([-pi, pi] 같은 범위로) + fNewRadian = CMyTools::NormalizeRadian(fNewRadian); + + if (fNewRadian < minYaw) { + fNewRadian = minYaw; + } + else if (fNewRadian > maxYaw) { + fNewRadian = maxYaw; + } + return fNewRadian; +} + CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext); @@ -188,7 +303,7 @@ void CMapElement_Door::Free() } __super::Free(); - //SAFE_RELEASE(m_pRigidBody); + SAFE_RELEASE(m_pRigidBody); SAFE_RELEASE(m_pShaderCom); for (auto& pModel : m_pModelComs) diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 5e4244183..bcfe77853 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -427,7 +427,7 @@ HRESULT CTroll::Ready_Components() Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; - Desc.fStepOffset = { 0.02f }; + Desc.fStepOffset = { 0.12f }; Desc.fRadius = 1.2f; Desc.fHeight = 1.5f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Troll_HitReport::Create(); diff --git a/Jusin154_Team3D/Client/Public/MapElement_Door.h b/Jusin154_Team3D/Client/Public/MapElement_Door.h index a69c966d0..64fe81397 100644 --- a/Jusin154_Team3D/Client/Public/MapElement_Door.h +++ b/Jusin154_Team3D/Client/Public/MapElement_Door.h @@ -31,6 +31,11 @@ class CMapElement_Door final : public CMapElement CRigidBody* m_pRigidBody = { nullptr }; PSX::PxRigidDynamic* m_pActor = { nullptr }; + _float3 m_vRadianYAngle = {}; + _float3 m_vKinematicTimer = { 0.f, 2.f, 2.3f }; + PSX::PxQuat m_pxStartQuat = {}; + _float4x4 m_InitialMatrix = {}; + #ifdef _DEBUG _bool m_bUseSelectColor = { true }; @@ -45,6 +50,9 @@ class CMapElement_Door final : public CMapElement virtual HRESULT Initialize(void* pArg) override; virtual HRESULT Ready_Components(void* pArg) override; virtual HRESULT Bind_ShaderResources() override; + void Lerp_Matrix(_float fTime); + void Lerp_NonMatrix(_float fTime); + _float ClampRadian(_float fNewRadian); public: static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); From 124032d461b4180f19c69cf1912ef1b809b94ea8 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Sun, 14 Dec 2025 09:55:23 +0900 Subject: [PATCH 14/22] commit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 9 + Jusin154_Team3D/Client/Private/EffectPool.cpp | 9 + .../Client/Private/Goblin_Mage_States.cpp | 5 + .../Client/Private/Goblin_States.cpp | 5 + .../Client/Private/Goblin_Teleport.cpp | 175 ++++++++++++++++++ Jusin154_Team3D/Client/Private/Loader.cpp | 6 +- Jusin154_Team3D/Client/Public/Client_Enum.h | 2 +- .../Client/Public/Goblin_Teleport.h | 47 +++++ .../Effect/Goblin/GoblinTeleport/Smoke.bin | 3 + .../Effect/MonsterPackage/GoblinTeleport.bin | 3 + .../ShaderFiles/Shader_VtxModelInstance.hlsl | 14 +- .../Engine/Private/Renderer_Declare.cpp | 6 +- 13 files changed, 274 insertions(+), 12 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Goblin_Teleport.cpp create mode 100644 Jusin154_Team3D/Client/Public/Goblin_Teleport.h create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinTeleport/Smoke.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinTeleport.bin diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index a6bbfcca4..9b89c04a8 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -206,6 +206,7 @@ call Update_Resources.bat + @@ -389,6 +390,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 31269e643..65a1fb3e5 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -557,6 +557,9 @@ 02.GameObjects\Item\Potion + + 02.GameObjects\Effect\MonsterEffect\Goblin_Teleport + @@ -1176,6 +1179,9 @@ {ace6c64f-901a-424e-99da-53f281413d77} + + {8f5dbf8c-be74-4512-a84f-586397744b24} + @@ -1677,6 +1683,9 @@ 02.GameObjects\Item\Potion + + 02.GameObjects\Effect\MonsterEffect\Goblin_Teleport + diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 09c1978b7..eadda150d 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -31,6 +31,7 @@ #include "Box_Splesh.h" #include "Chair_Splesh.h" #include "Barral_Splesh.h" +#include "Goblin_Teleport.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -409,7 +410,15 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::GOBILN_TELEPORT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + CGoblin_Teleport* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp index 3b0cdb130..e967a4f1a 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp @@ -326,6 +326,11 @@ void CGoblin_Mage::Behavior_BlinkEnter() m_pCharacter_Controller->Set_Position(vFinalPos); } , 0.99f); + + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBILN_TELEPORT, this); + }, 0.1f); } HRESULT CGoblin_Mage::Behavior_BlinkExitCheck(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 9d8d55c7f..d1d046c64 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -369,6 +369,11 @@ void CGoblin::Behavior_BlinkEnter() m_pCharacter_Controller->Set_Position(vFinalPos); } , 0.99f); + + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBILN_TELEPORT, this); + }, 0.1f); } HRESULT CGoblin::Behavior_BlinkExitCheck(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/Goblin_Teleport.cpp b/Jusin154_Team3D/Client/Private/Goblin_Teleport.cpp new file mode 100644 index 000000000..78c8717eb --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Goblin_Teleport.cpp @@ -0,0 +1,175 @@ +#include "pch.h" +#include "Goblin_Teleport.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CGoblin_Teleport::CGoblin_Teleport(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CGoblin_Teleport::CGoblin_Teleport(const CGoblin_Teleport& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CGoblin_Teleport::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinTeleport"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CGoblin_Teleport::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + + m_wstrEffectName = L"GoblinTeleport"; + + + m_fDuration = 2.f; + + return S_OK; +} + +void CGoblin_Teleport::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CGoblin_Teleport::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + +} + +void CGoblin_Teleport::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CGoblin_Teleport::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + pSmoke->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_Component()->Get_Position()); + + pSmoke->Set_Visible(true); + + return S_OK; +} + +HRESULT CGoblin_Teleport::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CGoblin_Teleport::Ready_Child() +{ + return S_OK; +} + +CGoblin_Teleport* CGoblin_Teleport::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CGoblin_Teleport* pInstance = new CGoblin_Teleport(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CGoblin_Teleport"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CGoblin_Teleport::Clone(void* pArg, CGameObject* pOwner) +{ + CGoblin_Teleport* pInstance = new CGoblin_Teleport(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CGoblin_Teleport"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CGoblin_Teleport::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CGoblin_Teleport::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CGoblin_Teleport::Describe_Entity() +{ + +} +#endif + +HRESULT CGoblin_Teleport::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 869332419..d59975ef7 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -128,7 +128,7 @@ #include "EffectPool.h" #include "Levioso.h" #include "Lumos.h" - +#include "Goblin_Teleport.h" #include "TrollSwing.h" @@ -1609,6 +1609,10 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 263032014..b94b23f09 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -50,7 +50,7 @@ namespace Client TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO, /*고블린*/ - GOBLIN_ATTACK, + GOBLIN_ATTACK, GOBILN_TELEPORT, /*고블린 메이지*/ GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE, diff --git a/Jusin154_Team3D/Client/Public/Goblin_Teleport.h b/Jusin154_Team3D/Client/Public/Goblin_Teleport.h new file mode 100644 index 000000000..5344cae07 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Goblin_Teleport.h @@ -0,0 +1,47 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CGoblin_Teleport final : public CEffect_Container +{ +private: + CGoblin_Teleport(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CGoblin_Teleport(const CGoblin_Teleport& rhs); + virtual ~CGoblin_Teleport() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + +public: + static CGoblin_Teleport* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; + +#endif // _DEBUG + +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinTeleport/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinTeleport/Smoke.bin new file mode 100644 index 000000000..0214703f5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinTeleport/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b74957b783c0f51d77d38e43fd9050687399a12c61610952a2f7af69a1719c92 +size 1076 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinTeleport.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinTeleport.bin new file mode 100644 index 000000000..23da187bd --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinTeleport.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9eddb6a5c79b701bc3b696cca95e0da9a7e538b76385bb5c036c54ec706c2da4 +size 73 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 867a0672e..1130f4765 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -655,7 +655,7 @@ PS_OUT PS_MAIN(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = vMtrlDiffuse; + Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); return Out; } @@ -679,7 +679,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w); + Out = float4(0.f, 0.f, 0.f, 0.f); //// 색깔 추가할 처리 (이미시브) @@ -768,7 +768,7 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In) // } //} - Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity , vMtrlDiffuse.a); + Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); Out.vBlurWeight = g_iBlurWeight / 128.f; return Out; @@ -800,7 +800,7 @@ PS_BLUR_OUT PS_BLUR(PS_IN In) // } //} - Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); + Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); Out.vBlurWeight = g_iBlurWeight / 128.f; @@ -840,7 +840,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In) if (vMtrlDiffuse.a <= 0.1f) discard; - Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f); + Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); return Out; @@ -856,7 +856,7 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = vMtrlDiffuse; + Out.vDiffuse = float4(0.f,0.f,0.f,0.f); return Out; } @@ -871,7 +871,7 @@ PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = BlendedWeight(vMtrlDiffuse, In.vProjPos.w).vDiffuse; + Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); return Out; diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp index 52ef5ad5a..eeca15ec1 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -418,9 +418,9 @@ HRESULT CRenderer::Initialize() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_Color")))) { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_Color")))) { + // return E_FAIL; + //} /* MRT_Fog */ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Fog"), TEXT("Target_Fog")))) { From c1540e4d8190eee906b4d5a089f899eb5c861f7c Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Sun, 14 Dec 2025 10:55:51 +0900 Subject: [PATCH 15/22] commit --- .../ShaderFiles/Shader_VtxModelInstance.hlsl | 69 +++++---- .../Engine/Private/ComputeShader.cpp | 131 +++++++++++------- .../Engine/Private/Instance_Model.cpp | 17 ++- .../Engine/Private/Prototype_Manager.cpp | 24 ++++ .../Private/VIBuffer_Model_Instance.cpp | 15 +- Jusin154_Team3D/Engine/Public/ComputeShader.h | 39 ++++-- Jusin154_Team3D/Engine/Public/Engine_Macro.h | 2 + .../Engine/Public/Prototype_Manager.h | 1 + 8 files changed, 194 insertions(+), 104 deletions(-) diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 1130f4765..b1a13b77d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -72,17 +72,17 @@ float2 g_vDiffuseUVGainAmount; float2 g_vMaskingUVGainAmount; float2 g_vNoiseUVGainAmount; -int g_iMaskMoveLerpOption; -int g_iDiffuseMoveLerpOption; -int g_iNoiseMoveLerpOption; +int g_iMaskMoveLerpOption; +int g_iDiffuseMoveLerpOption; +int g_iNoiseMoveLerpOption; // float2 g_vDistortionTime; float2 g_vMaskDistortionUVGainAmount; -int g_iMaskDistortionMoveLerpOption; -int g_iDiffuseDistortionMoveLerpOption; +int g_iMaskDistortionMoveLerpOption; +int g_iDiffuseDistortionMoveLerpOption; // float2 g_vUVCutting; @@ -90,12 +90,12 @@ float2 g_vUVMaskCutting; float g_fDiffuseAlpha; -int g_iBlurWeight; // 블러 강도 +int g_iBlurWeight; // 블러 강도 float g_fBlurIntensity; //블러 세기 float g_fNoiseDistortionIntensity; // 디스토션 왜곡 세기 float4 g_vEmissive; -float g_fEmissiveStrength; +float g_fEmissiveStrength; float g_fSoftenExp; float g_fSoftStrength; @@ -137,18 +137,18 @@ bool g_isBlurReverseDissolve; float g_fBluringStrength; -bool g_isBloomDissolve; -bool g_isBloomReverseDissolve; +bool g_isBloomDissolve; +bool g_isBloomReverseDissolve; -float g_fBloomStrength; -int g_iBloomType; +float g_fBloomStrength; +int g_iBloomType; float g_fFar; -float g_fDissolveDelay; -float g_fReverseDissolveDelay; -float2 g_vDissolveUVGainAmount; -bool g_isDissolveMove; +float g_fDissolveDelay; +float g_fReverseDissolveDelay; +float2 g_vDissolveUVGainAmount; +bool g_isDissolveMove; float g_fDissolveMaskEdge; float g_fDissolveSoftMask; @@ -263,7 +263,6 @@ struct PS_OUT { float4 vDiffuse : SV_TARGET0; float4 vRevealage : SV_TARGET1; - float4 vColorTarget : SV_TARGET2; }; float4 DrawEffect(PS_IN In) @@ -274,7 +273,7 @@ float4 DrawEffect(PS_IN In) vector vMtrlDissolve; vector vMtrlDistortion; - float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x; + float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x; float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime; float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime; float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime; @@ -456,7 +455,7 @@ float4 DrawEffect(PS_IN In) if (g_isDissolve == true) - { + { float fTimeX = (In.vLifeTime.x - g_fDissolveDelay); float fTimeY = (In.vLifeTime.y - g_fDissolveDelay); float fTimeRatio = 0; @@ -481,14 +480,14 @@ float4 DrawEffect(PS_IN In) { vMtrlDiffuse.a *= In.vLifeTime.x / In.vLifeTime.y; - } + } } float2 vDissolveUV = In.vTexcoord + SelectLerpUV(g_vDissolveUVGainAmount, (vDissolveUVMoveTime.x / vDissolveUVMoveTime.y), 0); if (g_isDissolveMove) - vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV ); + vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV); else vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord); @@ -557,12 +556,12 @@ float4 DrawEffect(PS_IN In) return vMtrlDiffuse; } -float4 EmissiveDraw(PS_IN In , float4 Diffuse) +float4 EmissiveDraw(PS_IN In, float4 Diffuse) { float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f); float2 CenteredUV = In.vTexcoord - 0.5f; - float fEmissive = 0.f; - float fEmissiveStrength = g_fEmissiveStrength; + float fEmissive = 0.f; + float fEmissiveStrength = g_fEmissiveStrength; if (g_fEmissiveColorCut >= FLT_EPSILON5) { @@ -655,13 +654,13 @@ PS_OUT PS_MAIN(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); + Out.vDiffuse = vMtrlDiffuse; return Out; } PS_OUT PS_NON_NORMALMAP(PS_IN In) -{ +{ PS_OUT Out; vector vMtrlDiffuse; @@ -679,12 +678,10 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out = float4(0.f, 0.f, 0.f, 0.f); + Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w); //// 색깔 추가할 처리 (이미시브) - - //Out.vDiffuse // 이미시브 스트랭스 - Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); + return Out; } @@ -753,7 +750,7 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In) vector vMtrlDiffuse; - vMtrlDiffuse= DrawEffect(In); + vMtrlDiffuse = DrawEffect(In); //// 색깔 추가할 처리 (이미시브) @@ -768,7 +765,7 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In) // } //} - Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); + Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); Out.vBlurWeight = g_iBlurWeight / 128.f; return Out; @@ -800,7 +797,7 @@ PS_BLUR_OUT PS_BLUR(PS_IN In) // } //} - Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); + Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); Out.vBlurWeight = g_iBlurWeight / 128.f; @@ -824,7 +821,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - float fBloomStrength = g_fBloomStrength; + float fBloomStrength = g_fBloomStrength; if (g_isBloomDissolve == true) { @@ -840,7 +837,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In) if (vMtrlDiffuse.a <= 0.1f) discard; - Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); + Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f); return Out; @@ -856,7 +853,7 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = float4(0.f,0.f,0.f,0.f); + Out.vDiffuse = vMtrlDiffuse; return Out; } @@ -871,7 +868,7 @@ PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In) vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb; - Out.vDiffuse = float4(0.f, 0.f, 0.f, 0.f); + Out.vDiffuse = BlendedWeight(vMtrlDiffuse, In.vProjPos.w).vDiffuse; return Out; diff --git a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp index 62deb845e..1e16b428c 100644 --- a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp +++ b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp @@ -4,30 +4,63 @@ #include "Instance_Model.h" CComputeShader::CComputeShader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : m_pDevice{ pDevice } - , m_pContext{ pContext } - , m_pGameInstance{ CGameInstance::GetInstance() } + : CComponent{ pDevice, pContext } { - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - SAFE_ADDREF(m_pGameInstance); } -HRESULT CComputeShader::Initialize(const _tchar* pShaderFilePath, const _char* pStartFunctionName, _uint iNumElement, _uint iNumInputBuffer, _uint iNumOutputBuffer, _uint iInputStructStride[], _uint iOutputStructStride[]) +CComputeShader::CComputeShader(const CComputeShader& rhs) + : CComponent(rhs), + m_pCSBlob(rhs.m_pCSBlob) { - m_iNumElement = iNumElement; - m_iNumInputBuffer = iNumInputBuffer; - m_iNumOutputBuffer = iNumOutputBuffer; + SAFE_ADDREF(m_pCSBlob); +} - if (FAILED(CreateComputeShader(pShaderFilePath, pStartFunctionName))) +HRESULT CComputeShader::Initialize(void* pArg) +{ + + CS_INFO* CsDesc = static_cast(pArg); + + if (CsDesc == nullptr) return E_FAIL; - if (FAILED(CreateBuffer(iNumElement, iInputStructStride, iOutputStructStride))) + + m_iNumElement = CsDesc->iNumElement; + m_iNumInputBuffer = CsDesc->iNumInputBuffer; + m_iNumOutputBuffer = CsDesc->iNumOutputBuffer; + + + if (FAILED(CreateComputeShader())) return E_FAIL; - if (FAILED(CreateResurceViews(iNumElement, iNumInputBuffer))) + if (FAILED(CreateBuffer(CsDesc->iInputStructStride, CsDesc->iOutputStructStride))) return E_FAIL; + if (FAILED(CreateResurceViews())) + return E_FAIL; + + + return S_OK; +} + +HRESULT CComputeShader::Initialize_Prototype(const _tchar* pShaderFilePath, const _char* pStartFunctionName) +{ + // Debug 모드와 release 모드의 플레그를 다르게 줘야함 + UINT HLSLFlags = {}; +#ifdef _DEBUG + HLSLFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; +#else + HLSLFlags = D3DCOMPILE_OPTIMIZATION_LEVEL1; +#endif // _DEBUG + + HRESULT hr = D3DCompileFromFile(pShaderFilePath, + nullptr, + D3D_COMPILE_STANDARD_FILE_INCLUDE, + pStartFunctionName, + "cs_5_0", + HLSLFlags, + 0, + &m_pCSBlob, + nullptr); return S_OK; @@ -136,7 +169,7 @@ void CComputeShader::Reset() m_pContext->CSSetShader(nullptr, nullptr, 0); } -HRESULT CComputeShader::CreateBuffer(_uint iNumElement, _uint iInputStructStride[], _uint iOuputStructStride[]) +HRESULT CComputeShader::CreateBuffer(_uint iInputStructStride[], _uint iOuputStructStride[]) { //인 아웃풋 버퍼 @@ -145,7 +178,7 @@ HRESULT CComputeShader::CreateBuffer(_uint iNumElement, _uint iInputStructStride { D3D11_BUFFER_DESC InputBufferdesc = {}; - InputBufferdesc.ByteWidth = iInputStructStride[i] * iNumElement; + InputBufferdesc.ByteWidth = iInputStructStride[i] * m_iNumElement; InputBufferdesc.StructureByteStride = iInputStructStride[i]; InputBufferdesc.Usage = D3D11_USAGE_DEFAULT; InputBufferdesc.CPUAccessFlags = 0; @@ -165,7 +198,7 @@ HRESULT CComputeShader::CreateBuffer(_uint iNumElement, _uint iInputStructStride // 아웃풋 버퍼 D3D11_BUFFER_DESC Bufferdesc = {}; - Bufferdesc.ByteWidth = iOuputStructStride[i] * iNumElement; + Bufferdesc.ByteWidth = iOuputStructStride[i] * m_iNumElement; Bufferdesc.StructureByteStride = iOuputStructStride[i]; Bufferdesc.Usage = D3D11_USAGE_DEFAULT; // 인 아웃풋 버퍼는 디폴트로 설정해야함 Bufferdesc.CPUAccessFlags = 0; // 디폴트 버퍼는 CPU에서 Read Write가 불가능하며 @@ -186,10 +219,10 @@ HRESULT CComputeShader::CreateBuffer(_uint iNumElement, _uint iInputStructStride return S_OK; } -HRESULT CComputeShader::CreateResurceViews(_uint iNumElement, _uint iNumInputBuffer) +HRESULT CComputeShader::CreateResurceViews() { // SRV - for (_uint i = 0; i < iNumInputBuffer; i++) // 인풋 버퍼를 여러개 사용할 수 있도록 만든다 + for (_uint i = 0; i < m_iNumInputBuffer; i++) // 인풋 버퍼를 여러개 사용할 수 있도록 만든다 { ID3D11ShaderResourceView* pSrv = {}; @@ -197,7 +230,7 @@ HRESULT CComputeShader::CreateResurceViews(_uint iNumElement, _uint iNumInputBuf srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFEREX; srvDesc.Format = DXGI_FORMAT_UNKNOWN; srvDesc.Buffer.FirstElement = 0; - srvDesc.Buffer.NumElements = iNumElement; + srvDesc.Buffer.NumElements = m_iNumElement; if (FAILED(m_pDevice->CreateShaderResourceView(m_pInputBuffer[i], &srvDesc, &pSrv))) return E_FAIL; @@ -215,7 +248,7 @@ HRESULT CComputeShader::CreateResurceViews(_uint iNumElement, _uint iNumInputBuf uavDesc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER; uavDesc.Format = DXGI_FORMAT_UNKNOWN; uavDesc.Buffer.FirstElement = 0; - uavDesc.Buffer.NumElements = iNumElement; + uavDesc.Buffer.NumElements = m_iNumElement; ID3D11UnorderedAccessView* pOutputUAV = { nullptr }; @@ -230,7 +263,7 @@ HRESULT CComputeShader::CreateResurceViews(_uint iNumElement, _uint iNumInputBuf D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {}; srvDesc.Format = DXGI_FORMAT_UNKNOWN; // StructuredBuffer는 UNKNOWN srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; - srvDesc.Buffer.NumElements = iNumElement; + srvDesc.Buffer.NumElements = m_iNumElement; srvDesc.Buffer.FirstElement = 0; @@ -246,48 +279,26 @@ HRESULT CComputeShader::CreateResurceViews(_uint iNumElement, _uint iNumInputBuf return S_OK; } -HRESULT CComputeShader::CreateComputeShader(const _tchar* pShaderFilePath, const _char* pStartFunctionName) +HRESULT CComputeShader::CreateComputeShader() { - ID3DBlob* pCSBlob = nullptr; - - // Debug 모드와 release 모드의 플레그를 다르게 줘야함 - UINT HLSLFlags = {}; -#ifdef _DEBUG - HLSLFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; -#else - HLSLFlags = D3DCOMPILE_OPTIMIZATION_LEVEL1; -#endif // _DEBUG - - HRESULT hr = D3DCompileFromFile(pShaderFilePath, - nullptr, - D3D_COMPILE_STANDARD_FILE_INCLUDE, - pStartFunctionName, - "cs_5_0", - HLSLFlags, - 0, - &pCSBlob, - nullptr); - if (FAILED(m_pDevice->CreateComputeShader( - pCSBlob->GetBufferPointer(), // 컴파일된 쉐이더 코드 - pCSBlob->GetBufferSize(), // 코드 길이 + m_pCSBlob->GetBufferPointer(), // 컴파일된 쉐이더 코드 + m_pCSBlob->GetBufferSize(), // 코드 길이 nullptr, // 클래스 인스턴스 (없음) &m_pComputeShader // 컴퓨트 쉐이더 객체 ))) return E_FAIL; - SAFE_RELEASE(pCSBlob); - return S_OK; } -CComputeShader* CComputeShader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pShaderFilePath, const _char* pStartFunctionName, _uint iNumElement, _uint iNumInputBuffer, _uint iNumOutputBuffer, _uint iInputStructStride[], _uint iOutputStructStride[]) +CComputeShader* CComputeShader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pShaderFilePath, const _char* pStartFunctionName) { CComputeShader* pInstance = new CComputeShader(pDevice, pContext); - if (FAILED(pInstance->Initialize(pShaderFilePath, pStartFunctionName, iNumElement, iNumInputBuffer, iNumOutputBuffer, iInputStructStride, iOutputStructStride))) + if (FAILED(pInstance->Initialize_Prototype(pShaderFilePath, pStartFunctionName))) { MSG_BOX("Failed to Created : CComputeShader Prototype"); SAFE_RELEASE(pInstance); @@ -318,4 +329,28 @@ void CComputeShader::Free() SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pGameInstance); + + SAFE_RELEASE(m_pCSBlob); } + +CComponent* CComputeShader::Clone(void* pArg, CGameObject* pOwner) +{ + CComputeShader* pInstance = new CComputeShader(*this); + pInstance->m_pOwner = pOwner; + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CComputeShader"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +#ifdef _DEBUG + +void CComputeShader::Describe_Entity() +{ +} + +#endif diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 2607e65f5..d7f8972e9 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -498,11 +498,22 @@ HRESULT CInstance_Model::Create_CS() sizeof(CS_PARTICLE_VALUE_DESC), }; - m_pComputeShader = CComputeShader::Create(m_pDevice, m_pContext, - L"../Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl", "CS_MAIN", m_iNumInstance, 2, 2, CS_InputStrides, CS_OutputStrides); + //, 2, 2, CS_InputStrides, CS_OutputStrides - if (m_pComputeShader == nullptr) + CComputeShader::CS_INFO CS_Desc = {}; + + CS_Desc.iNumElement = m_iNumInstance; + CS_Desc.iNumInputBuffer = 2; + CS_Desc.iNumOutputBuffer = 2; + + CS_Desc.iInputStructStride = CS_InputStrides; + CS_Desc.iOutputStructStride = CS_OutputStrides; + + m_pComputeShader = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, CS_EFFECT, &CS_Desc, nullptr); + + if (nullptr == m_pComputeShader) { return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp index 107a7be76..f8a364bae 100644 --- a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp @@ -98,6 +98,12 @@ HRESULT CPrototype_Manager::Ready_StaticComponents() if (FAILED(Add_Prototype(g_iStaticLevel, CLight::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + +#pragma region Compute Shader + + + +#pragma endregion return S_OK; } @@ -120,6 +126,24 @@ HRESULT CPrototype_Manager::Ready_EngineAssets() return E_FAIL; } +#pragma region COMPUTE_SHADER + + if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_EFFECT, + CComputeShader::Create(m_pDevice, m_pContext, + L"../Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl", "CS_MAIN")))) { + return E_FAIL; + + } + + if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_INSTANCE_MODEL, + CComputeShader::Create(m_pDevice, m_pContext, + L"../Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl", "CS_MAIN")))) { + return E_FAIL; + + } + +#pragma endregion + return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp index d916afa88..1fe4a9844 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp @@ -369,11 +369,20 @@ HRESULT CVIBuffer_Model_Instance::Create_ComputeShader() sizeof(VTX_INSTANCE_MODEL), }; - m_pComputeShader = CComputeShader::Create(m_pDevice, m_pContext, - L"../Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl", "CS_MAIN", m_iMaxNumInstance, 2, 1, CS_InputStrides, CS_OutputStrides); + CComputeShader::CS_INFO CS_Desc = {}; - if (m_pComputeShader == nullptr) + CS_Desc.iNumElement = m_iMaxNumInstance; + CS_Desc.iNumInputBuffer = 2; + CS_Desc.iNumOutputBuffer = 1; + + CS_Desc.iInputStructStride = CS_InputStrides; + CS_Desc.iOutputStructStride = CS_OutputStrides; + + m_pComputeShader = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, CS_INSTANCE_MODEL, &CS_Desc, nullptr); + + if (nullptr == m_pComputeShader) { return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Engine/Public/ComputeShader.h b/Jusin154_Team3D/Engine/Public/ComputeShader.h index 859e4a7c5..5b80aebd2 100644 --- a/Jusin154_Team3D/Engine/Public/ComputeShader.h +++ b/Jusin154_Team3D/Engine/Public/ComputeShader.h @@ -1,18 +1,29 @@ #pragma once -#include "Base.h" +#include "Component.h" NS_BEGIN(Engine) -class ENGINE_DLL CComputeShader final : public CBase +class ENGINE_DLL CComputeShader final : public CComponent { +public: + typedef struct tagComputeShaderInfo + { + _uint iNumElement = {}; + _uint iNumInputBuffer = {}; + _uint iNumOutputBuffer = {}; + _uint* iInputStructStride = { nullptr }; + _uint* iOutputStructStride = { nullptr }; + }CS_INFO; private: CComputeShader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CComputeShader(const CComputeShader& rhs); virtual ~CComputeShader() = default; public: - HRESULT Initialize(const _tchar* pShaderFilePath, const _char* pStartFunctionName, _uint iNumElement, _uint iNumInputBuffer, _uint iNumOutputBuffer, _uint iInputStructStride[], _uint iOutputStructStride[]); + virtual HRESULT Initialize_Prototype(const _tchar* pShaderFilePath, const _char* pStartFunctionName); + virtual HRESULT Initialize(void* pArg); public: vector Dispatch(_uint iSRVIndex, _uint iUAVIndex, _float3 vGroupCount, ID3D11Buffer** ppBuffers, ID3D11Buffer* pConstantBuffer = nullptr); void Bind_OutPut_SRV(_uint iIndex, _uint iBufferIndex); @@ -24,14 +35,9 @@ class ENGINE_DLL CComputeShader final : public CBase void Bind_UAV(_uint iIndex); void Reset(); - HRESULT CreateBuffer(_uint iNumElement, _uint iInputStructStride[], _uint iOuputStructStride[]); - HRESULT CreateResurceViews(_uint iNumElement, _uint iNumInputBuffer); - HRESULT CreateComputeShader(const _tchar* pShaderFilePath, const _char* pStartFunctionName); - -private: - ID3D11Device* m_pDevice = { nullptr }; - ID3D11DeviceContext* m_pContext = { nullptr }; - class CGameInstance* m_pGameInstance = { nullptr }; + HRESULT CreateBuffer(_uint iInputStructStride[], _uint iOuputStructStride[]); + HRESULT CreateResurceViews(); + HRESULT CreateComputeShader(); private: vector m_pInputSRV = {}; @@ -42,9 +48,9 @@ class ENGINE_DLL CComputeShader final : public CBase vector m_pOutputBuffer = {}; - ID3D11ComputeShader* m_pComputeShader = nullptr; - + ID3D11ComputeShader* m_pComputeShader = nullptr; + ID3DBlob* m_pCSBlob = nullptr; private: _uint m_iNumElement = 0; // 인수 개수 @@ -52,8 +58,13 @@ class ENGINE_DLL CComputeShader final : public CBase _uint m_iNumOutputBuffer = 0; // 인풋 버퍼의 개수 public: - static CComputeShader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pShaderFilePath, const _char* pStartFunctionName, _uint iNumElement, _uint iNumInputBuffer, _uint iNumOutputBuffer, _uint iInputStructStride[], _uint iOutputStructStride[]); + static CComputeShader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pShaderFilePath, const _char* pStartFunctionName); virtual void Free() override; + CComponent* Clone(void* pArg, CGameObject* pOwner) override; + +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG }; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 3a1da1fd2..4a75001d4 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -75,6 +75,8 @@ #define FX_LASTCOLOR TEXT("FX_LASTCOLOR") #define FX_WEIGHTBELND TEXT("FX_WEIGHTBELND") +#define CS_EFFECT TEXT("CS_EFFECT") +#define CS_INSTANCE_MODEL TEXT("CS_INSTANCE_MODEL") #define SAFE_ADDREF(pInstance) Safe_AddRef(pInstance) #define SAFE_RELEASE(pInstance) Safe_Release(pInstance) diff --git a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h index 67caa7a82..c85c903ac 100644 --- a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h @@ -22,6 +22,7 @@ #include "Trail.h" #include "OcclusionQuery.h" #include "Font.h" +#include "ComputeShader.h" NS_BEGIN(Engine) class CGameInstance; From ee9550c83d265d253aec1e04392f228c79b273d2 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 10:56:57 +0900 Subject: [PATCH 16/22] [fix] SSAO Radius --- Jusin154_Team3D/Client/Private/EffectPool.cpp | 28 ++++++- .../Client/Private/Loding_Panel.cpp | 80 +++++-------------- Jusin154_Team3D/Client/Public/Loding_Panel.h | 66 ++++++++------- .../ShaderFiles/Shader_Deferred.hlsl | 8 +- .../ShaderFiles/Shader_Deferred.hlsl | 8 +- Jusin154_Team3D/Engine/Private/Fog.cpp | 13 +-- Jusin154_Team3D/Engine/Public/Renderer.h | 9 ++- 7 files changed, 101 insertions(+), 111 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index c88288733..758a3b99e 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -57,9 +57,8 @@ HRESULT CEffectPool::Initialize(void* pArg) if (FAILED(Ready_Components())) { return E_FAIL; } - + // 디버그 모드일 때 #ifdef _DEBUG - #ifdef gimch m_isActiveEffectCreate = false; m_isActiveMonsterEffectCreate = false; @@ -80,8 +79,31 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveEffectCreate = false; m_isActiveMonsterEffectCreate = false; #endif // - #endif + //// 디버그 모드가 아닐 때, 릴리즈모드에 +#ifndef _DEBUG +#ifdef gimch + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // gimch +#ifdef Bin + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 진우 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 기무리 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 인혁 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#endif // !_DEBUG + if (m_isActiveEffectCreate) { diff --git a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp index d65d0d073..674b21773 100644 --- a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp @@ -44,17 +44,22 @@ HRESULT CLoding_Panel::Initialize(void* pArg) Visible(true); m_bActive = true; //m_vImageposSi = _float4(0.f, 0.f, 1792.f, 1024.f); -#ifdef _DEBUG - INHYUK = true; - human = 0; -#endif // DEBUG - + m_iToolTip_Count = 0; + ToolTipSetting(); return S_OK; } void CLoding_Panel::Set_Image(_int Index) { m_iImageNum = Index; } +void CLoding_Panel::ToolTipSetting() +{ + ToolTip[0] = TEXT("알고 계셨나요?\nF9를 눌러 브레이크포인트를 설정할 수 있습니다."); + ToolTip[1] = TEXT("알고 계셨나요?\nF12를 눌러 정의로 바로 이동할 수 있습니다!."); + ToolTip[2] = TEXT("알고 계셨나요?\n디버깅 중에도 핫 리로드로 코드를 수정할 수 있습니다."); + ToolTip[3] = TEXT("알고 계셨나요?\nCtrl + R, R로 변수 또는 함수 이름을 프로젝트 전체에서 일괄 변경할 수 있습니다."); + ToolTip[4] = TEXT("알고 계셨나요?\n디버깅 중 변수에 마우스를 올리면 현재 값을 확인할 수 있습니다."); +} void CLoding_Panel::Priority_Update(_float fTimeDelta) { } @@ -63,54 +68,17 @@ void CLoding_Panel::Update(_float fTimeDelta) { if (m_pGameInstance->Key_Down(DIK_M)) { - human++; - if (human > 4) // 4보다 크면 0으로 - human = 0; + m_iToolTip_Count++; + if (m_iToolTip_Count > 4) // 4보다 크면 0으로 + m_iToolTip_Count = 0; } if (m_pGameInstance->Key_Down(DIK_N)) { - human--; - if (human < 0) // 0보다 작으면 4로 - human = 4; - } - switch (human) - { - case 0: - INHYUK = true; - JINHO = false; - HYUNBIN = false; - NURI = false; - JINWOO = false; - break; - case 1: - INHYUK = false; - JINHO = true; - HYUNBIN = false; - NURI = false; - JINWOO = false; - break; - case 2: - INHYUK = false; - JINHO = false; - HYUNBIN = true; - NURI = false; - JINWOO = false; - break; - case 3: - INHYUK = false; - JINHO = false; - HYUNBIN = false; - NURI = true; - JINWOO = false; - break; - case 4: - INHYUK = false; - JINHO = false; - HYUNBIN = false; - NURI = false; - JINWOO = true; - break; + m_iToolTip_Count--; + if (m_iToolTip_Count < 0) // 0보다 작으면 4로 + m_iToolTip_Count = 4; } + __super::Update(fTimeDelta); } @@ -133,20 +101,10 @@ HRESULT CLoding_Panel::Render() if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } -#ifdef _DEBUG m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M ->."), _float2(100.f, 750.f)); - if (INHYUK == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF9를 눌러 브레이크포인트를 설정할 수 있습니다."), _float2(100.f, 800.f)); - if (JINHO == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF12를 눌러 정의로 바로 이동할 수 있습니다!."), _float2(100.f, 800.f)); - if (HYUNBIN == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중에도 핫 리로드로 코드를 수정할 수 있습니다."), _float2(100.f, 800.f)); - if (NURI == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nCtrl + R, R로 변수 또는 함수 이름을 프로젝트 전체에서 일괄 변경할 수 있습니다."), _float2(100.f, 800.f)); - if (JINWOO == true) - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중 변수에 마우스를 올리면 현재 값을 확인할 수 있습니다."), _float2(100.f, 800.f)); -#endif // DEBUG + m_pGameInstance->Render_Text(TEXT("Font_size20"), ToolTip[m_iToolTip_Count].c_str(), _float2(100.f, 800.f)); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/Loding_Panel.h b/Jusin154_Team3D/Client/Public/Loding_Panel.h index 33fd32b47..50046a73b 100644 --- a/Jusin154_Team3D/Client/Public/Loding_Panel.h +++ b/Jusin154_Team3D/Client/Public/Loding_Panel.h @@ -15,55 +15,59 @@ class CLoding_Panel final : public CUIObject { private: - CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CLoding_Panel(const CLoding_Panel& rhs); - virtual ~CLoding_Panel() = default; + CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoding_Panel(const CLoding_Panel& rhs); + virtual ~CLoding_Panel() = default; public: - virtual void Priority_Update(_float fTimeDelta); - virtual void Update(_float fTimeDelta); - virtual void Late_Update(_float fTimeDelta); - virtual HRESULT Render() override; - virtual _vector Get_WorldPostion() override; + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; private: - virtual HRESULT Bind_ShaderResources() override; - virtual HRESULT Ready_Components(void* pArg) override; - virtual HRESULT Initialize_Prototype() override; - virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; public: - void Set_Image(_int Index); + void Set_Image(_int Index); + void ToolTipSetting(); private: - CTexture* m_pDiffuse_TextureCom = { nullptr }; - CTexture* m_pDiffuse_TextureCom1 = { nullptr }; - CShader* m_pShaderCom = { nullptr }; - CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - CGameObject* m_pCurrent_Spell_Slot = { nullptr }; - CGameObject* m_pLoadingWidget = { nullptr }; + CGameObject* m_pCurrent_Spell_Slot = { nullptr }; + CGameObject* m_pLoadingWidget = { nullptr }; - _int m_iImageNum{}; - _float4 m_vImageposSi{}; + _int m_iImageNum{}; + _float4 m_vImageposSi{}; + + _wstring ToolTip[5]; + _int m_iToolTip_Count{}; #ifdef _DEBUG - _bool INHYUK = { false }; - _bool JINHO = { false }; - _bool HYUNBIN = { false }; - _bool NURI = { false }; - _bool JINWOO = { false }; - _int human{}; + _bool INHYUK = { false }; + _bool JINHO = { false }; + _bool HYUNBIN = { false }; + _bool NURI = { false }; + _bool JINWOO = { false }; + _int human{}; #endif public: - static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; - virtual void Free() override; + static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; #ifdef _DEBUG - void Describe_Entity() override; + void Describe_Entity() override; #endif // _DEBUG diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index edd08da29..5dcc23f6f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -940,9 +940,9 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In) float4 vDepthDesc = g_DepthTexture.Sample(PointSampler, uv); float fCenterViewSpaceZ = vDepthDesc.y * g_fFar; // n ~ f - float fRatio = lerp(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar); - if (fRatio <= 0.f) - { + float fRatio = saturate(smoothstep(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar)); // 멀어지면 너무 반짝거려서 스무딩 + + if (fRatio <= 0.f) { Out.fOcclusion = 1.f; return Out; } @@ -1007,7 +1007,7 @@ PS_OUT_SSAO_BLUR PS_SSAO_BLUR(PS_IN In) for (int y = -2; y < 2; ++y) { float2 vOffset = float2((float) x, (float) y) * vTexelSize; - fResult += g_SSAOInputTexture.Sample(DefaultSampler, In.vTexcoord + vOffset).r; + fResult += g_SSAOInputTexture.Sample(BorderZeroSampler, In.vTexcoord + vOffset).r; } } diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index edd08da29..5dcc23f6f 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -940,9 +940,9 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In) float4 vDepthDesc = g_DepthTexture.Sample(PointSampler, uv); float fCenterViewSpaceZ = vDepthDesc.y * g_fFar; // n ~ f - float fRatio = lerp(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar); - if (fRatio <= 0.f) - { + float fRatio = saturate(smoothstep(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar)); // 멀어지면 너무 반짝거려서 스무딩 + + if (fRatio <= 0.f) { Out.fOcclusion = 1.f; return Out; } @@ -1007,7 +1007,7 @@ PS_OUT_SSAO_BLUR PS_SSAO_BLUR(PS_IN In) for (int y = -2; y < 2; ++y) { float2 vOffset = float2((float) x, (float) y) * vTexelSize; - fResult += g_SSAOInputTexture.Sample(DefaultSampler, In.vTexcoord + vOffset).r; + fResult += g_SSAOInputTexture.Sample(BorderZeroSampler, In.vTexcoord + vOffset).r; } } diff --git a/Jusin154_Team3D/Engine/Private/Fog.cpp b/Jusin154_Team3D/Engine/Private/Fog.cpp index 39fefeaa3..aec885d50 100644 --- a/Jusin154_Team3D/Engine/Private/Fog.cpp +++ b/Jusin154_Team3D/Engine/Private/Fog.cpp @@ -35,6 +35,7 @@ HRESULT CFog::Bind_FogValue(CShader* pShader) } #else pShader->Bind_RawValue("g_fFogDensity", &m_fFogDensity, sizeof(_float)); + pShader->Bind_RawValue("g_fFogPow", &m_fFogPow, sizeof(_float)); pShader->Bind_RawValue("g_vFogColor", &m_vFogColor, sizeof(_float4)); #endif // _DEBUG @@ -44,11 +45,13 @@ HRESULT CFog::Bind_FogValue(CShader* pShader) #ifdef _DEBUG void CFog::Update_Fog() { - GUI::Begin("Fog Edit"); - GUI::Checkbox("Fog ON / OFF", &m_bVisible); - GUI::InputFloat("g_fFogDensity", &m_fFogDensity, 0.001f); - GUI::InputFloat("g_fFogPow", &m_fFogPow, 0.1f); - GUI::ColorEdit4("Fog Color", (_float*)(&m_vFogColor), ImGuiColorEditFlags_NoInputs); + GUI::Begin("Renderer"); + if (GUI::CollapsingHeader("FOG")) { + GUI::Checkbox("Fog ON / OFF", &m_bVisible); + GUI::InputFloat("g_fFogDensity", &m_fFogDensity, 0.001f); + GUI::InputFloat("g_fFogPow", &m_fFogPow, 0.1f); + GUI::ColorEdit4("Fog Color", (_float*)(&m_vFogColor), ImGuiColorEditFlags_NoInputs); + } GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index 64722989b..29eacb11c 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -53,17 +53,20 @@ class CRenderer final : public CBase _int m_iToneMappingType = { 2 }; _float m_fExposure = { 0.7f }; + // Bloom _int m_iBloomEmbossingPass = { 0 }; _float m_fBloomThreshold = { 1.26f }; - + + // DOF Environment _float m_fDOF_ENV_CutThreshold = { 0.1350f }; _float m_fDOF_ENV_FocusDistance = { 31.1f }; _float m_fDOF_ENV_StartDistance = { 53.1f }; _float m_fDOF_ENV_MaxEnd = { 360.f }; _float m_fDOF_ENV_AmountRadius = { 1.f }; - _float m_fSSAO_Radius = { 0.812f }; - _float m_fSSAO_BIAS = { 0.042f }; + // SSAO + _float m_fSSAO_Radius = { 1.6300f }; + _float m_fSSAO_BIAS = { 0.234f }; SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {}; SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL m_tagSSAOGeometryDirections = {}; From d13ad12d779bf31f641fe5d8d14ede11da0f41ff Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 11:01:06 +0900 Subject: [PATCH 17/22] [fix] First Camera --- Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp | 2 +- Jusin154_Team3D/Client/Private/Camera_Debug.cpp | 3 --- Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index a46a4728b..fe70f65af 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -335,7 +335,7 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CameraDesc.fRotationPerSec = XMConvertToRadians(90.f); CameraDesc.pFollowTarget = m_pTarget_FollowPart; CameraDesc.pLookTarget = m_pTarget_LookPart; - CameraDesc.iPriority = 51; + CameraDesc.iPriority = 99; CameraDesc.pCameraKey = CAMERA_SHOULDER; CameraDesc.bEnableTransitionLerp = true; CameraDesc.bEnableFollowLerp = false; diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index 42de744a8..b5da3e13c 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -17,12 +17,9 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs) void CCamera_Debug::Priority_Update(_float fTimeDelta) { -#ifndef 기무리 #ifdef _DEBUG m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false); #endif // _DEBUG -#endif // !기무리 - } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index d6f4373fe..69336fb91 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -463,9 +463,6 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() } m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG); - if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) { - return E_FAIL; - } #endif // _DEBUG From 1911fb473b340fccf8bfaa75399aec1e2f9276f0 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 11:08:16 +0900 Subject: [PATCH 18/22] [fix] first camera --- Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp | 2 +- Jusin154_Team3D/Client/Private/Camera_Debug.cpp | 4 ++-- Jusin154_Team3D/Client/Private/Camera_Gaze.cpp | 4 ++-- Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index fe70f65af..0682a946f 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -335,7 +335,7 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CameraDesc.fRotationPerSec = XMConvertToRadians(90.f); CameraDesc.pFollowTarget = m_pTarget_FollowPart; CameraDesc.pLookTarget = m_pTarget_LookPart; - CameraDesc.iPriority = 99; + CameraDesc.iPriority = 55; CameraDesc.pCameraKey = CAMERA_SHOULDER; CameraDesc.bEnableTransitionLerp = true; CameraDesc.bEnableFollowLerp = false; diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index b5da3e13c..782382ece 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -25,7 +25,7 @@ void CCamera_Debug::Priority_Update(_float fTimeDelta) void CCamera_Debug::Update(_float fTimeDelta) { - if (false == m_bActive) { + if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_DEBUG))) { return; } Transition(fTimeDelta); @@ -90,7 +90,7 @@ void CCamera_Debug::Update(_float fTimeDelta) void CCamera_Debug::Late_Update(_float fTimeDelta) { - if (false == m_bActive) { + if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_DEBUG))) { return; } } diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index 55725ff98..74b3075dc 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -100,11 +100,11 @@ void CCamera_Gaze::Enable_LookLerp() void CCamera_Gaze::Toggle_Priority() { - if (m_iPriority == 99) { + if (m_iPriority == 55) { m_iPriority = 51; } else { - m_iPriority = 99; + m_iPriority = 55; m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, false); } } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 69336fb91..e620c010d 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -453,7 +453,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() Camera_Desc.pCameraKey = CAMERA_DEBUG; Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f); Camera_Desc.fMouseSensor = 0.1f; - Camera_Desc.iPriority = 70; + Camera_Desc.iPriority = 53; Camera_Desc.pFollowTarget = { nullptr }; Camera_Desc.pLookTarget = { nullptr }; From d871ab4a42f7e0e8ad3fc7f5ddda674f9e839b1c Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 11:14:47 +0900 Subject: [PATCH 19/22] [fix] gob DoubleRelease --- Jusin154_Team3D/Client/Private/EffectPool.cpp | 8 ++++---- Jusin154_Team3D/Client/Private/Goblin.cpp | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 60b680774..56cfb9f17 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -73,8 +73,8 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveMonsterEffectCreate = true; #endif // #ifdef 기무리 - m_isActiveEffectCreate = false; - m_isActiveMonsterEffectCreate = false; + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; #endif // #ifdef 인혁 m_isActiveEffectCreate = false; @@ -96,8 +96,8 @@ HRESULT CEffectPool::Initialize(void* pArg) m_isActiveMonsterEffectCreate = true; #endif // #ifdef 기무리 - m_isActiveEffectCreate = false; - m_isActiveMonsterEffectCreate = false; + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; #endif // #ifdef 인혁 m_isActiveEffectCreate = true; diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index e93096901..6c239e7f3 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -481,7 +481,6 @@ void CGoblin::Free() SAFE_RELEASE(m_pSmoke); SAFE_RELEASE(m_pGoblin_Particle); SAFE_RELEASE(m_pGoblin_Particle2); - SAFE_RELEASE(m_pDetection); SAFE_RELEASE(m_pEffectPool); Safe_Delete(m_pCallBack_Behavior); Safe_Delete(m_pCallBack_HitReport); From 60466e532b89a93c45d6e7fab49781ec5679eb49 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 11:23:22 +0900 Subject: [PATCH 20/22] [fix] Renderer Release Debug diff --- .../Engine/Private/Renderer_Declare.cpp | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp index eeca15ec1..9530ffd6c 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -513,45 +513,31 @@ void CRenderer::Describe_Entitiy() if (GUI::CollapsingHeader("PostProcessing_Bloom")) { GUI::BeginChild("PostProcessing_Bloom"); - GUI::PushItemWidth(80); GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f"); GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); - GUI::PopItemWidth(); GUI::EndChild(); } if (GUI::CollapsingHeader("Environment DOF")) { GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true); - GUI::PushItemWidth(80.0f); GUI::Text("Far DOF (Environment)"); GUI::Separator(); GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f"); - GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f"); - GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f"); - GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f"); - GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); +#ifdef _DEBUG if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; } - if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; } - - GUI::PopItemWidth(); - GUI::EndChild(); - } - if (GUI::CollapsingHeader("ToneMapping")) { - GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true); - GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d"); - GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f"); +#endif // _DEBUG GUI::EndChild(); } if (GUI::CollapsingHeader("SSAO")) { @@ -560,6 +546,12 @@ void CRenderer::Describe_Entitiy() GUI::DragFloat("fSSAO_BIAS", &m_fSSAO_BIAS, 0.001f, -2.f, 2.f, "%.5f"); GUI::EndChild(); } + if (GUI::CollapsingHeader("ToneMapping")) { + GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true); + GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d"); + GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f"); + GUI::EndChild(); + } GUI::End(); } #endif From ae439ab69332a3cc9eaf66b8895ae6a93d2cc4bd Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 12:30:12 +0900 Subject: [PATCH 21/22] =?UTF-8?q?[add]=20IMGUI=20=EC=A0=95=EB=A6=AC=201?= =?UTF-8?q?=EC=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Broom.cpp | 44 ++--- .../Client/Private/CamPosition_Shoulder.cpp | 17 +- .../Client/Private/Camera_Gaze.cpp | 44 ++--- Jusin154_Team3D/Client/Private/Goblin.cpp | 58 +++--- .../Client/Private/Goblin_Mage.cpp | 60 +++--- .../Client/Private/Goblin_Spector.cpp | 11 +- Jusin154_Team3D/Client/Private/Light_Main.cpp | 6 +- Jusin154_Team3D/Client/Private/MainApp.cpp | 2 + Jusin154_Team3D/Client/Private/MapInfo.cpp | 59 +++--- .../Client/Private/NPC_Ollivander.cpp | 24 ++- Jusin154_Team3D/Client/Private/Player.cpp | 173 +++++++++--------- Jusin154_Team3D/Client/Private/Troll.cpp | 14 +- Jusin154_Team3D/Client/Private/Troll_Rock.cpp | 7 +- .../Client/Private/Troll_Weapon.cpp | 40 ++-- Jusin154_Team3D/Client/Private/Wand.cpp | 40 ++-- Jusin154_Team3D/Engine/Private/Camera.cpp | 2 +- .../Engine/Private/Character_Controller.cpp | 103 +++++------ Jusin154_Team3D/Engine/Private/Fog.cpp | 2 +- .../Engine/Private/GameObject_Manager.cpp | 50 ++--- Jusin154_Team3D/Engine/Private/Model.cpp | 2 - .../Engine/Private/Mouse_Manager.cpp | 91 ++++----- Jusin154_Team3D/Engine/Private/Renderer.cpp | 4 +- .../Engine/Private/Renderer_Declare.cpp | 78 ++++---- .../Engine/Private/Resource_Manager.cpp | 121 ++++++------ Jusin154_Team3D/Engine/Private/Trail.cpp | 12 +- Jusin154_Team3D/Engine/Public/Mouse_Manager.h | 7 +- 26 files changed, 542 insertions(+), 529 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 35ab613d9..43fe3ba59 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -204,33 +204,35 @@ void CBroom::Free() void CBroom::Describe_Entity() { + GUI::Begin("UNIT"); + if (GUI::CollapsingHeader("Broom")) { + GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f); + GUI::DragFloat("Speed", &m_fSpeed, 0.01f); + GUI::DragFloat("Accle", &m_fAccel, 0.01f); + GUI::DragFloat("Decel", &m_fDecel, 0.01f); - GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f); - GUI::DragFloat("Speed", &m_fSpeed, 0.01f); - GUI::DragFloat("Accle", &m_fAccel, 0.01f); - GUI::DragFloat("Decel", &m_fDecel, 0.01f); + string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); + GUI::Text(AnimList.c_str()); + GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex()); - string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); - GUI::Text(AnimList.c_str()); - GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); - GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); - GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); - _float3 Pos; - XMStoreFloat3(&Pos, Get_WorldPostion()); - - float Pos3[3] = { Pos.x, Pos.y, Pos.z }; - GUI::DragFloat3("Pos", Pos3); + float Pos3[3] = { Pos.x, Pos.y, Pos.z }; + GUI::DragFloat3("Pos", Pos3); - _float RotR, RotU, RotL; - RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); - RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); - RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); - - float Rot3[3] = { RotR, RotU,RotL }; - GUI::DragFloat3("Rot", Rot3); + _float RotR, RotU, RotL; + RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); + RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); + RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); + float Rot3[3] = { RotR, RotU,RotL }; + GUI::DragFloat3("Rot", Rot3); + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index 0682a946f..abb5e1af6 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -392,15 +392,16 @@ void CCamPosition_Shoulder::Free() void CCamPosition_Shoulder::Describe_Entity() { - GUI::Begin("Cam_Shoulder"); - m_pTransformCom->Describe_Entity(); + GUI::Begin("CAMERA"); + if (GUI::CollapsingHeader("Cam_Shoulder")) { + m_pTransformCom->Describe_Entity(); - GUI::Text("fMouseSensor : %.1f", m_fMouseSensor); - GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f"); - GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f); - GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f); - GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f); - //GUI:: + GUI::Text("fMouseSensor : %.1f", m_fMouseSensor); + GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f"); + GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f); + GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f); + GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f); + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index 74b3075dc..f13f6cd71 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -182,30 +182,32 @@ void CCamera_Gaze::Free() void CCamera_Gaze::Describe_Entity() { - GUI::Begin("Camera_Gaze_Describe"); - m_pTransformCom->Describe_Entity(); - GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z); - GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z); - GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z); - GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z); - GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp); - if (true == m_bEnable_TransitionLerp) { - GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y); - GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f"); - } + GUI::Begin("CAMERA"); + if (GUI::CollapsingHeader("Camera_Gaze_Describe")) { + m_pTransformCom->Describe_Entity(); + GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z); + GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z); + GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z); + GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z); + GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp); + if (true == m_bEnable_TransitionLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y); + GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f"); + } - GUI::Checkbox("LookLerp", &m_bEnable_LookLerp); - if (true == m_bEnable_LookLerp) { - GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y); - GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f"); - } + GUI::Checkbox("LookLerp", &m_bEnable_LookLerp); + if (true == m_bEnable_LookLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y); + GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f"); + } - GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp); - if (true == m_bEnable_FollowLerp) { - GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y); - GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f"); - } + GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp); + if (true == m_bEnable_FollowLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y); + GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f"); + } + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index 6c239e7f3..d9b49865e 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -86,10 +86,6 @@ void CGoblin::Update(_float fTimeDelta) __super::Update(fTimeDelta); Play_Event(); -#ifdef _DEBUG - GUI::Text("%d", m_pCharacter_Controller->IsActive()); - GUI::Text("%f %f", m_vStunTimer.x, m_vStunTimer.y); -#endif // _DEBUG if (true == m_pCharacter_Controller->IsActive()) { { // 세트 @@ -489,40 +485,40 @@ void CGoblin::Free() void CGoblin::Describe_Entity() { - GUI::Begin("Goblin"); + GUI::Begin("UNIT"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Goblin")) { + GUI::Checkbox("LookAt", &m_bLookAt); - GUI::Checkbox("LookAt", &m_bLookAt); + string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); + GUI::Text(AnimList.c_str()); - string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); - GUI::Text(AnimList.c_str()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); - GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); - GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + _float4 vMomentum = {}; + XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); + GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); - _float4 vMomentum = {}; - XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); - GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); - _float3 Pos; - XMStoreFloat3(&Pos, Get_WorldPostion()); + if (GUI::DragFloat3("Pos", (_float*)&Pos)) + { + m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos)); + } - if (GUI::DragFloat3("Pos", (_float*)&Pos)) - { - m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos)); + XMFLOAT3 f3; + XMStoreFloat3(&f3, m_vOriginPos); + + GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z); + + m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos)); + + GUI::Text("Length %.2f", m_fLength); + + GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance); } - - XMFLOAT3 f3; - XMStoreFloat3(&f3, m_vOriginPos); - - GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z); - - m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos)); - - GUI::Text("Length %.2f", m_fLength); - - GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance); - - GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index c4f48b804..b27b6b0eb 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -84,10 +84,6 @@ void CGoblin_Mage::Update(_float fTimeDelta) __super::Update(fTimeDelta); Play_Event(); -#ifdef _DEBUG - GUI::Text("%d", m_pCharacter_Controller->IsActive()); - GUI::Text("%f %f", m_vStunTimer.x, m_vStunTimer.y); -#endif // _DEBUG if (true == m_pCharacter_Controller->IsActive()) { { // 세트 @@ -447,40 +443,42 @@ void CGoblin_Mage::Free() void CGoblin_Mage::Describe_Entity() { - GUI::Begin("Goblin"); + GUI::Begin("UNIT"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Goblin_Mage")) { - GUI::Checkbox("LookAt", &m_bLookAt); + GUI::Checkbox("LookAt", &m_bLookAt); - string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); - GUI::Text(AnimList.c_str()); + string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); + GUI::Text(AnimList.c_str()); - GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); - GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); - _float4 vMomentum = {}; - XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); - GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); + _float4 vMomentum = {}; + XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); + GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); - _float3 Pos; - XMStoreFloat3(&Pos, Get_WorldPostion()); + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); + + if (GUI::DragFloat3("Pos", (_float*)&Pos)) + { + m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos)); + } + + XMFLOAT3 f3; + XMStoreFloat3(&f3, m_vOriginPos); + + GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z); + + m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos)); + + GUI::Text("Length %.2f", m_fLength); + + GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance); - if (GUI::DragFloat3("Pos", (_float*)&Pos)) - { - m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos)); } - - XMFLOAT3 f3; - XMStoreFloat3(&f3, m_vOriginPos); - - GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z); - - m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos)); - - GUI::Text("Length %.2f", m_fLength); - - GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance); - - GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp index 81a11db7c..5e9759d9f 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp @@ -348,11 +348,12 @@ void CGoblin_Spector::Free() void CGoblin_Spector::Describe_Entity() { - - GUI::Begin("GoblinSpector"); - _float3 vScale = m_pTransformCom->Get_Scale(); - GUI::DragFloat3("Scale", (_float*)&vScale); - + GUI::Begin("UNIT"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("GoblinSpector")) { + _float3 vScale = m_pTransformCom->Get_Scale(); + GUI::DragFloat3("Scale", (_float*)&vScale); + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Light_Main.cpp b/Jusin154_Team3D/Client/Private/Light_Main.cpp index 646cf2a7a..92375b4cf 100644 --- a/Jusin154_Team3D/Client/Private/Light_Main.cpp +++ b/Jusin154_Team3D/Client/Private/Light_Main.cpp @@ -39,8 +39,10 @@ void CLight_Main::Priority_Update(_float fTimeDelta) void CLight_Main::Update(_float fTimeDelta) { #ifdef _DEBUG - GUI::Begin("Main_Light"); - m_pLightCom->Describe_Entity(); + GUI::Begin("LIGHT"); + if (GUI::CollapsingHeader("Main_Light")) { + m_pLightCom->Describe_Entity(); + } GUI::End(); #endif // _DEBUG } diff --git a/Jusin154_Team3D/Client/Private/MainApp.cpp b/Jusin154_Team3D/Client/Private/MainApp.cpp index 06a03fb36..e43ad8f0e 100644 --- a/Jusin154_Team3D/Client/Private/MainApp.cpp +++ b/Jusin154_Team3D/Client/Private/MainApp.cpp @@ -68,7 +68,9 @@ void CMainApp::Update(_float fTimeDelta) GUI::NewFrame(); #ifdef _DEBUG m_pGameInstance->Present_TimeCost(); + GUI::Begin("SYSTEM"); GUI::SliderFloat("fTimeMult", &g_fTimeMult, 0.01f, 4.f); + GUI::End(); m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult); #endif // _DEBUG #ifndef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp index 754bad348..4bd73d904 100644 --- a/Jusin154_Team3D/Client/Private/MapInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp @@ -680,44 +680,45 @@ void CMapInfo::Free() void CMapInfo::Describe_Entity() { - CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND); - if (nullptr == pLayer) { - return; - } - static _bool s_bConverted = { false }; - static _bool s_bReadyToCreate = { false }; + GUI::Begin("CLIENT_SYSTEM"); + if (GUI::CollapsingHeader("MapInfoDesc")) { + CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND); + if (nullptr == pLayer) { + return; + } + static _bool s_bConverted = { false }; + static _bool s_bReadyToCreate = { false }; - const list* pObjects = pLayer->Get_Objects(); + const list* pObjects = pLayer->Get_Objects(); - GUI::Begin("MapInfoDesc"); - GUI::SetNextItemWidth(80.f); - GUI::BeginChild("CollisonPartObjects"); - GUI::SetNextItemWidth(80.f); - if (false == s_bReadyToCreate) { - if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) { - s_bReadyToCreate = true; - list::const_iterator iter = pObjects->begin(); - for (; iter != pObjects->end(); ++iter) { - CMapContainer* pContainer = dynamic_cast(*iter); - if (nullptr != pContainer) { - pContainer->ReadyForPhysX(); + GUI::SetNextItemWidth(80.f); + GUI::BeginChild("CollisonPartObjects"); + if (false == s_bReadyToCreate) { + if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) { + s_bReadyToCreate = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ReadyForPhysX(); + } } } } - } - else if (false == s_bConverted) { - if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) { - s_bConverted = true; - list::const_iterator iter = pObjects->begin(); - for (; iter != pObjects->end(); ++iter) { - CMapContainer* pContainer = dynamic_cast(*iter); - if (nullptr != pContainer) { - pContainer->ConvertToPhysX(); + else if (false == s_bConverted) { + if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) { + s_bConverted = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ConvertToPhysX(); + } } } } + GUI::EndChild(); } - GUI::EndChild(); GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index e79d87d7f..12f84ca23 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -196,21 +196,25 @@ void CNPC_Ollivander::Free() void CNPC_Ollivander::Describe_Entity() { - m_pModelCom->Describe_Entity(); - if (ImGui::TreeNode("ANIM STATE")) { + GUI::Begin("UNIT"); + if (GUI::CollapsingHeader("Ollivander")) { + m_pModelCom->Describe_Entity(); + if (ImGui::TreeNode("ANIM STATE")) { - for (auto& pState : m_States) - { - if (ImGui::Button(to_string(pState.first).c_str())) + for (auto& pState : m_States) { - m_pFSM->Change_State(pState.first); + if (ImGui::Button(to_string(pState.first).c_str())) + { + m_pFSM->Change_State(pState.first); + } } + + GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); + + ImGui::TreePop(); } - - GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); - - ImGui::TreePop(); } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 967a66f84..2c3c25b71 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -337,42 +337,47 @@ void CPlayer::Render_CameraCoordinateSystem() const _float fArrowLength = 2.0f; _vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); _float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) }; - GUI::Begin("Player_CAM_COOORD"); - GUI::Text("%d", m_LockOnInfo.pUnit); - GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z); - GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z); - GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z); - GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z); - - _float fButtonSize = 45.f; - GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button("##2", { fButtonSize, fButtonSize }); - GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); - GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); - GUI::Button("##8", { fButtonSize, fButtonSize }); + + GUI::Begin("CAMERA"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Player_CAM_COOORD")) { + + GUI::Text("%d", m_LockOnInfo.pUnit); + + GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z); + GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z); + GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z); + GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z); + + _float fButtonSize = 45.f; + GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button("##2", { fButtonSize, fButtonSize }); + GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); + GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine(); + GUI::Button("##8", { fButtonSize, fButtonSize }); + //W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z }) + //A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z }) + //S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z }) + //D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z }) + } GUI::End(); - //W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z }) - //A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z }) - //S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z }) - //D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z }) m_Batch->DrawLine( // W VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite), - VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue) + VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue) ); m_Batch->DrawLine( // D VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite), - VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red) + VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red) ); m_Batch->DrawLine( // PlayerLook VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite), - VertexPositionColor(fArrowLength * xmvLook, DirectX::Colors::HotPink) + VertexPositionColor(fArrowLength* xmvLook, DirectX::Colors::HotPink) ); - m_Batch->End(); } #endif // _DEBUG @@ -612,85 +617,87 @@ void CPlayer::Free() void CPlayer::Describe_Entity() { - GUI::Begin("PLAYER_DESC"); - m_pCharacter_Controller->Describe_Entity(); - _float4 vMomentum = {}; - XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); - GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); - _char label[256]; - for (auto& iter : m_KeyFrames) - { - sprintf_s(label, "%s %.2f", iter.first.c_str(), iter.second); + GUI::Begin("UNIT"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("PLAYER_DESC")) { + m_pCharacter_Controller->Describe_Entity(); + _float4 vMomentum = {}; + XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); + GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); + _char label[256]; + for (auto& iter : m_KeyFrames) + { + sprintf_s(label, "%s %.2f", iter.first.c_str(), iter.second); - GUI::Text(label); - } + GUI::Text(label); + } - _float3 Pos; - XMStoreFloat3(&Pos, Get_WorldPostion()); + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); - float Pos3[3] = { Pos.x, Pos.y, Pos.z }; - GUI::DragFloat3("Pos", Pos3); + float Pos3[3] = { Pos.x, Pos.y, Pos.z }; + GUI::DragFloat3("Pos", Pos3); - _float RotR, RotU, RotL; - RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); - RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); - RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); + _float RotR, RotU, RotL; + RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); + RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); + RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); - float Rot3[3] = { RotR, RotU,RotL }; - GUI::DragFloat3("Rot", Rot3); + float Rot3[3] = { RotR, RotU,RotL }; + GUI::DragFloat3("Rot", Rot3); - string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); - GUI::Text(AnimList.c_str()); + string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); + GUI::Text(AnimList.c_str()); - GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); - GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); - GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed()); - GUI::Checkbox("Render", &m_bVisible); + GUI::Checkbox("Render", &m_bVisible); - GUI::Text("%d", m_iStateMask); - GUI::Text("HP : %f, %f", m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp); - GUI::SameLine(); if (GUI::Button("FULL")) { m_pStat->Set_Stat(ENUM_CLASS(STAT::CURRENTHP), m_pStat->Get_Stat().fMaxHp); } + GUI::Text("%d", m_iStateMask); + GUI::Text("HP : %f, %f", m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp); + GUI::SameLine(); if (GUI::Button("FULL")) { m_pStat->Set_Stat(ENUM_CLASS(STAT::CURRENTHP), m_pStat->Get_Stat().fMaxHp); } #pragma region CAMERA_SHAKE - if (false == m_bCameraShake && GUI::Button("Shake")) { - m_bCameraShake = true; - } - if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) { - m_vCameraShakeTimer.y = m_fCameraShakeTime; - } - GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f"); + if (false == m_bCameraShake && GUI::Button("Shake")) { + m_bCameraShake = true; + } + if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) { + m_vCameraShakeTimer.y = m_fCameraShakeTime; + } + GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f"); #pragma endregion - _vector xmvInputDir = XMVectorZero(); + _vector xmvInputDir = XMVectorZero(); - _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); - _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); - if (m_pGameInstance->Key_Pressing(DIK_W)) - xmvInputDir += xmvCamLook; - if (m_pGameInstance->Key_Pressing(DIK_S)) - xmvInputDir -= xmvCamLook; - if (m_pGameInstance->Key_Pressing(DIK_A)) - xmvInputDir -= xmvCamRight; - if (m_pGameInstance->Key_Pressing(DIK_D)) - xmvInputDir += xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInputDir += xmvCamRight; - xmvInputDir = XMVector3Normalize(xmvInputDir); + xmvInputDir = XMVector3Normalize(xmvInputDir); - _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; - _vector xmvCurLook = XMVector4Normalize( - XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); - _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; - _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); - _float degree = XMConvertToDegrees(vDir); + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float degree = XMConvertToDegrees(vDir); - GUI::Text("Angle %.2f", degree); - - m_pLightCom->Describe_Entity(); + GUI::Text("Angle %.2f", degree); + m_pLightCom->Describe_Entity(); + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 532481a56..e956243a8 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -641,16 +641,20 @@ void CTroll::Free() void CTroll::Describe_Entity() { - __super::Describe_Entity(); + GUI::Begin("UNIT"); + if (GUI::CollapsingHeader("Troll")) { + __super::Describe_Entity(); - _float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd"); + _float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd"); - _string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43); + _string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43); - GUI::Text(strSocket.c_str()); + GUI::Text(strSocket.c_str()); - m_pTransformCom->Describe_Entity(); + m_pTransformCom->Describe_Entity(); + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp index cb1ee4aa4..ece7b6500 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp @@ -269,8 +269,11 @@ void CTroll_Rock::Free() void CTroll_Rock::Describe_Entity() { - GUI::Begin("TrollRock"); - GUI::Checkbox("Visible", &m_bVisible); + GUI::Begin("UNIT"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("TrollRock")) { + GUI::Checkbox("Visible", &m_bVisible); + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp index 509cb693b..d9a0d3c2f 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp @@ -210,27 +210,31 @@ void CTroll_Weapon::Free() void CTroll_Weapon::Describe_Entity() { - _float4 vPos; - _float4 vHammerWorldPos; + GUI::Begin("UNIT"); + if (GUI::CollapsingHeader("Troll_Hammer")) { + _float4 vPos; + _float4 vHammerWorldPos; - _float4 vHammerRight; - _float4 vHammerUp; - _float4 vHammerLook; - _float4 vHammerPos; - XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION)); - XMStoreFloat4(&vHammerWorldPos, Get_WorldPostion()); + _float4 vHammerRight; + _float4 vHammerUp; + _float4 vHammerLook; + _float4 vHammerPos; + XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION)); + XMStoreFloat4(&vHammerWorldPos, Get_WorldPostion()); - XMStoreFloat4(&vHammerRight, XMLoadFloat4((_float4*)&m_HammerMatrix.m[0][0])); - XMStoreFloat4(&vHammerUp, XMLoadFloat4((_float4*)&m_HammerMatrix.m[1][0])); - XMStoreFloat4(&vHammerLook, XMLoadFloat4((_float4*)&m_HammerMatrix.m[2][0])); - XMStoreFloat4(&vHammerPos, XMLoadFloat4((_float4*)&m_HammerMatrix.m[3][0])); + XMStoreFloat4(&vHammerRight, XMLoadFloat4((_float4*)&m_HammerMatrix.m[0][0])); + XMStoreFloat4(&vHammerUp, XMLoadFloat4((_float4*)&m_HammerMatrix.m[1][0])); + XMStoreFloat4(&vHammerLook, XMLoadFloat4((_float4*)&m_HammerMatrix.m[2][0])); + XMStoreFloat4(&vHammerPos, XMLoadFloat4((_float4*)&m_HammerMatrix.m[3][0])); - GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w); - GUI::Text("vHammerWorldPos, %.2f, %.2f, %.2f, %.2f", vHammerWorldPos.x, vHammerWorldPos.y, vHammerWorldPos.z, vHammerWorldPos.w); - GUI::Text("vHammerRight, %.2f, %.2f, %.2f, %.2f", vHammerRight.x, vHammerRight.y, vHammerRight.z, vHammerRight.w); - GUI::Text("vHammerUp, %.2f, %.2f, %.2f, %.2f", vHammerUp.x, vHammerUp.y, vHammerUp.z, vHammerUp.w); - GUI::Text("vHammerLook, %.2f, %.2f, %.2f, %.2f", vHammerLook.x, vHammerLook.y, vHammerLook.z, vHammerLook.w); - GUI::Text("vHammerPos, %.2f, %.2f, %.2f, %.2f", vHammerPos.x, vHammerPos.y, vHammerPos.z, vHammerPos.w); + GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w); + GUI::Text("vHammerWorldPos, %.2f, %.2f, %.2f, %.2f", vHammerWorldPos.x, vHammerWorldPos.y, vHammerWorldPos.z, vHammerWorldPos.w); + GUI::Text("vHammerRight, %.2f, %.2f, %.2f, %.2f", vHammerRight.x, vHammerRight.y, vHammerRight.z, vHammerRight.w); + GUI::Text("vHammerUp, %.2f, %.2f, %.2f, %.2f", vHammerUp.x, vHammerUp.y, vHammerUp.z, vHammerUp.w); + GUI::Text("vHammerLook, %.2f, %.2f, %.2f, %.2f", vHammerLook.x, vHammerLook.y, vHammerLook.z, vHammerLook.w); + GUI::Text("vHammerPos, %.2f, %.2f, %.2f, %.2f", vHammerPos.x, vHammerPos.y, vHammerPos.z, vHammerPos.w); + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Wand.cpp b/Jusin154_Team3D/Client/Private/Wand.cpp index 7a4582a3c..7f87f6ade 100644 --- a/Jusin154_Team3D/Client/Private/Wand.cpp +++ b/Jusin154_Team3D/Client/Private/Wand.cpp @@ -192,27 +192,31 @@ void CWand::Free() void CWand::Describe_Entity() { - _float4 vPos; - _float4 vTipWorldPos; + GUI::Begin("UNIT"); + if (GUI::CollapsingHeader("WAND")) { + _float4 vPos; + _float4 vTipWorldPos; - _float4 vTipRight; - _float4 vTipUp; - _float4 vTipLook; - _float4 vTipPos; - XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION)); - XMStoreFloat4(&vTipWorldPos, Get_WorldPostion()); + _float4 vTipRight; + _float4 vTipUp; + _float4 vTipLook; + _float4 vTipPos; + XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION)); + XMStoreFloat4(&vTipWorldPos, Get_WorldPostion()); - XMStoreFloat4(&vTipRight, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[0][0])); - XMStoreFloat4(&vTipUp, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[1][0])); - XMStoreFloat4(&vTipLook, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[2][0])); - XMStoreFloat4(&vTipPos, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0])); + XMStoreFloat4(&vTipRight, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[0][0])); + XMStoreFloat4(&vTipUp, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[1][0])); + XMStoreFloat4(&vTipLook, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[2][0])); + XMStoreFloat4(&vTipPos, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0])); - GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w); - GUI::Text("vTipWorldPos, %.2f, %.2f, %.2f, %.2f", vTipWorldPos.x, vTipWorldPos.y, vTipWorldPos.z, vTipWorldPos.w); - GUI::Text("vTipRight, %.2f, %.2f, %.2f, %.2f", vTipRight.x, vTipRight.y, vTipRight.z, vTipRight.w); - GUI::Text("vTipUp, %.2f, %.2f, %.2f, %.2f", vTipUp.x, vTipUp.y, vTipUp.z, vTipUp.w); - GUI::Text("vTipLook, %.2f, %.2f, %.2f, %.2f", vTipLook.x, vTipLook.y, vTipLook.z, vTipLook.w); - GUI::Text("vTipPos, %.2f, %.2f, %.2f, %.2f", vTipPos.x, vTipPos.y, vTipPos.z, vTipPos.w); + GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w); + GUI::Text("vTipWorldPos, %.2f, %.2f, %.2f, %.2f", vTipWorldPos.x, vTipWorldPos.y, vTipWorldPos.z, vTipWorldPos.w); + GUI::Text("vTipRight, %.2f, %.2f, %.2f, %.2f", vTipRight.x, vTipRight.y, vTipRight.z, vTipRight.w); + GUI::Text("vTipUp, %.2f, %.2f, %.2f, %.2f", vTipUp.x, vTipUp.y, vTipUp.z, vTipUp.w); + GUI::Text("vTipLook, %.2f, %.2f, %.2f, %.2f", vTipLook.x, vTipLook.y, vTipLook.z, vTipLook.w); + GUI::Text("vTipPos, %.2f, %.2f, %.2f, %.2f", vTipPos.x, vTipPos.y, vTipPos.z, vTipPos.w); + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp index 919e52fdd..bb91d172a 100644 --- a/Jusin154_Team3D/Engine/Private/Camera.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera.cpp @@ -160,7 +160,7 @@ HRESULT CCamera::Ready_Shadow() XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f)); #ifdef _DEBUG - GUI::Begin("Renderer"); + GUI::Begin("SYSTEM"); if (GUI::CollapsingHeader("Near_Camera_ShadowDesc")) { //GUI::SliderFloat3("RPY", (_float*)&m_vRollPichYaw, -360.f, 360.f); GUI::DragFloat("Far", &ShadowDesc.fFar, 1.f, 20, 300.f); diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp index c24899b78..674a256fe 100644 --- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp +++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp @@ -437,65 +437,66 @@ void CCharacter_Controller::Free() #ifdef _DEBUG void CCharacter_Controller::Describe_Entity() { - GUI::Begin("Character_Controller"); - GUI::Text("Gravity : %d ", m_bGravity); - m_pTransform->Describe_Entity(); - GUI::TextLinkOpenURL("More details here", "https://dev-treadmill.tistory.com/158"); - _float fContact = m_pController->getContactOffset(); - PSX::PxVec3 vUpDirection = m_pController->getUpDirection(); - PSX::PxExtendedVec3 vCenterPosition = m_pController->getPosition(); - PSX::PxExtendedVec3 vFootPosition = m_pController->getFootPosition(); - _float3 vVolume = Get_Volume(); - _float fStepOffset = m_pController->getStepOffset(); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Character_Controller") ){ + GUI::Text("Gravity : %d ", m_bGravity); + m_pTransform->Describe_Entity(); + GUI::TextLinkOpenURL("More details here", "https://dev-treadmill.tistory.com/158"); + _float fContact = m_pController->getContactOffset(); + PSX::PxVec3 vUpDirection = m_pController->getUpDirection(); + PSX::PxExtendedVec3 vCenterPosition = m_pController->getPosition(); + PSX::PxExtendedVec3 vFootPosition = m_pController->getFootPosition(); + _float3 vVolume = Get_Volume(); + _float fStepOffset = m_pController->getStepOffset(); - GUI::Text("eBodyType $d", (_uint)m_eBodyType); GUIHelpMarker("Body: only box and capsule available"); + GUI::Text("eBodyType $d", (_uint)m_eBodyType); GUIHelpMarker("Body: only box and capsule available"); - if (GUI::SliderFloat3("UpDirection", (_float*)&vUpDirection, -1.f, 1.f)) { - m_pController->setUpDirection(vUpDirection.getNormalized()); - } GUIHelpMarker("Up vector in PhysX"); - GUI::Text("vCenterPosition %lf, %lf, %lf", vCenterPosition.x, vCenterPosition.y, vCenterPosition.z); GUIHelpMarker("Exact center of the rigid body owned by the controller"); - GUI::Text("vFootPosition %lf, %lf, %lf", vFootPosition.x, vFootPosition.y, vFootPosition.z); GUIHelpMarker("Foot position including step offset from the body center to the ground"); + if (GUI::SliderFloat3("UpDirection", (_float*)&vUpDirection, -1.f, 1.f)) { + m_pController->setUpDirection(vUpDirection.getNormalized()); + } GUIHelpMarker("Up vector in PhysX"); + GUI::Text("vCenterPosition %lf, %lf, %lf", vCenterPosition.x, vCenterPosition.y, vCenterPosition.z); GUIHelpMarker("Exact center of the rigid body owned by the controller"); + GUI::Text("vFootPosition %lf, %lf, %lf", vFootPosition.x, vFootPosition.y, vFootPosition.z); GUIHelpMarker("Foot position including step offset from the body center to the ground"); - if (GUI::SliderFloat("ContactOffset", &fContact, 0.01f, 10.f, "%.2f")) { - m_pController->setContactOffset(fContact); - } GUIHelpMarker("Actual contact offset in PhysX; increasing it may make the controller appear to hover"); - if (GUI::SliderFloat("StepOffset", &fStepOffset, 0.f, 3.f, "%.2f")) { - m_pController->setStepOffset(fStepOffset); - } GUIHelpMarker("In stepped regions, the tolerance height the controller can climb.\n Capsule behaves slightly differently."); - - if (ACTOR::CAPSULE == m_eBodyType) { - PSX::PxCapsuleController* pController = (PSX::PxCapsuleController*)m_pController; + if (GUI::SliderFloat("ContactOffset", &fContact, 0.01f, 10.f, "%.2f")) { + m_pController->setContactOffset(fContact); + } GUIHelpMarker("Actual contact offset in PhysX; increasing it may make the controller appear to hover"); + if (GUI::SliderFloat("StepOffset", &fStepOffset, 0.f, 3.f, "%.2f")) { + m_pController->setStepOffset(fStepOffset); + } GUIHelpMarker("In stepped regions, the tolerance height the controller can climb.\n Capsule behaves slightly differently."); - if (0.f != fStepOffset) { - switch (pController->getClimbingMode()) - { - case PSX::PxCapsuleClimbingMode::eEASY: - if (GUI::Button("ClimbingMode : eEasy")) { - pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eCONSTRAINED); + if (ACTOR::CAPSULE == m_eBodyType) { + PSX::PxCapsuleController* pController = (PSX::PxCapsuleController*)m_pController; + + if (0.f != fStepOffset) { + switch (pController->getClimbingMode()) + { + case PSX::PxCapsuleClimbingMode::eEASY: + if (GUI::Button("ClimbingMode : eEasy")) { + pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eCONSTRAINED); + } + break; + case PSX::PxCapsuleClimbingMode::eCONSTRAINED: + if (GUI::Button("ClimbingMode : eConstrained")) { + pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eEASY); + } + break; + default: + break; } - break; - case PSX::PxCapsuleClimbingMode::eCONSTRAINED: - if (GUI::Button("ClimbingMode : eConstrained")) { - pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eEASY); - } - break; - default: - break; + GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used."); } - GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used."); } - } - GUI::Text("%.1f", m_fCurrentSlopeDegree); - GUI::Text("%.1f", m_fWalkableSlopeDegree); GUI::SameLine(); if (GUI::SliderFloat("m_fWalkableSlopeDegree", &m_fWalkableSlopeDegree, 0.0f, 90.f)) { - m_pController->setSlopeLimit(cosf(XMConvertToRadians(m_fWalkableSlopeDegree))); - } - GUI::DragFloat("m_vAccHeight.w", &m_vAccHeight.w, 0.01f, 0.f, 1.f); - GUI::SliderFloat("m_fGravity_Multiplier", &m_fGravity, 0.0f, 3.f); - if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) { - Modify_Volume(vVolume); - }GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center."); + GUI::Text("%.1f", m_fCurrentSlopeDegree); + GUI::Text("%.1f", m_fWalkableSlopeDegree); GUI::SameLine(); if (GUI::SliderFloat("m_fWalkableSlopeDegree", &m_fWalkableSlopeDegree, 0.0f, 90.f)) { + m_pController->setSlopeLimit(cosf(XMConvertToRadians(m_fWalkableSlopeDegree))); + } + GUI::DragFloat("m_vAccHeight.w", &m_vAccHeight.w, 0.01f, 0.f, 1.f); + GUI::SliderFloat("m_fGravity_Multiplier", &m_fGravity, 0.0f, 3.f); + if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) { + Modify_Volume(vVolume); + }GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center."); - GUI::End(); + } } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Private/Fog.cpp b/Jusin154_Team3D/Engine/Private/Fog.cpp index aec885d50..9899ec743 100644 --- a/Jusin154_Team3D/Engine/Private/Fog.cpp +++ b/Jusin154_Team3D/Engine/Private/Fog.cpp @@ -45,7 +45,7 @@ HRESULT CFog::Bind_FogValue(CShader* pShader) #ifdef _DEBUG void CFog::Update_Fog() { - GUI::Begin("Renderer"); + GUI::Begin("SYSTEM"); if (GUI::CollapsingHeader("FOG")) { GUI::Checkbox("Fog ON / OFF", &m_bVisible); GUI::InputFloat("g_fFogDensity", &m_fFogDensity, 0.001f); diff --git a/Jusin154_Team3D/Engine/Private/GameObject_Manager.cpp b/Jusin154_Team3D/Engine/Private/GameObject_Manager.cpp index 3483b03e8..df53d0162 100644 --- a/Jusin154_Team3D/Engine/Private/GameObject_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/GameObject_Manager.cpp @@ -168,37 +168,39 @@ void CGameObject_Manager::Free() void CGameObject_Manager::Describe_Entity() { - ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar; - GUI::Begin("Object_Manager"); - GUI::Text("Levels : "); GUI::SameLine(); - if (GUI::BeginTabBar("Levels")) { - for (_uint i = 0; i < m_iNumLevels; ++i) { + GUI::Begin("SYSTEM"); + if (GUI::CollapsingHeader("Object_Manager")) { + ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar; + GUI::Text("Levels : "); GUI::SameLine(); + if (GUI::BeginTabBar("Levels")) { + for (_uint i = 0; i < m_iNumLevels; ++i) { - if (GUI::BeginTabItem(to_string(i).c_str(), nullptr)) { // Insert Here Level Names - GUI::BeginChild("Object_Lists"); - if (GUI::BeginTabBar("Layers")) { - string strlayerName; - for (pair< const _wstring, CLayer*>& pairLayer : m_pLayers[i]) { - size_t pos = pairLayer.first.find(TEXT("Layer_")); - strlayerName = "NOT_STARTED_WITH_Layer_"; - if (pos != wstring::npos) { - strlayerName = CMyTools::ToString(pairLayer.first.c_str() + pos + wcslen(TEXT("Layer_"))).c_str(); - } - if (GUI::BeginTabItem(strlayerName.c_str(), nullptr)) { - if (GUI::BeginChild("Items", ImVec2(0, 0), 0, window_flags)) { - pairLayer.second->Describe_Entity(); - GUI::EndChild(); + if (GUI::BeginTabItem(to_string(i).c_str(), nullptr)) { // Insert Here Level Names + GUI::BeginChild("Object_Lists"); + if (GUI::BeginTabBar("Layers")) { + string strlayerName; + for (pair< const _wstring, CLayer*>& pairLayer : m_pLayers[i]) { + size_t pos = pairLayer.first.find(TEXT("Layer_")); + strlayerName = "NOT_STARTED_WITH_Layer_"; + if (pos != wstring::npos) { + strlayerName = CMyTools::ToString(pairLayer.first.c_str() + pos + wcslen(TEXT("Layer_"))).c_str(); + } + if (GUI::BeginTabItem(strlayerName.c_str(), nullptr)) { + if (GUI::BeginChild("Items", ImVec2(0, 0), 0, window_flags)) { + pairLayer.second->Describe_Entity(); + GUI::EndChild(); + } + GUI::EndTabItem(); } - GUI::EndTabItem(); } + GUI::EndTabBar(); } - GUI::EndTabBar(); + GUI::EndChild(); + GUI::EndTabItem(); } - GUI::EndChild(); - GUI::EndTabItem(); } + GUI::EndTabBar(); } - GUI::EndTabBar(); } GUI::End(); } diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index f0d1ed31b..bf99324ce 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -2015,7 +2015,6 @@ void CModel::Free() #ifdef _DEBUG void CModel::Describe_Entity() { - GUI::Begin("Model_Desc"); if (GUI::CollapsingHeader("ModelAnimations")) { for (_uint i = 0; i < m_iNumAnimations; ++i) { if (GUI::Button(m_Animations[i]->Get_Name().c_str())) { @@ -2056,7 +2055,6 @@ void CModel::Describe_Entity() CloseHandle(hFile); } - GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp b/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp index d48b710c4..5c4dd2876 100644 --- a/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp @@ -59,27 +59,6 @@ void CMouse_Manager::Update() } m_ptOldMouseCur = m_ptCurrentMouseCur; -#ifdef _DEBUG - GUI::Begin("Mouse_Manager"); - GUI::Text("AccumulateMomentum %f, %f", m_vMove.x, m_vMove.y); - GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y); - GUI::Text("Lock %d", m_bLockMouseToCenter); - POINT pt = Get_MouseViewPortPos(); - ImGuiIO& io = ImGui::GetIO(); - GUI::Text("IMGUI MousePos: %.1f, %.1f", io.MousePos.x, io.MousePos.y); - //io.MousePos = ImVec2((float)pt.x, (float)pt.y); - GUI::Text("VPPOS: %d, %d", pt.x, pt.y); - pt = Get_MouseScreenPos(); - GUI::Text("SCPOS: %d, %d", pt.x, pt.y); - - pt = Get_MouseViewPortPos(); - D3D11_VIEWPORT viewPort; - _uint TargetViewPort = 1; - m_pContext->RSGetViewports(&TargetViewPort, &viewPort); - GUI::Text("INV_VPPOS: %f, %f", pt.x - (viewPort.Width * 0.5f), pt.y - (viewPort.Height * 0.5f)); - - GUI::End(); -#endif Picking(); } else { @@ -87,6 +66,9 @@ void CMouse_Manager::Update() ZeroMemory(&m_ptCurrentMouseCur, sizeof(POINT)); ZeroMemory(&m_ptOldMouseCur, sizeof(POINT)); } +#ifdef _DEBUG + Describe_Entity(); +#endif } POINT CMouse_Manager::Get_MouseViewPortPos() @@ -180,45 +162,6 @@ _bool CMouse_Manager::MousePicking_InWorldSpace(const _float3& vPointA, const _f return isCollision; } -//void CMouse_Manager::Mouse_Render() -//{ -// RECT rc{}; GetClientRect(m_ghWnd, &rc); -// const float cw = float(rc.right - rc.left); -// const float ch = float(rc.bottom - rc.top); -// -// // 2) 뷰/프로젝션: 화면 좌상단(0,0) ~ (cw,ch), Y-다운 -// XMFLOAT4X4 view{}, proj{}; -// XMStoreFloat4x4(&view, XMMatrixIdentity()); -// XMStoreFloat4x4(&proj, XMMatrixOrthographicOffCenterLH(0.f, cw, ch, 0.f, 0.f, 1.f)); -// -// // 3) 마우스 좌표 (클라이언트 좌표로 변환) -// POINT pt{}; GetCursorPos(&pt); ScreenToClient(m_ghWnd, &pt); -// -// // 4) 월드 행렬: 30x30 스케일 + 위치(픽셀 센터 정렬: +0.5f) -// XMFLOAT4X4 world{}; -// world._11 = 30.f; // width -// world._22 = 30.f; // height -// world._33 = 1.f; // keep -// world._44 = 1.f; // keep -// world._41 = floorf((float)pt.x) + 0.5f; // translation X (row-vector 규약) -// world._42 = floorf((float)pt.y) + 0.5f; // translation Y -// -// // 5) 바인딩 -// m_pShader->Bind_Matrix("g_WorldMatrix", &world); -// m_pShader->Bind_Matrix("g_ViewMatrix", &view); -// m_pShader->Bind_Matrix("g_ProjMatrix", &proj); -// -// m_pShader->Bind_SRV("g_Texture", m_pMouseSRV); -// m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(float)); -// -// // 6) 상태 셋업(권장) -// // - DepthTest OFF / DepthWrite OFF (UI) -// // - AlphaBlend ON (필요시) -// m_pShader->Begin(2); -// m_pRect->Bind_Resources(); -// m_pRect->Render(); -//} - POINT CMouse_Manager::Get_ScreenCenterPos() { D3D11_VIEWPORT viewPort; @@ -257,3 +200,31 @@ void CMouse_Manager::Free() SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); } +#ifdef _DEBUG + +void CMouse_Manager::Describe_Entity() +{ + GUI::Begin("SYSTEM"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Mouse_Manager")) { + GUI::Text("AccumulateMomentum %.2f, %.2f", m_vMove.x, m_vMove.y); + GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y); + GUI::Text("Lock %d", m_bLockMouseToCenter); + POINT pt = Get_MouseViewPortPos(); + ImGuiIO& io = ImGui::GetIO(); + GUI::Text("IMGUI MousePos: %.1f, %.1f", io.MousePos.x, io.MousePos.y); + //io.MousePos = ImVec2((float)pt.x, (float)pt.y); + GUI::Text("VPPOS: %d, %d", pt.x, pt.y); + pt = Get_MouseScreenPos(); + GUI::Text("SCPOS: %d, %d", pt.x, pt.y); + + pt = Get_MouseViewPortPos(); + D3D11_VIEWPORT viewPort; + _uint TargetViewPort = 1; + m_pContext->RSGetViewports(&TargetViewPort, &viewPort); + GUI::Text("INV_VPPOS: %.2f, %.2f", pt.x - (viewPort.Width * 0.5f), pt.y - (viewPort.Height * 0.5f)); + } + GUI::End(); +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index d8127586a..23eeaad79 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -37,16 +37,16 @@ void CRenderer::Render() Render_UI_Overley(); #ifdef _DEBUG + static _bool m_bToggleDebug = false; + GUI::Checkbox("DebugToggle", &m_bToggleDebug); Describe_Entitiy(); m_pGameInstance->RenderTarget_Debuger(); - static _bool m_bToggleDebug = false; if (m_pGameInstance->Key_Pressing(DIK_F10)) { Render_Debug(); } else { GUI::Begin("RenderTarget Debuger"); - GUI::Checkbox("DebugToggle", &m_bToggleDebug); if (m_bToggleDebug) { Render_Debug(); } diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp index 9530ffd6c..82457014c 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -508,49 +508,51 @@ void CRenderer::Free() #ifdef _DEBUG void CRenderer::Describe_Entitiy() { - GUI::Begin("Renderer"); - GUI::PushItemWidth(80); - if (GUI::CollapsingHeader("PostProcessing_Bloom")) - { - GUI::BeginChild("PostProcessing_Bloom"); - GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f"); - GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); - GUI::EndChild(); - } - if (GUI::CollapsingHeader("Environment DOF")) - { - GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true); + GUI::Begin("SYSTEM"); + if (GUI::CollapsingHeader("RENDERER")) { + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("PostProcessing_Bloom")) + { + GUI::BeginChild("PostProcessing_Bloom"); + GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f"); + GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); + GUI::EndChild(); + } + if (GUI::CollapsingHeader("Environment DOF")) + { + GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true); - GUI::Text("Far DOF (Environment)"); - GUI::Separator(); + GUI::Text("Far DOF (Environment)"); + GUI::Separator(); - GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f"); - GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f"); - GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f"); - GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f"); - GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); + GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f"); + GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f"); + GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f"); + GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f"); + GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); #ifdef _DEBUG - if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { - m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; - } - if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { - m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; - } + if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { + m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; + } + if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { + m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; + } #endif // _DEBUG - GUI::EndChild(); - } - if (GUI::CollapsingHeader("SSAO")) { - GUI::BeginChild("SSAO_Setting", ImVec2(0, 0), true); - GUI::DragFloat("fSSAORadius ", &m_fSSAO_Radius, 0.001f, -3.f, 3.f, "%.5f"); - GUI::DragFloat("fSSAO_BIAS", &m_fSSAO_BIAS, 0.001f, -2.f, 2.f, "%.5f"); - GUI::EndChild(); - } - if (GUI::CollapsingHeader("ToneMapping")) { - GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true); - GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d"); - GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f"); - GUI::EndChild(); + GUI::EndChild(); + } + if (GUI::CollapsingHeader("SSAO")) { + GUI::BeginChild("SSAO_Setting", ImVec2(0, 0), true); + GUI::DragFloat("fSSAORadius ", &m_fSSAO_Radius, 0.001f, -3.f, 3.f, "%.5f"); + GUI::DragFloat("fSSAO_BIAS", &m_fSSAO_BIAS, 0.001f, -2.f, 2.f, "%.5f"); + GUI::EndChild(); + } + if (GUI::CollapsingHeader("ToneMapping")) { + GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true); + GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d"); + GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f"); + GUI::EndChild(); + } } GUI::End(); } diff --git a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp index 96f860c8f..aaf593a9d 100644 --- a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp @@ -141,72 +141,75 @@ void CResource_Manager::Free() void CResource_Manager::Describe_Entity() { - static vector> vecHit = {}; - static vector> vecMiss = {}; - GUI::Begin("ResourceManager"); - if (GUI::Button("Refresh")) { - vecHit.clear(); - vecMiss.clear(); - for (auto& element : m_mapCacheHit){ - vecHit.emplace_back(element); - } - for (auto& element : m_mapCacheMiss){ - vecMiss.emplace_back(element); - } - sort(vecHit.begin(), vecHit.end(), - [](const pair<_wstring, _uint>& leftPair, - const pair<_wstring, _uint>& rightPair) - { - return leftPair.second > rightPair.second; - }); + GUI::Begin("SYSTEM"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("ResourceManager")) { + static vector> vecHit = {}; + static vector> vecMiss = {}; + if (GUI::Button("Refresh")) { + vecHit.clear(); + vecMiss.clear(); + for (auto& element : m_mapCacheHit) { + vecHit.emplace_back(element); + } + for (auto& element : m_mapCacheMiss) { + vecMiss.emplace_back(element); + } + sort(vecHit.begin(), vecHit.end(), + [](const pair<_wstring, _uint>& leftPair, + const pair<_wstring, _uint>& rightPair) + { + return leftPair.second > rightPair.second; + }); - sort(vecMiss.begin(), vecMiss.end(), - [](const pair<_wstring, _uint>& leftPair, - const pair<_wstring, _uint>& rightPair) - { - return leftPair.second > rightPair.second; - }); - } - if (GUI::CollapsingHeader("Statistics")) { - _uint iTotalHitCount = 0; - _uint iTotalMissCount = 0; + sort(vecMiss.begin(), vecMiss.end(), + [](const pair<_wstring, _uint>& leftPair, + const pair<_wstring, _uint>& rightPair) + { + return leftPair.second > rightPair.second; + }); + } + if (GUI::CollapsingHeader("Statistics")) { + _uint iTotalHitCount = 0; + _uint iTotalMissCount = 0; - for (const auto& element : m_mapCacheHit) { - iTotalHitCount += element.second; - } - for (const auto& element : m_mapCacheMiss) { - iTotalMissCount += element.second; - } - _uint iTotalRequestCount = iTotalHitCount + iTotalMissCount; + for (const auto& element : m_mapCacheHit) { + iTotalHitCount += element.second; + } + for (const auto& element : m_mapCacheMiss) { + iTotalMissCount += element.second; + } + _uint iTotalRequestCount = iTotalHitCount + iTotalMissCount; - _float fHitRatePercent = 0.0f; - if (iTotalRequestCount > 0) { - fHitRatePercent = (_float)iTotalHitCount * 100.0f / (_float)iTotalRequestCount; - } + _float fHitRatePercent = 0.0f; + if (iTotalRequestCount > 0) { + fHitRatePercent = (_float)iTotalHitCount * 100.0f / (_float)iTotalRequestCount; + } - GUI::Text("Total Requests: %u", iTotalRequestCount); - GUI::Text("Hit: %u Miss: %u HitRate: %.2f%%", iTotalHitCount, iTotalMissCount, fHitRatePercent); + GUI::Text("Total Requests: %u", iTotalRequestCount); + GUI::Text("Hit: %u Miss: %u HitRate: %.2f%%", iTotalHitCount, iTotalMissCount, fHitRatePercent); - } - if (GUI::CollapsingHeader("CacheHit")) { - GUI::Text("%d", vecHit.size()); - GUI::BeginChild("CacheHit", { 300, 300 }); - GUI::GetScrollY(); - for (auto& element : vecHit) { - GUI::Text("%d", element.second); GUI::SameLine(); - GUI::Text(CMyTools::ToString(element.first).c_str()); } - GUI::EndChild(); - } - if (GUI::CollapsingHeader("CacheMiss")) { - GUI::Text("%d", vecMiss.size()); - GUI::BeginChild("CacheMiss", { 300, 300 }); - GUI::GetScrollY(); - for (auto& element : vecMiss) { - GUI::Text("%d", element.second); GUI::SameLine(); - GUI::Text(CMyTools::ToString(element.first).c_str()); + if (GUI::CollapsingHeader("CacheHit")) { + GUI::Text("%d", vecHit.size()); + GUI::BeginChild("CacheHit", { 300, 300 }); + GUI::GetScrollY(); + for (auto& element : vecHit) { + GUI::Text("%d", element.second); GUI::SameLine(); + GUI::Text(CMyTools::ToString(element.first).c_str()); + } + GUI::EndChild(); + } + if (GUI::CollapsingHeader("CacheMiss")) { + GUI::Text("%d", vecMiss.size()); + GUI::BeginChild("CacheMiss", { 300, 300 }); + GUI::GetScrollY(); + for (auto& element : vecMiss) { + GUI::Text("%d", element.second); GUI::SameLine(); + GUI::Text(CMyTools::ToString(element.first).c_str()); + } + GUI::EndChild(); } - GUI::EndChild(); } GUI::End(); } diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index 33e62dc6a..a91fb3d71 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -350,12 +350,12 @@ void CTrail::Free() void CTrail::Describe_Entity() { - - - GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow); - GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh); - - + GUI::Begin("EFFECT"); + if (GUI::CollapsingHeader("CTrail")) { + GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow); + GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh); + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Public/Mouse_Manager.h b/Jusin154_Team3D/Engine/Public/Mouse_Manager.h index f01984058..c22d218ac 100644 --- a/Jusin154_Team3D/Engine/Public/Mouse_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Mouse_Manager.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Base.h" NS_BEGIN(Engine) @@ -55,6 +55,11 @@ class ENGINE_DLL CMouse_Manager final : public CBase public: static CMouse_Manager* Create(HWND _g_hWnd, ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; +#ifdef _DEBUG + virtual void Describe_Entity(); + +#endif // _DEBUG + }; NS_END From 4fa5c4810fc8dda6b6e200d9ca5c6d91a5c372f1 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sun, 14 Dec 2025 12:32:17 +0900 Subject: [PATCH 22/22] =?UTF-8?q?[add]=20IMGUI=20=EC=88=98=EC=A0=95=202?= =?UTF-8?q?=EC=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp | 4 ---- Jusin154_Team3D/Engine/Private/Renderer.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp index fa796e600..774ef1157 100644 --- a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp +++ b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp @@ -51,10 +51,6 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit) class CUnit* pOwner = (CUnit*)m_pController->Get_Owner(); _vector vLook = pOwner->Get_Component()->Get_State(STATE::LOOK); _float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook)); -#ifdef _DEBUG - GUI::Text("DOTDOT %f", fDot); -#endif // _DEBUG - if (fDot > cosf(XM_PIDIV4) && vWorldPos.y >= XMVectorGetY(pOwnerActorData->pCharacter->Get_Position()) - FLT_EPSILON3) { CModel* pModel = pOwner->Get_Component(); _uint iAnimIndex = pModel->Get_AnimIndex(); diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 23eeaad79..c10926815 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -38,7 +38,6 @@ void CRenderer::Render() #ifdef _DEBUG static _bool m_bToggleDebug = false; - GUI::Checkbox("DebugToggle", &m_bToggleDebug); Describe_Entitiy(); m_pGameInstance->RenderTarget_Debuger(); @@ -47,6 +46,7 @@ void CRenderer::Render() } else { GUI::Begin("RenderTarget Debuger"); + GUI::Checkbox("DebugToggle", &m_bToggleDebug); if (m_bToggleDebug) { Render_Debug(); }