From 78df5673a25203654cabf721aca01ae0e244323e Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 26 Nov 2025 11:23:36 +0900 Subject: [PATCH 01/10] [add] RenderTArget_Debugger --- .../Editor/Private/Dummy_Globe.cpp | 1 - Jusin154_Team3D/Editor/Private/Loader.cpp | 31 +++++++++++++++++++ .../Engine/Private/RenderTarget.cpp | 24 +++++++------- .../Engine/Private/RenderTarget_Manager.cpp | 21 ++++++++++--- 4 files changed, 61 insertions(+), 16 deletions(-) diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp index 713f37acf..ad4e239d6 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp @@ -106,7 +106,6 @@ HRESULT CDummy_Globe::Bind_ShaderResources() 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; } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 601467879..0c3171ab3 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -1106,6 +1106,28 @@ HRESULT CLoader::Loading_For_PhysXLevel() HRESULT CLoader::Loading_For_Bloom() { + vector*>> futures = {}; + +#pragma region HAIR + + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Male/M_Hair1/M_Hair1.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + TEXT("Prototype_Component_M_Hair1_Model") + )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Male/M_Hair2/M_Hair2.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + TEXT("Prototype_Component_M_Hair2_Model") + )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Male/M_Hair3/M_Hair3.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + TEXT("Prototype_Component_M_Hair3_Model") + )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/FeMale/F_Hair1/F_Hair1.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + TEXT("Prototype_Component_F_Hair1_Model") + )); + +#pragma endregion if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Desc_Box"), CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(10.f, 10.f, 10.f) * XMMatrixIdentity())))){ return E_FAIL; @@ -1152,6 +1174,15 @@ HRESULT CLoader::Loading_For_Bloom() return E_FAIL; } + for (auto& job : futures) { + pair<_wstring, CModel*>* pResult = job.get(); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) { + assert(false); + return E_FAIL; + } + Safe_Delete(pResult); + } + m_strMessage = TEXT("Loading Success!"); m_isFinished = true; diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp index 524104c85..fd6ca4c26 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp @@ -101,37 +101,39 @@ void CRenderTarget::Ready_Debug() void CRenderTarget::Describe_Entity(const _char* pName) { - if (GUI::Checkbox(pName, &m_isDraw)) - { - - } + GUI::Selectable(pName, &m_isDraw); } _bool CRenderTarget::Render_Debug(CShader* pShader, CVIBuffer_Rect* pVIBuffer ,_float fX, _float fY, _float fSizeX, _float fSizeY) { - - if (m_isDraw == false) + if (m_isDraw == false) { return false; + } m_WorldMatrix._11 = fSizeX; m_WorldMatrix._22 = fSizeY; m_WorldMatrix._41 = fX - m_ptWindowSize.x * 0.5f; m_WorldMatrix._42 = -fY + m_ptWindowSize.y * 0.5f; - if (FAILED(pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix))) + if (FAILED(pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix))){ return false; + } - if (FAILED(pShader->Bind_SRV("g_Texture", m_pSRV))) + if (FAILED(pShader->Bind_SRV("g_Texture", m_pSRV))) { return false; + } - if (FAILED(pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::DEBUG)))) + if (FAILED(pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::DEBUG)))) { return false; + } - if (FAILED(pVIBuffer->Bind_Resources())) + if (FAILED(pVIBuffer->Bind_Resources())) { return false; + } - if (FAILED(pVIBuffer->Render())) + if (FAILED(pVIBuffer->Render())) { return false; + } return true; } diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp index abbe9bb8c..88ed5c0cf 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp @@ -438,8 +438,9 @@ HRESULT CRenderTarget_Manager::Render_RenderTarget_Debug(CShader* pShader, CVIBu for (auto& pRenderTarget : m_RenderTargets) { - if (pRenderTarget.second->Render_Debug(pShader, pVIBuffer, fX, fY, (_float)m_iSizeX, (_float)m_iSizeY) == false) + if (pRenderTarget.second->Render_Debug(pShader, pVIBuffer, fX, fY, (_float)m_iSizeX, (_float)m_iSizeY) == false){ continue; + } fX += m_iSizeX; @@ -467,12 +468,24 @@ void CRenderTarget_Manager::RenderTarget_Debuger() GUI::DragInt("Target Size X" , &m_iSizeX); GUI::DragInt("Target Size Y", &m_iSizeY); GUI::PopItemWidth(); - - for (auto& pTarget : m_RenderTargets) + ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar; + GUI::BeginChild("RTDebugger", { 120.f, 200.f }, ImGuiChildFlags_None, window_flags); + for (auto& [key, pRenderTarget] : m_RenderTargets) { - pTarget.second->Describe_Entity(CMyTools::ToString(pTarget.first).c_str()); + _string strKey = CMyTools::ToString(key); + _string strTargetName = "NOT_STARTED_WITH_Target_"; + + _string TargetPrefix = "Target_"; + if (size_t pos = strKey.find(TargetPrefix); pos != string::npos) + { + strTargetName = strKey.substr(pos + TargetPrefix.length()); + } + + pRenderTarget->Describe_Entity(strTargetName.c_str()); } + GUI::EndChild(); + GUI::End(); } From 12a9469aedd49ece67b44c6e4391426728113f3b Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 26 Nov 2025 21:50:47 +0900 Subject: [PATCH 02/10] [add] Goblin States --- .../Client/Private/Goblin_States.cpp | 34 +- Jusin154_Team3D/Editor/Bin/AnimIndex.txt | 429 ++++++++++++++++++ .../Models/Monster/Goblin/Goblin_Anim.fbx | 4 +- .../Editor/Private/DummyObject.cpp | 5 +- Jusin154_Team3D/Engine/Private/Camera.cpp | 2 +- Jusin154_Team3D/Engine/Private/Model.cpp | 72 ++- Jusin154_Team3D/Engine/Public/State.h | 5 +- 7 files changed, 504 insertions(+), 47 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/AnimIndex.txt diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 956e940c9..4b2f2d625 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -136,15 +136,47 @@ void CGoblin::Add_FSM() void CGoblin::Set_Anim() { - m_Animation[STATEANIM::IDLE] = { 22,true }; m_Animation[STATEANIM::WALK_FWD] = { 50,true }; m_Animation[STATEANIM::WALK_STOP] = { 58,false }; + m_Animation[STATEANIM::WALK_BWD] = { 49, true }; m_Animation[STATEANIM::JOG_FWD] = { 46,true }; m_Animation[STATEANIM::JOG_BWD] = { 154,false }; + m_Animation[STATEANIM::DODGE_LEFT] = { 125, false }; + m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false }; + m_Animation[STATEANIM::SPRINT] = { 90, true }; + m_Animation[STATEANIM::SKILL] = { 70,false }; // 도끼 스윙 m_Animation[STATEANIM::SKILL2] = { 85,false }; // 나이프 던지기 + + + + m_Animation[STATEANIM::HIT_FWD] = { 353, false }; + m_Animation[STATEANIM::HIT_BWD] = { 352, false }; + m_Animation[STATEANIM::HIT_BWD2] = { 349, false }; + m_Animation[STATEANIM::HIT_BWD3] = { 350, false }; + m_Animation[STATEANIM::HIT_BWD4] = { 351, false }; + m_Animation[STATEANIM::HIT_L] = { 354, false }; + m_Animation[STATEANIM::HIT_R] = { 355, false }; + + m_Animation[STATEANIM::KNOCKDOWN_BWD] = { 374, false }; + m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT] = { 375, false }; + m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT_HOLD] = { 370, false }; + m_Animation[STATEANIM::KNOCKDOWN_FWD] = { 371, false }; + m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT] = { 372, false }; + m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT_HOLD] = { 373, false }; + + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; + m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; + m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; + m_Animation[STATEANIM::DEAD_FWD2] = { 320, false }; + m_Animation[STATEANIM::DEAD_L] = { 321, false }; + m_Animation[STATEANIM::DEAD_L2] = { 322, false }; + m_Animation[STATEANIM::DEAD_R] = { 323, false }; + m_Animation[STATEANIM::DEAD_R2] = { 324, false }; + + } diff --git a/Jusin154_Team3D/Editor/Bin/AnimIndex.txt b/Jusin154_Team3D/Editor/Bin/AnimIndex.txt new file mode 100644 index 000000000..0e87c1a92 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/AnimIndex.txt @@ -0,0 +1,429 @@ +0 Gob_BM_2Cmbt_01_anm +1 Gob_BM_2Cmbt_02_anm +2 Gob_BM_2Cmbt_03_anm +3 Gob_BM_2Cmbt_04_anm +4 Gob_BM_2Cmbt_05_anm +5 Gob_BM_2Cmbt_Equip_01_anm +6 Gob_BM_2Cmbt_Equip_02_anm +7 Gob_BM_2Cmbt_Equip_03_anm +8 Gob_BM_Alert_Look_2Cmbt_02_anm +9 Gob_BM_Alert_Look_2Cmbt_03_anm +10 Gob_BM_Alert_Look_2Cmbt_04_anm +11 Gob_BM_Alert_Look_2Cmbt_anm +12 Gob_BM_Alert_Look_2Cmbt_Equip_01_anm +13 Gob_BM_Alert_Look_2Cmbt_Equip_02_anm +14 Gob_BM_Alert_Look_End_anm +15 Gob_BM_Alert_Look_Loop_anm +16 Gob_BM_Alert_Look_Start_anm +17 Gob_BM_Assassin_Alert_Look_2Cmbt_Equip_01_anm +18 Gob_BM_Assassin_Alert_Look_2Cmbt_Equip_02_anm +19 Gob_BM_Assassin_Alert_Look_2Cmbt_Equip_03_anm +20 Gob_BM_Idle_01_Face_anm +21 Gob_BM_Idle_02_Face_anm +22 Gob_BM_Idle_anm +23 Gob_BM_Idle_Turn_Lft_135_anm +24 Gob_BM_Idle_Turn_Lft_180_anm +25 Gob_BM_Idle_Turn_Lft_45_anm +26 Gob_BM_Idle_Turn_Lft_90_anm +27 Gob_BM_Idle_Turn_Rht_135_anm +28 Gob_BM_Idle_Turn_Rht_180_anm +29 Gob_BM_Idle_Turn_Rht_45_anm +30 Gob_BM_Idle_Turn_Rht_90_anm +31 Gob_BM_IdleBreak_01_anm +32 Gob_BM_IdleBreak_01_Face_anm +33 Gob_BM_IdleBreak_02_anm +34 Gob_BM_IdleBreak_03_anm +35 Gob_BM_IdleBreak_04_anm +36 Gob_BM_IdleBreak_05_anm +37 Gob_BM_IdleBreak_06_anm +38 Gob_BM_IdleBreak_07_anm +39 Gob_BM_IdleBreak_08_anm +40 Gob_BM_IdleBreak_09_anm +41 Gob_BM_IdleBreak_10_anm +42 Gob_BM_IdleBreak_11_anm +43 Gob_BM_IdleBreak_12_anm +44 Gob_BM_IdleBreak_13_anm +45 Gob_BM_Jog_Loop_Fwd_anm +46 Gob_BM_Jog_Loop_Fwd_v00_anm +47 Gob_BM_Lean_0_anm +48 Gob_BM_Spawn_anm +49 Gob_BM_Walk_Loop_Bwd_anm +50 Gob_BM_Walk_Loop_Fwd_anm +51 Gob_BM_Walk_Loop_Lft_135_anm +52 Gob_BM_Walk_Loop_Lft_45_anm +53 Gob_BM_Walk_Loop_Lft_90_anm +54 Gob_BM_Walk_Loop_Rht_135_anm +55 Gob_BM_Walk_Loop_Rht_45_anm +56 Gob_BM_Walk_Loop_Rht_90_anm +57 Gob_BM_Walk_Start_Fwd_anm +58 Gob_BM_Walk_Stop_Fwd_anm +59 Gob_BM_Walk_Turn_Start_Lft_135_anm +60 Gob_BM_Walk_Turn_Start_Lft_180_anm +61 Gob_BM_Walk_Turn_Start_Lft_45_anm +62 Gob_BM_Walk_Turn_Start_Lft_90_anm +63 Gob_BM_Walk_Turn_Start_Rht_135_anm +64 Gob_BM_Walk_Turn_Start_Rht_180_anm +65 Gob_BM_Walk_Turn_Start_Rht_45_anm +66 Gob_BM_Walk_Turn_Start_Rht_90_anm +67 Gob_BM_WalkFast_Loop_Fwd_anm +68 Gob_BM_WalkSlow_Loop_Fwd_anm +69 Gob_BM_Wpn_Hold_Rht_Arm_ADD_anm +70 Gob_Chief_Cmbt_Atk_Sprint_02_FromRun_anm +71 Gob_Cmbt_Alert_01_Face_anm +72 Gob_Cmbt_Assassin_Atk_Slash_anm +73 Gob_Cmbt_Assassin_Dash_anm +74 Gob_Cmbt_Assassin_Idle_anm +75 Gob_Cmbt_Assassin_Idle_LArm_replace_anm +76 Gob_Cmbt_Atk_Axe_01_End_Flourish_anm +77 Gob_Cmbt_Atk_Axe_Throw_01_anm +78 Gob_Cmbt_Atk_Counter_Lft_Throw_anm +79 Gob_Cmbt_Atk_Counter_Lft_ThrowKnife_anm +80 Gob_Cmbt_Atk_Counter_Rht_Throw_anm +81 Gob_Cmbt_Atk_Counter_Rht_ThrowKnife_anm +82 Gob_Cmbt_Atk_Katar_01_End_Flourish_anm +83 Gob_Cmbt_Atk_Katar_L2R_Hi_anm +84 Gob_Cmbt_Atk_Katar_R2L_Mid_anm +85 Gob_Cmbt_Atk_Knife_Throw_01_anm +86 Gob_Cmbt_Atk_Melee_Near_Katar_anm +87 Gob_Cmbt_Atk_Melee_Near_Swrd_anm +88 Gob_Cmbt_Atk_ShieldPunch_anm +89 Gob_Cmbt_Atk_Sprint_Katar_anm +90 Gob_Cmbt_Atk_Sprint_Loop_01_anm +91 Gob_Cmbt_Atk_Sprint_Loop_04_anm +92 Gob_Cmbt_Atk_Sprint_Start_01_anm +93 Gob_Cmbt_Atk_Sprint_Start_04_anm +94 Gob_Cmbt_Atk_Swrd_01_End_Flourish_anm +95 Gob_Cmbt_Atk_Swrd_01_End_Retreat_anm +96 Gob_Cmbt_Atk_Swrd_01_Retreat_End_anm +97 Gob_Cmbt_Atk_Swrd_01_Retreat_Loop_anm +98 Gob_Cmbt_Atk_Swrd_01_Retreat_Start_anm +99 Gob_Cmbt_Atk_Swrd_Spin_01_anm +100 Gob_Cmbt_Atk_Swrd_Spin_01_FromRun_anm +101 Gob_Cmbt_Atk_Swrd_Throw_01_anm +102 Gob_Cmbt_Axe_Retreat_End_anm +103 Gob_Cmbt_Axe_Retreat_Loop_anm +104 Gob_Cmbt_Axe_Retreat_Start_anm +105 Gob_Cmbt_Celebrate_01_anm +106 Gob_Cmbt_Celebrate_02_anm +107 Gob_Cmbt_Celebrate_03_anm +108 Gob_Cmbt_Celebrate_04_anm +109 Gob_Cmbt_Celebrate_05_anm +110 Gob_Cmbt_Celebrate_06_anm +111 Gob_Cmbt_Celebrate_07_anm +112 Gob_Cmbt_Celebrate_Death_anm +113 Gob_Cmbt_Celebrate_Death_v01_anm +114 Gob_Cmbt_Celebrate_Death_v02_anm +115 Gob_Cmbt_Celebrate_Event_anm +116 Gob_Cmbt_Celebrate_Event_v01_anm +117 Gob_Cmbt_Celebrate_Event_v02_anm +118 Gob_Cmbt_CrsBow_Equip_2Aim_anm +119 Gob_Cmbt_CrsBow_Equip_anm +120 Gob_Cmbt_CrsBow_Fire_Single_anm +121 Gob_Cmbt_CrsBow_Idle_anm +122 Gob_Cmbt_CrsBow_Idle_RArm_replace_anm +123 Gob_Cmbt_CrsBow_Taunt_02_anm +124 Gob_Cmbt_CrsBow_Taunt_anm +125 Gob_Cmbt_DodgeRoll_Lft__anm +126 Gob_Cmbt_DodgeRoll_Rht_anm +127 Gob_Cmbt_Equip_Katar_anm +128 Gob_Cmbt_Equip_Swrd_Fast_anm +129 Gob_Cmbt_Idle_01_Face_anm +130 Gob_Cmbt_Idle_02_anm +131 Gob_Cmbt_Idle_03_anm +132 Gob_Cmbt_Idle_anm +133 Gob_Cmbt_Idle_Shield_anm +134 Gob_Cmbt_IdleBreak_Adjust_Weight_v1_anm +135 Gob_Cmbt_IdleBreak_Adjust_Weight_v2_anm +136 Gob_Cmbt_IdleBreak_Adjust_Weight_v3_anm +137 Gob_Cmbt_IdleBreak_ArmShake_v01_anm +138 Gob_Cmbt_IdleBreak_Bolster_anm +139 Gob_Cmbt_IdleBreak_GetPumped_anm +140 Gob_Cmbt_IdleBreak_LookAround_Agressive_anm +141 Gob_Cmbt_IdleBreak_LookAround_anm +142 Gob_Cmbt_IdleBreak_LookAround_v01_anm +143 Gob_Cmbt_IdleBreak_LookAround_v02_anm +144 Gob_Cmbt_IdleBreak_Stretch_anm +145 Gob_Cmbt_IdleBreak_SwatFlies_anm +146 Gob_Cmbt_Jog_Loop_Bwd_anm +147 Gob_Cmbt_Jog_Loop_Fwd_anm +148 Gob_Cmbt_Jog_Loop_Lft_112_anm +149 Gob_Cmbt_Jog_Loop_Lft_135_anm +150 Gob_Cmbt_Jog_Loop_Lft_45_anm +151 Gob_Cmbt_Jog_Loop_Lft_90_anm +152 Gob_Cmbt_Jog_Loop_Rht_112_anm +153 Gob_Cmbt_Jog_Loop_Rht_135_anm +154 Gob_Cmbt_Jog_Loop_Rht_45_anm +155 Gob_Cmbt_Jog_Loop_Rht_90_anm +156 Gob_Cmbt_Jog_Start_Bck_anm +157 Gob_Cmbt_Jog_Start_Fwd_anm +158 Gob_Cmbt_Jog_Start_Lft_135_anm +159 Gob_Cmbt_Jog_Start_Lft_45_anm +160 Gob_Cmbt_Jog_Start_Lft_90_anm +161 Gob_Cmbt_Jog_Start_Rht_135_anm +162 Gob_Cmbt_Jog_Start_Rht_45_anm +163 Gob_Cmbt_Jog_Start_Rht_90_anm +164 Gob_Cmbt_Jog_Stop_Bck_anm +165 Gob_Cmbt_Jog_Stop_Fwd_anm +166 Gob_Cmbt_Jog_Stop_Lft_135_anm +167 Gob_Cmbt_Jog_Stop_Lft_45_anm +168 Gob_Cmbt_Jog_Stop_Lft_90_anm +169 Gob_Cmbt_Jog_Stop_Rht_135_anm +170 Gob_Cmbt_Jog_Stop_Rht_45_anm +171 Gob_Cmbt_Jog_Stop_Rht_90_anm +172 Gob_Cmbt_Jog_Turn_Start_Lft_135_anm +173 Gob_Cmbt_Jog_Turn_Start_Lft_180_anm +174 Gob_Cmbt_Jog_Turn_Start_Lft_45_anm +175 Gob_Cmbt_Jog_Turn_Start_Lft_90_anm +176 Gob_Cmbt_Jog_Turn_Start_Rht_135_anm +177 Gob_Cmbt_Jog_Turn_Start_Rht_180_anm +178 Gob_Cmbt_Jog_Turn_Start_Rht_45_anm +179 Gob_Cmbt_Jog_Turn_Start_Rht_90_anm +180 Gob_Cmbt_Jog_Turn_Stop_Lft_135_anm +181 Gob_Cmbt_Jog_Turn_Stop_Lft_180_anm +182 Gob_Cmbt_Jog_Turn_Stop_Lft_45_anm +183 Gob_Cmbt_Jog_Turn_Stop_Lft_90_anm +184 Gob_Cmbt_Jog_Turn_Stop_Rht_135_anm +185 Gob_Cmbt_Jog_Turn_Stop_Rht_180_anm +186 Gob_Cmbt_Jog_Turn_Stop_Rht_45_anm +187 Gob_Cmbt_Jog_Turn_Stop_Rht_90_anm +188 Gob_Cmbt_Katar_Retreat_End_anm +189 Gob_Cmbt_Katar_Retreat_Loop_anm +190 Gob_Cmbt_Katar_Retreat_Start_anm +191 Gob_Cmbt_LF_Idle_Turn_Lft_135_anm +192 Gob_Cmbt_LF_Idle_Turn_Lft_180_anm +193 Gob_Cmbt_LF_Idle_Turn_Lft_45_anm +194 Gob_Cmbt_LF_Idle_Turn_Lft_90_anm +195 Gob_Cmbt_LF_Idle_Turn_Rht_135_anm +196 Gob_Cmbt_LF_Idle_Turn_Rht_180_anm +197 Gob_Cmbt_LF_Idle_Turn_Rht_45_anm +198 Gob_Cmbt_LF_Idle_Turn_Rht_90_anm +199 Gob_Cmbt_Rct_Mandrake_Loop_anm +200 Gob_Cmbt_Rct_Mandrake_Start_anm +201 Gob_Cmbt_Rct_Mandrake_Stop_anm +202 Gob_Cmbt_Shield_Block_anm +203 Gob_Cmbt_Shuffle_Bck_anm +204 Gob_Cmbt_Shuffle_Fwd_anm +205 Gob_Cmbt_Shuffle_Lft_anm +206 Gob_Cmbt_Shuffle_Rht_anm +207 Gob_Cmbt_Shuffle_Sngl_Bck_anm +208 Gob_Cmbt_Shuffle_Sngl_Fwd_anm +209 Gob_Cmbt_Shuffle_Sngl_Lft_anm +210 Gob_Cmbt_Shuffle_Sngl_Rht_anm +211 Gob_Cmbt_Shuffle_Taunt_01_Bwd_anm +212 Gob_Cmbt_Shuffle_Taunt_01_Fwd_anm +213 Gob_Cmbt_Shuffle_Taunt_01_Lft_anm +214 Gob_Cmbt_Shuffle_Taunt_01_Rht_anm_anm +215 Gob_Cmbt_Shuffle_Taunt_02_Bwd_anm +216 Gob_Cmbt_Shuffle_Taunt_02_Fwd_anm +217 Gob_Cmbt_Shuffle_Taunt_02_Lft_anm +218 Gob_Cmbt_Shuffle_Taunt_02_Rht_anm +219 Gob_Cmbt_Shuffle_Taunt_03_Bwd_anm +220 Gob_Cmbt_Shuffle_Taunt_03_Fwd_anm +221 Gob_Cmbt_Shuffle_Taunt_03_Lft_anm +222 Gob_Cmbt_Shuffle_Taunt_03_Rht_anm +223 Gob_Cmbt_Shuffle_Taunt_04_Bwd_anm +224 Gob_Cmbt_Shuffle_Taunt_04_Fwd_anm +225 Gob_Cmbt_Shuffle_Taunt_04_Lft_anm +226 Gob_Cmbt_Shuffle_Taunt_04_Rht_anm +227 Gob_Cmbt_Slide_Loop_40_anm +228 Gob_Cmbt_Slide_Loop_anm +229 Gob_Cmbt_Slide_Start_40_anm +230 Gob_Cmbt_Slide_Start_anm +231 Gob_Cmbt_Slide_Stop_anm +232 Gob_Cmbt_Spawn_Smoke_anm +233 Gob_Cmbt_Spawn_Smoke_anm1 +234 Gob_Cmbt_SplineSpawn_anm +235 Gob_Cmbt_Taunt_01_anm +236 Gob_Cmbt_Taunt_01_Face_anm +237 Gob_Cmbt_Taunt_02_anm +238 Gob_Cmbt_Taunt_02_Face_anm +239 Gob_Cmbt_Taunt_03_anm +240 Gob_Cmbt_Taunt_04_anm +241 Gob_Cmbt_Taunt_Assassin_01_anm +242 Gob_Cmbt_Taunt_Assassin_02_anm +243 Gob_Cmbt_Taunt_Axe_01_anm +244 Gob_Cmbt_Taunt_Axe_02_anm +245 Gob_Cmbt_Taunt_Lft_180_anm +246 Gob_Cmbt_Taunt_Lft_90_anm +247 Gob_Cmbt_Taunt_Rht_180_anm +248 Gob_Cmbt_Taunt_Rht_90_anm +249 Gob_Cmbt_Taunt_Unarmed_anm +250 Gob_Cmbt_UnEquip_Katar_anm +251 Gob_Cmbt_UnEquip_Sword_anm +252 Gob_Cmbt_Walk_Loop_Bwd_anm +253 Gob_Cmbt_Walk_Loop_Fwd_anm +254 Gob_Cmbt_Walk_Loop_Lft_112_anm +255 Gob_Cmbt_Walk_Loop_Lft_135_anm +256 Gob_Cmbt_Walk_Loop_Lft_45_anm +257 Gob_Cmbt_Walk_Loop_Lft_90_anm +258 Gob_Cmbt_Walk_Loop_Rht_112_anm +259 Gob_Cmbt_Walk_Loop_Rht_135_anm +260 Gob_Cmbt_Walk_Loop_Rht_45_anm +261 Gob_Cmbt_Walk_Loop_Rht_90_anm +262 Gob_Cmbt_Walk_Start_Bwd_anm +263 Gob_Cmbt_Walk_Start_Fwd_anm +264 Gob_Cmbt_Walk_Start_Lft_135_anm +265 Gob_Cmbt_Walk_Start_Lft_45_anm +266 Gob_Cmbt_Walk_Start_Lft_90_anm +267 Gob_Cmbt_Walk_Start_Rht_135_anm +268 Gob_Cmbt_Walk_Start_Rht_45_anm +269 Gob_Cmbt_Walk_Start_Rht_90_anm +270 Gob_Cmbt_Walk_Stop_Bwd_anm +271 Gob_Cmbt_Walk_Stop_Fwd_anm +272 Gob_Cmbt_Walk_Stop_Lft_135_anm +273 Gob_Cmbt_Walk_Stop_Lft_45_anm +274 Gob_Cmbt_Walk_Stop_Lft_90_anm +275 Gob_Cmbt_Walk_Stop_Rht_135_anm +276 Gob_Cmbt_Walk_Stop_Rht_45_anm +277 Gob_Cmbt_Walk_Stop_Rht_90_anm +278 Gob_Cmbt_Walk_Turn_Start_Lft_135_anm +279 Gob_Cmbt_Walk_Turn_Start_Lft_180_anm +280 Gob_Cmbt_Walk_Turn_Start_Lft_45_anm +281 Gob_Cmbt_Walk_Turn_Start_Lft_90_anm +282 Gob_Cmbt_Walk_Turn_Start_Rht_135_anm +283 Gob_Cmbt_Walk_Turn_Start_Rht_180_anm +284 Gob_Cmbt_Walk_Turn_Start_Rht_45_anm +285 Gob_Cmbt_Walk_Turn_Start_Rht_90_anm +286 Gob_Cmbt_Walk_Turn_Stop_Lft_135_anm +287 Gob_Cmbt_Walk_Turn_Stop_Lft_180_anm +288 Gob_Cmbt_Walk_Turn_Stop_Lft_45_anm +289 Gob_Cmbt_Walk_Turn_Stop_Lft_90_anm +290 Gob_Cmbt_Walk_Turn_Stop_Rht_135_anm +291 Gob_Cmbt_Walk_Turn_Stop_Rht_180_anm +292 Gob_Cmbt_Walk_Turn_Stop_Rht_45_anm +293 Gob_Cmbt_Walk_Turn_Stop_Rht_90_anm +294 Gob_Cmbt_WalkSlow_Loop_Fwd1_anm +295 Gob_Enemy_Intro_Assassin_anm +296 Gob_Rct_Atk_01_Face_anm +297 Gob_Rct_Atk_02_Face_anm +298 Gob_Rct_Cringe_End_01_anm +299 Gob_Rct_Cringe_End_02_anm +300 Gob_Rct_Cringe_End_03_anm +301 Gob_Rct_Cringe_End_04_anm +302 Gob_Rct_Cringe_Loop_01_anm +303 Gob_Rct_Cringe_Loop_02_anm +304 Gob_Rct_Cringe_Loop_03_anm +305 Gob_Rct_Cringe_Loop_04_anm +306 Gob_Rct_Cringe_Start_01_anm +307 Gob_Rct_Cringe_Start_02_anm +308 Gob_Rct_Cringe_Start_03_anm +309 Gob_Rct_Cringe_Start_04_anm +310 Gob_Rct_CrsBow_Hit_Fwd_anm +311 Gob_Rct_CrsBow_Hitch_Bwd_Add_anm +312 Gob_Rct_CrsBow_Hitch_Fwd_Add_anm +313 Gob_Rct_CrsBow_Hitch_Lft_Add_anm +314 Gob_Rct_CrsBow_Hitch_Rht_Add_anm +315 Gob_Rct_Crucio_Stop_anm +316 Gob_Rct_Death_01_Face_anm +317 Gob_Rct_Death_Bck_01_anm +318 Gob_Rct_Death_Bck_02_anm +319 Gob_Rct_Death_Fwd_01_anm +320 Gob_Rct_Death_Fwd_02_anm +321 Gob_Rct_Death_Lft_01_anm +322 Gob_Rct_Death_Lft_02_anm +323 Gob_Rct_Death_Rht_01_anm +324 Gob_Rct_Death_Rht_02_anm +325 Gob_Rct_Finisher_Anticipate_01_anm +326 Gob_Rct_Finisher_Anticipate_02_anm +327 Gob_Rct_Finisher_Anticipate_03_anm +328 Gob_Rct_Finisher_Anticipate_04_anm +329 Gob_Rct_Getup_Bck_2Knee_anm +330 Gob_Rct_Getup_Bck_anm +331 Gob_Rct_Getup_Frnt_2Knee_anm +332 Gob_Rct_Getup_Frnt_anm +333 Gob_Rct_Getup_Lftside_2Knee_anm +334 Gob_Rct_Getup_LftSide_anm +335 Gob_Rct_Getup_Lftside_FD_2Knee_anm +336 Gob_Rct_Getup_LftSide_FD_anm +337 Gob_Rct_Getup_Lftside_FU_2Knee_anm +338 Gob_Rct_Getup_LftSide_FU_anm +339 Gob_Rct_Getup_Rhtside_2Knee_anm +340 Gob_Rct_Getup_RhtSide_anm +341 Gob_Rct_Getup_Rhtside_FD_2Knee_anm +342 Gob_Rct_Getup_RhtSide_FD_anm +343 Gob_Rct_Getup_Rhtside_FU_2Knee_anm +344 Gob_Rct_Getup_RhtSide_FU_anm +345 Gob_Rct_Getup_Slouch_2Knee_anm +346 Gob_Rct_Getup_Slouch_anm +347 Gob_Rct_Hit_01_Face_anm +348 Gob_Rct_Hit_02_Face_anm +349 Gob_Rct_Hit_Bwd_02_anm +350 Gob_Rct_Hit_Bwd_03_anm +351 Gob_Rct_Hit_Bwd_04_anm +352 Gob_Rct_Hit_Bwd_anm +353 Gob_Rct_Hit_Fwd_anm +354 Gob_Rct_Hit_Lft_anm +355 Gob_Rct_Hit_Rht_anm +356 Gob_Rct_Hitch_Bck_01_Add_anm +357 Gob_Rct_Hitch_Bck_02_Add_anm +358 Gob_Rct_Hitch_Bck_02_anm +359 Gob_Rct_Hitch_Bwd_Add_anm +360 Gob_Rct_Hitch_Fwd_01_Add_anm +361 Gob_Rct_Hitch_Fwd_01_anm +362 Gob_Rct_Hitch_Fwd_Add_anm +363 Gob_Rct_Hitch_Lft_01_ADD_anm +364 Gob_Rct_Hitch_Lft_01_anm +365 Gob_Rct_Hitch_Lft_Add_01_anm +366 Gob_Rct_Hitch_Lft_Add_anm +367 Gob_Rct_Hitch_Rht_01_Add_anm +368 Gob_Rct_Hitch_Rht_01_anm +369 Gob_Rct_Hitch_Rht_Add_anm +370 Gob_Rct_KnckDn_Bwd_SplatHold_anm +371 Gob_Rct_KnckDn_Fwd_Hvy_anm +372 Gob_Rct_KnckDn_Fwd_Hvy_Splat_anm +373 Gob_Rct_KnckDn_Fwd_SplatHold_anm +374 Gob_Rct_KnckDn_Hvy_anm +375 Gob_Rct_KnckDn_Hvy_Splat_anm +376 Gob_Rct_Levitated_Land_anm +377 Gob_Rct_Send_Bwd_Loop_02_anm +378 Gob_Rct_Send_Bwd_Loop_anm +379 Gob_Rct_Send_Bwd_Tumble_Loop_02_anm +380 Gob_Rct_Send_Bwd_Tumble_Loop_anm +381 Gob_Rct_Spell_Dance_anm +382 Gob_Rct_Spell_Incarcerous_Loop_anm +383 Gob_Rct_Spell_Petrificus_Start_anm +384 Gob_Rct_Spell_Scalp_anm +385 Gob_Rct_Spell_Sneeze_anm +386 Gob_Rct_Spell_Trip_Catch_anm +387 Gob_Rct_Spell_Trip_Fall_anm +388 Gob_Rct_Stumble_Bck_4m_anm +389 Gob_Rct_Stumble_Bwd_Dazed_End_anm +390 Gob_Rct_Stumble_Bwd_Dazed_End_v2_anm +391 Gob_Rct_Stumble_Bwd_Dazed_Loop_anm +392 Gob_Rct_Stumble_Bwd_Dazed_Start_anm +393 Gob_Rct_Stumble_Bwd_Fire_anm +394 Gob_Rct_Stumble_Bwd_Lft_anm +395 Gob_Rct_Stumble_Bwd_Rht_anm +396 Gob_Rct_Stumble_Fwd_4m_anm +397 Gob_Rct_Stumble_Lft_4m_anm +398 Gob_Rct_Stumble_Rht_4m_anm +399 Gob_Rct_Swarm_Death_01_anm +400 Gob_Rct_Swarm_Death_anm +401 Gob_Rct_Swarm_Loop_01_anm +402 Gob_Rct_Swarm_Loop_anm +403 Gob_Rct_Swarm_Start_01_anm +404 Gob_Rct_Swarm_Start_anm +405 Gob_Rct_Swarm_Stop_01_anm +406 Gob_Rct_Swarm_Stop_anm +407 Gob_Srch_Idle_03_anm +408 Gob_Srch_Idle_04_anm +409 Gob_Srch_Turn_InPlace_anm +410 Gob_Srch_Walk_Loop_Fwd_01_anm +411 Gob_Srch_Walk_Loop_Fwd_02_anm +412 Gob_Srch_Walk_Start_anm +413 Gob_Srch_Walk_Stop_Fwd_anm +414 Gob_Srch_Walk_Turn_Start_Lft_135_anm +415 Gob_Srch_Walk_Turn_Start_Lft_180_anm +416 Gob_Srch_Walk_Turn_Start_Lft_45_anm +417 Gob_Srch_Walk_Turn_Start_Lft_90_anm +418 Gob_Srch_Walk_Turn_Start_Rht_135_anm +419 Gob_Srch_Walk_Turn_Start_Rht_180_anm +420 Gob_Srch_Walk_Turn_Start_Rht_45_anm +421 Gob_Srch_Walk_Turn_Start_Rht_90_anm +422 Gob_Stairs_Jog_Dn_Loop_FLAT_anm +423 Gob_Stairs_Jog_Up_Loop_FLAT_anm +424 Gob_Stairs_Walk_Dn_Loop_FLAT_anm +425 Gob_Stairs_Walk_Up_Loop_FLAT_anm +426 Gob_Travel_Apparate_In_Long_anm +427 Gob_Travel_Apparate_Out_anm +428 Gob_Travel_Apparate_Out_Long_anm diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/Goblin_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/Goblin_Anim.fbx index 320b93641..24f3df2f4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/Goblin_Anim.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/Goblin_Anim.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a6b3c84007827d3b00905b78ca4de6a4a88a05d2996410b3677ad65530ef6ce -size 43823820 +oid sha256:7a79d73c0eeab355f9fbbab5ba1c4c42896d33efecb885325ea3c0f036dd4507 +size 43823420 diff --git a/Jusin154_Team3D/Editor/Private/DummyObject.cpp b/Jusin154_Team3D/Editor/Private/DummyObject.cpp index 7f3568f40..80fe4cfde 100644 --- a/Jusin154_Team3D/Editor/Private/DummyObject.cpp +++ b/Jusin154_Team3D/Editor/Private/DummyObject.cpp @@ -39,11 +39,11 @@ HRESULT CDummyObject::Initialize(void* pArg) void CDummyObject::Priority_Update(_float fTimeDelta) { - } void CDummyObject::Update(_float fTimeDelta) { + Describe_Entity(); m_pModelCom->Play_Animation(fTimeDelta,m_pTransformCom); } @@ -154,4 +154,7 @@ void CDummyObject::Free() void CDummyObject::Describe_Entity() { + if (nullptr != m_pModelCom) { + m_pModelCom->Describe_Entity(); + } } diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp index d320b6f3f..2bd96f181 100644 --- a/Jusin154_Team3D/Engine/Private/Camera.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera.cpp @@ -56,7 +56,7 @@ HRESULT CCamera::Bind_Matrices() if (true == m_bActive) { m_pGameInstance->Set_Transform(D3DTS::VIEW, XMMatrixInverse(nullptr, XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr()))); m_pGameInstance->Set_Transform(D3DTS::PROJ, XMMatrixPerspectiveFovLH(m_fFovy, m_fAspect, m_fNear, m_fFar)); - Ready_Shadow(); + //Ready_Shadow(); } return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index ccb805b33..3d7d6c6eb 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -1441,51 +1441,41 @@ void CModel::Free() #ifdef _DEBUG void CModel::Describe_Entity() { - //GUI::Begin("Model_Desc"); - //GUI::Text("Lerping : %d\nAnim : %d", m_pLerpAnim->IsLerping(), m_bIsFinishedAnim); - //for (_uint i = 0; i < m_iNumAnimations; ++i) { - // if (GUI::Button(m_Animations[i]->Get_Name().c_str())) { - // Change_AnimationIndex(i, false, 0.25f); - // } - //} - //if (GUI::Button("SaveAnimIndexWithName")) { - // _wstring wstrPath = TEXT("../Bin/AnimIndex.txt"); - // HANDLE hFile = CreateFile(wstrPath.c_str(), - // GENERIC_WRITE, NULL, - // NULL, CREATE_ALWAYS, - // FILE_ATTRIBUTE_NORMAL, NULL - // ); + GUI::Begin("Model_Desc"); + if (GUI::Button("SaveAnimIndexWithName")) { + _wstring wstrPath = TEXT("../Bin/AnimIndex.txt"); + HANDLE hFile = CreateFile(wstrPath.c_str(), + GENERIC_WRITE, NULL, + NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL + ); - // if (hFile == INVALID_HANDLE_VALUE) - // { - // GUI::End(); - // CloseHandle(hFile); - // return; - // } + if (hFile == INVALID_HANDLE_VALUE) + { + GUI::End(); + CloseHandle(hFile); + return; + } - // _string name = {}; - // for (_uint i = 0; i < m_iNumAnimations; ++i) { - // - // name.clear(); - // name.append(to_string(i) + '\t' + m_Animations[i]->Get_Name() + "\n"); - // name.shrink_to_fit(); - // WriteFile(hFile, name.data(),(DWORD) name.length(), nullptr, nullptr); - // } + _string name = {}; + for (_uint i = 0; i < m_iNumAnimations; ++i) { + + name.clear(); + name.append(m_Animations[i]->Get_SZName()); - // CloseHandle(hFile); + size_t pos = name.find_last_of('|'); + if (0 > pos) { pos = 0; } + else { pos++; } + name = name.substr(pos); + name = to_string(i) + '\t' + name + '\n'; + name.shrink_to_fit(); + WriteFile(hFile, name.data(),(DWORD) name.length(), nullptr, nullptr); + } - //} - //GUI::End(); - // - //GUI::Begin("Bone_Desc"); - //_uint iNumBones = (_uint)m_Bones.size(); - //for (_uint i = 0; i < iNumBones; ++i){ - // _float3 vPos = m_Bones[i]->Get_LocalPosition(); - // GUI::PushID(i); - // GUI::DragFloat3(m_Bones[i]->Get_Name(), (_float*)&vPos, 1.f, 0.f, 0.f, "%.3f", ImGuiSliderFlags_NoInput); - // GUI::PopID(); - //} - //GUI::End(); + CloseHandle(hFile); + + } + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index 1079da162..5bb55bc2a 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -11,9 +11,12 @@ enum ESTATE SPRINT, JUMP,JUMP_JOG,JUMP_SPRINT, LAND, - DODGE,DODGE_BLINK, + DODGE,DODGE_BLINK, DODGE_LEFT, DODGE_RIGHT, COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2, ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,DISILLUSION_ENTER,DISILLUSION_EXIT, + HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R, + KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD, + DEAD, DEAD_FWD, DEAD_FWD2, DEAD_BWD, DEAD_BWD2, DEAD_L, DEAD_L2, DEAD_R, DEAD_R2, MAPHELP, END }; From fea2dc47c482af79ef47dd18cb3310ec1ce659ad Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 26 Nov 2025 22:50:21 +0900 Subject: [PATCH 03/10] [add] goblin States --- .../Client/Private/Goblin_States.cpp | 23 +++++++++++++++---- Jusin154_Team3D/Editor/Private/Loader.cpp | 8 +++++++ Jusin154_Team3D/Editor/Private/Player.cpp | 8 +++---- Jusin154_Team3D/Editor/Private/Wand.cpp | 4 ++-- Jusin154_Team3D/Engine/Public/State.h | 5 ++++ 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 4b2f2d625..2778e4285 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -137,6 +137,9 @@ void CGoblin::Add_FSM() void CGoblin::Set_Anim() { m_Animation[STATEANIM::IDLE] = { 22,true }; + m_Animation[STATEANIM::IDLE_TURN_BWD] = { 24, false }; + m_Animation[STATEANIM::IDLE_TURN_L] = { 26, false }; + m_Animation[STATEANIM::IDLE_TURN_R] = { 30, false }; m_Animation[STATEANIM::WALK_FWD] = { 50,true }; m_Animation[STATEANIM::WALK_STOP] = { 58,false }; @@ -152,8 +155,6 @@ void CGoblin::Set_Anim() m_Animation[STATEANIM::SKILL] = { 70,false }; // 도끼 스윙 m_Animation[STATEANIM::SKILL2] = { 85,false }; // 나이프 던지기 - - m_Animation[STATEANIM::HIT_FWD] = { 353, false }; m_Animation[STATEANIM::HIT_BWD] = { 352, false }; m_Animation[STATEANIM::HIT_BWD2] = { 349, false }; @@ -169,6 +170,22 @@ void CGoblin::Set_Anim() m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT] = { 372, false }; m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT_HOLD] = { 373, false }; + m_Animation[STATEANIM::GETUP_BWD] = { 330, false }; + m_Animation[STATEANIM::GETUP_FWD] = { 332, false }; + m_Animation[STATEANIM::GETUP_L] = { 334, false }; + m_Animation[STATEANIM::GETUP_L_FD] = { 336, false }; + m_Animation[STATEANIM::GETUP_L_FU] = { 338, false }; + m_Animation[STATEANIM::GETUP_R] = { 340, false }; + m_Animation[STATEANIM::GETUP_R_FD] = { 342, false }; + m_Animation[STATEANIM::GETUP_R_FU] = { 344, false }; + m_Animation[STATEANIM::GETUP_SLOUCH] = { 346, false }; + + m_Animation[STATEANIM::KNOCKBACK] = { 377, true }; + m_Animation[STATEANIM::KNOCKBACK2] = { 378, true }; + m_Animation[STATEANIM::TUMBLE] = { 379, true }; + m_Animation[STATEANIM::TUMBLE2] = { 380, true }; + m_Animation[STATEANIM::PETRIFICUSED_START] = { 383, false }; + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; @@ -177,6 +194,4 @@ void CGoblin::Set_Anim() m_Animation[STATEANIM::DEAD_L2] = { 322, false }; m_Animation[STATEANIM::DEAD_R] = { 323, false }; m_Animation[STATEANIM::DEAD_R2] = { 324, false }; - - } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index a8bcead1a..68fc33991 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -1650,6 +1650,14 @@ HRESULT CLoader::Loading_For_ObjectViewer() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_Wand */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrailObject::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_Wand */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrail::Create(m_pDevice, m_pContext)))) + return E_FAIL; + m_strMessage = TEXT("Loading Success!"); m_isFinished = true; diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index fb200e130..34aa38980 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -202,10 +202,10 @@ HRESULT CPlayer::Ready_Parts() WandDesc.pParentTransform = m_pTransformCom; WandDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand"); - if (FAILED(Add_PartObject("Wand", g_iStaticLevel, nullptr, &WandDesc))) - { - return E_FAIL; - } + //if (FAILED(Add_PartObject("Wand", g_iStaticLevel, nullptr, &WandDesc))) + //{ + // return E_FAIL; + //} { CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc; diff --git a/Jusin154_Team3D/Editor/Private/Wand.cpp b/Jusin154_Team3D/Editor/Private/Wand.cpp index 6c085e83f..1e2fbc187 100644 --- a/Jusin154_Team3D/Editor/Private/Wand.cpp +++ b/Jusin154_Team3D/Editor/Private/Wand.cpp @@ -36,7 +36,7 @@ HRESULT CWand::Initialize(void* pArg) PartsDesc.pParentTransform = m_pTransformCom; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) { assert(false); return E_FAIL; } @@ -45,7 +45,7 @@ HRESULT CWand::Initialize(void* pArg) return E_FAIL; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, &m_pEffectParts))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, &m_pEffectParts))) { assert(false); return E_FAIL; } diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index 5bb55bc2a..07794e9ae 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -16,7 +16,12 @@ enum ESTATE ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,DISILLUSION_ENTER,DISILLUSION_EXIT, HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R, KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD, + GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH, DEAD, DEAD_FWD, DEAD_FWD2, DEAD_BWD, DEAD_BWD2, DEAD_L, DEAD_L2, DEAD_R, DEAD_R2, + KNOCKBACK, KNOCKBACK2, + TUMBLE, TUMBLE2, + PETRIFICUSED_START, + MAPHELP, END }; From 3bea86daa89a16ac4232cd0f8d87427647b7c8d0 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 00:19:30 +0900 Subject: [PATCH 04/10] =?UTF-8?q?[add]=20Picking=20=EC=B5=9C=EC=A0=81?= =?UTF-8?q?=ED=99=94=20[add]=20=EB=B8=94=EB=A3=B8=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EA=B6=8C=20=EA=B0=95=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShaderFiles/Engine_Shader_Functions.hlsli | 18 +++- .../ShaderFiles/Engine_Shader_States.hlsli | 7 ++ .../ShaderFiles/Shader_Deferred.hlsl | 98 +++++++++---------- .../ShaderFiles/Engine_Shader_Functions.hlsli | 18 +++- .../ShaderFiles/Engine_Shader_States.hlsli | 7 ++ .../ShaderFiles/Shader_Deferred.hlsl | 98 +++++++++---------- Jusin154_Team3D/Engine/Private/Picking.cpp | 51 +++++----- Jusin154_Team3D/Engine/Private/Renderer.cpp | 22 +++-- Jusin154_Team3D/Engine/Public/Picking.h | 2 - Jusin154_Team3D/Engine/Public/Renderer.h | 3 +- 10 files changed, 182 insertions(+), 142 deletions(-) diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 7037ecd28..14a4fff41 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -168,15 +168,27 @@ PBR_LIGHT_OUT PBR_Lighting( return Out; } -float GetBloomCurve(float x) +float GetBloomCurve(float x, float fThreshold, uint iMethod) { float fResult = x; - float fThreshold = 0.68f * 2.f; + // float fThreshold = 0.68f * 2.f; x *= 2.f; - fResult = x * 0.05f // 최소 기본값 보장 + if (iMethod == 0) + { + fResult = x * 0.05f // 최소 기본값 보장 + max(0, x - fThreshold) // 밝기값 68 이하는 기본값으로하고 초과하면 그 값만큼 더해줌 * 0.5f; // 0~2로 정규화 되어있기 때문에 강조 값 보정해줌 + } + else if (iMethod == 1) + { + fResult = x * x / 3.2f; + } + else if (iMethod == 2) + { + fResult = max(0, x - fThreshold); + fResult = pow(fResult, 3.f); + } return fResult * 0.5f; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli index 3b37f3b2c..f8468ae65 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli @@ -61,6 +61,13 @@ DepthStencilState DSS_Effect BlendState BS_None { BlendEnable[0] = false; + BlendEnable[1] = false; + BlendEnable[2] = false; + BlendEnable[3] = false; + BlendEnable[4] = false; + BlendEnable[5] = false; + BlendEnable[6] = false; + BlendEnable[7] = false; }; BlendState BS_AlphaBlend // ALPHA_BLEND diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index eef8ea86c..a2a3848b7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -11,6 +11,9 @@ uint g_iMaxShadowWidth; uint g_iMaxShadowHeight; float2 g_vResolution; +uint g_iBloomEmbossingPass; +float g_fThreshold; + Texture2D g_Texture; float g_fLightRange; @@ -90,6 +93,7 @@ struct PS_IN struct PS_OUT_BACKBUFFER { float4 vBackBuffer : SV_TARGET0; + float4 vBloomBuffer : SV_Target1; }; PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In) @@ -97,7 +101,7 @@ PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In) PS_OUT_BACKBUFFER Out; Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord); - + Out.vBloomBuffer = float4(0.f, 0.f, 0.f, 0.f); return Out; } @@ -412,36 +416,8 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); - //float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x; - //float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x; - //bool IsShadow = { false }; - //if (vPosition.z - 0.0005f > fShadowDepth) - //{ - // IsShadow = true; - //} - //if (vPreShadowPosition.z - 0.0005f > fPreShadowDepth) - //{ - // IsShadow = true; - //} - //if (true == IsShadow) - //{ - // Out.vBackBuffer *= 0.5f; - //} float4 vColor = 0.f; - - - int iBlurWeight = (int)(round(g_BlurWeightXTexture.Sample(ClampSampler, In.vTexcoord).r) * 128.f); - - int iBlurMin; - int iBlurMax; - - iBlurMin = -1 * (iBlurWeight / 2) + 1; - iBlurMax = iBlurWeight / 2; - - // // 변수로 루프돌리려면 반드시 필요함 - - for (int i = -63; i < 64; ++i) { vTexcoord.x = In.vTexcoord.x; @@ -451,40 +427,62 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) } Out.vBackBuffer += vColor; + Out.vBloomBuffer; return Out; } -PS_OUT_BACKBUFFER PS_MAIN_REFIT(PS_IN In) -{ - PS_OUT_BACKBUFFER Out; - Out.vBackBuffer = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); +struct PS_OUT_FLT4_SINGLE +{ + vector vSingleTarget : SV_TARGET0; +}; + + +PS_OUT_FLT4_SINGLE PS_MAIN_REFIT(PS_IN In) +{ + PS_OUT_FLT4_SINGLE Out; + + Out.vSingleTarget = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); return Out; } -PS_OUT_BACKBUFFER PS_MAIN_EMBOSS(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; - float3 vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; + vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); + //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; + float3 vColor = vInput.rgb; + uint iMask = (uint) round(vInput.a * 255.f); - // temp 이거 키면 겁나 빤짞빤짞 빛남 ㄷㄷ - //vColor *= 3.f; - // temp + switch (iMask) + { + case 0: + /* None */ + vColor = float3(0.f, 0.f, 0.f); + break; + case 1: + /* Basic_Apply */ + break; + case 2: + /* Multiply */ + vColor *= 3; + break; + } - //float fIntensity = dot(vColor, float3(0.3333f, 0.3333f, 0.3333f)); // 대략적인 밝기 float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f)); // 대략적인 밝기 ( 인간적인 ) if (fIntensity <= 1e-4f) { - Out.vBackBuffer = 0; + Out.vSingleTarget = 0; return Out; } - float fBloomIntensity = GetBloomCurve(fIntensity); + + float fBloomIntensity = GetBloomCurve(fIntensity, g_fThreshold, g_iBloomEmbossingPass); float3 bloomColor = (vColor * fBloomIntensity) / fIntensity; - Out.vBackBuffer = float4(bloomColor, 1.f); + Out.vSingleTarget = float4(bloomColor, 1.f); return Out; } @@ -495,26 +493,26 @@ struct PS_OUT_BLUR_X float4 vBlurWeight : SV_TARGET1; }; -PS_OUT_BACKBUFFER PS_MAIN_BLOOM_ACCUM(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; float3 vColorSrcB = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; - Out.vBackBuffer = float4(saturate(vColorSrcA + vColorSrcB), 1.f); + Out.vSingleTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f); return Out; } -PS_OUT_BACKBUFFER PS_MAIN_BLOOM_FINISH(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); float3 vBloom = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; - Out.vBackBuffer = vColor; - Out.vBackBuffer += float4(vBloom, 1.f); + Out.vSingleTarget = vColor; + Out.vSingleTarget += float4(vBloom, 1.f); return Out; } diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 7037ecd28..14a4fff41 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -168,15 +168,27 @@ PBR_LIGHT_OUT PBR_Lighting( return Out; } -float GetBloomCurve(float x) +float GetBloomCurve(float x, float fThreshold, uint iMethod) { float fResult = x; - float fThreshold = 0.68f * 2.f; + // float fThreshold = 0.68f * 2.f; x *= 2.f; - fResult = x * 0.05f // 최소 기본값 보장 + if (iMethod == 0) + { + fResult = x * 0.05f // 최소 기본값 보장 + max(0, x - fThreshold) // 밝기값 68 이하는 기본값으로하고 초과하면 그 값만큼 더해줌 * 0.5f; // 0~2로 정규화 되어있기 때문에 강조 값 보정해줌 + } + else if (iMethod == 1) + { + fResult = x * x / 3.2f; + } + else if (iMethod == 2) + { + fResult = max(0, x - fThreshold); + fResult = pow(fResult, 3.f); + } return fResult * 0.5f; } diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli index 3b37f3b2c..f8468ae65 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli @@ -61,6 +61,13 @@ DepthStencilState DSS_Effect BlendState BS_None { BlendEnable[0] = false; + BlendEnable[1] = false; + BlendEnable[2] = false; + BlendEnable[3] = false; + BlendEnable[4] = false; + BlendEnable[5] = false; + BlendEnable[6] = false; + BlendEnable[7] = false; }; BlendState BS_AlphaBlend // ALPHA_BLEND diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index eef8ea86c..a2a3848b7 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -11,6 +11,9 @@ uint g_iMaxShadowWidth; uint g_iMaxShadowHeight; float2 g_vResolution; +uint g_iBloomEmbossingPass; +float g_fThreshold; + Texture2D g_Texture; float g_fLightRange; @@ -90,6 +93,7 @@ struct PS_IN struct PS_OUT_BACKBUFFER { float4 vBackBuffer : SV_TARGET0; + float4 vBloomBuffer : SV_Target1; }; PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In) @@ -97,7 +101,7 @@ PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In) PS_OUT_BACKBUFFER Out; Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord); - + Out.vBloomBuffer = float4(0.f, 0.f, 0.f, 0.f); return Out; } @@ -412,36 +416,8 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); - //float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x; - //float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x; - //bool IsShadow = { false }; - //if (vPosition.z - 0.0005f > fShadowDepth) - //{ - // IsShadow = true; - //} - //if (vPreShadowPosition.z - 0.0005f > fPreShadowDepth) - //{ - // IsShadow = true; - //} - //if (true == IsShadow) - //{ - // Out.vBackBuffer *= 0.5f; - //} float4 vColor = 0.f; - - - int iBlurWeight = (int)(round(g_BlurWeightXTexture.Sample(ClampSampler, In.vTexcoord).r) * 128.f); - - int iBlurMin; - int iBlurMax; - - iBlurMin = -1 * (iBlurWeight / 2) + 1; - iBlurMax = iBlurWeight / 2; - - // // 변수로 루프돌리려면 반드시 필요함 - - for (int i = -63; i < 64; ++i) { vTexcoord.x = In.vTexcoord.x; @@ -451,40 +427,62 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) } Out.vBackBuffer += vColor; + Out.vBloomBuffer; return Out; } -PS_OUT_BACKBUFFER PS_MAIN_REFIT(PS_IN In) -{ - PS_OUT_BACKBUFFER Out; - Out.vBackBuffer = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); +struct PS_OUT_FLT4_SINGLE +{ + vector vSingleTarget : SV_TARGET0; +}; + + +PS_OUT_FLT4_SINGLE PS_MAIN_REFIT(PS_IN In) +{ + PS_OUT_FLT4_SINGLE Out; + + Out.vSingleTarget = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); return Out; } -PS_OUT_BACKBUFFER PS_MAIN_EMBOSS(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; - float3 vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; + vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); + //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; + float3 vColor = vInput.rgb; + uint iMask = (uint) round(vInput.a * 255.f); - // temp 이거 키면 겁나 빤짞빤짞 빛남 ㄷㄷ - //vColor *= 3.f; - // temp + switch (iMask) + { + case 0: + /* None */ + vColor = float3(0.f, 0.f, 0.f); + break; + case 1: + /* Basic_Apply */ + break; + case 2: + /* Multiply */ + vColor *= 3; + break; + } - //float fIntensity = dot(vColor, float3(0.3333f, 0.3333f, 0.3333f)); // 대략적인 밝기 float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f)); // 대략적인 밝기 ( 인간적인 ) if (fIntensity <= 1e-4f) { - Out.vBackBuffer = 0; + Out.vSingleTarget = 0; return Out; } - float fBloomIntensity = GetBloomCurve(fIntensity); + + float fBloomIntensity = GetBloomCurve(fIntensity, g_fThreshold, g_iBloomEmbossingPass); float3 bloomColor = (vColor * fBloomIntensity) / fIntensity; - Out.vBackBuffer = float4(bloomColor, 1.f); + Out.vSingleTarget = float4(bloomColor, 1.f); return Out; } @@ -495,26 +493,26 @@ struct PS_OUT_BLUR_X float4 vBlurWeight : SV_TARGET1; }; -PS_OUT_BACKBUFFER PS_MAIN_BLOOM_ACCUM(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; float3 vColorSrcB = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; - Out.vBackBuffer = float4(saturate(vColorSrcA + vColorSrcB), 1.f); + Out.vSingleTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f); return Out; } -PS_OUT_BACKBUFFER PS_MAIN_BLOOM_FINISH(PS_IN In) +PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In) { - PS_OUT_BACKBUFFER Out; + PS_OUT_FLT4_SINGLE Out; vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); float3 vBloom = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; - Out.vBackBuffer = vColor; - Out.vBackBuffer += float4(vBloom, 1.f); + Out.vSingleTarget = vColor; + Out.vSingleTarget += float4(vBloom, 1.f); return Out; } diff --git a/Jusin154_Team3D/Engine/Private/Picking.cpp b/Jusin154_Team3D/Engine/Private/Picking.cpp index 21dd71c4e..da93f6632 100644 --- a/Jusin154_Team3D/Engine/Private/Picking.cpp +++ b/Jusin154_Team3D/Engine/Private/Picking.cpp @@ -30,15 +30,13 @@ HRESULT CPicking::Initialize(HWND hWnd, _uint iSizeX, _uint iSizeY) TextureDesc.Usage = D3D11_USAGE_STAGING; TextureDesc.BindFlags = 0; - TextureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; + TextureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; TextureDesc.MiscFlags = 0; if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &m_pTexture2D))){ return E_FAIL; } - m_iNumPixels = iSizeX * iSizeY; - m_pPixels = new _float4[m_iNumPixels]; m_iNumPixelW = iSizeX; m_iNumPixelH = iSizeY; @@ -48,46 +46,48 @@ HRESULT CPicking::Initialize(HWND hWnd, _uint iSizeX, _uint iSizeY) void CPicking::Update() { m_pGameInstance->Copy_RenderTarget(TEXT("Target_Depth"), m_pTexture2D); - - D3D11_MAPPED_SUBRESOURCE SubResource{}; - if (FAILED(m_pContext->Map(m_pTexture2D, 0, D3D11_MAP_READ_WRITE, 0, &SubResource))){ - return; - } - - memcpy(m_pPixels, SubResource.pData, sizeof(_float4) * m_iNumPixels); - - m_pContext->Unmap(m_pTexture2D, 0); } - _bool CPicking::isPicking(_float3* pOut) { - POINT ptMouse{}; - + POINT ptMouse{}; GetCursorPos(&ptMouse); ScreenToClient(m_hWnd, &ptMouse); - _uint iMouseIndex = ptMouse.y * m_iNumPixelW + ptMouse.x; - - if (iMouseIndex > m_iNumPixelW * m_iNumPixelH) + if (ptMouse.x < 0 || ptMouse.x >= (LONG)m_iNumPixelW || ptMouse.y < 0 || ptMouse.y >= (LONG)m_iNumPixelH){ return false; + } - if (0.f == m_pPixels[iMouseIndex].w) + D3D11_MAPPED_SUBRESOURCE SubResource{}; + if (FAILED(m_pContext->Map(m_pTexture2D, 0, D3D11_MAP_READ, 0, &SubResource))) { return false; - - _float3 vMousePos = _float3(0.f, 0.f, 0.f); + } + BYTE* pRowStart = static_cast(SubResource.pData) + ptMouse.y * SubResource.RowPitch; + _float4* pPixelRow = reinterpret_cast<_float4*>(pRowStart); + _float4 Pixel = pPixelRow[ptMouse.x]; + + m_pContext->Unmap(m_pTexture2D, 0); + + if (0.f == Pixel.w){ + return false; + } + + _float3 vMousePos{}; vMousePos.x = ptMouse.x / (m_iNumPixelW * 0.5f) - 1.f; vMousePos.y = ptMouse.y / (m_iNumPixelH * -0.5f) + 1.f; - vMousePos.z = m_pPixels[iMouseIndex].x; + vMousePos.z = Pixel.x; - XMStoreFloat3(&vMousePos, XMVector3TransformCoord(XMLoadFloat3(&vMousePos), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ_INV))); - XMStoreFloat3(&vMousePos, XMVector3TransformCoord(XMLoadFloat3(&vMousePos), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW_INV))); + XMStoreFloat3(&vMousePos, XMVector3TransformCoord(XMLoadFloat3(&vMousePos), + m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ_INV))); + + XMStoreFloat3(&vMousePos, XMVector3TransformCoord(XMLoadFloat3(&vMousePos), + m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW_INV))); *pOut = vMousePos; - return true; } + CPicking* CPicking::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, HWND hWnd, _uint iSizeX, _uint iSizeY) { CPicking* pInstance = new CPicking(pDevice, pContext); @@ -109,5 +109,4 @@ void CPicking::Free() SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pTexture2D); SAFE_RELEASE(m_pGameInstance); - Safe_Delete_Array(m_pPixels); } diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 248b40f18..20253e755 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -415,13 +415,18 @@ void CRenderer::Render_Bloom() m_bPostProcessing_BLOOM = !m_bPostProcessing_BLOOM; } if(true == m_bPostProcessing_BLOOM) { - { // BackBuffer - ID3D11Texture2D* pBackBuffer = nullptr; - m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); - //m_pGameInstance->Copy_RenderTarget(TEXT("Target_Diffuse"), pBackBuffer); - m_pGameInstance->Paste_RenderTarget(TEXT("Target_Bloom_Input"), pBackBuffer); - SAFE_RELEASE(pBackBuffer); - } + GUI::Begin("PostProcessing_Bloom"); + GUI::PushItemWidth(80); + GUI::DragFloat("g_fThreshold", &m_fThreshold, 0.01f, 0.02f, 100.f, "%.3f"); + GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); + GUI::End(); + //{ // BackBuffer + // ID3D11Texture2D* pBackBuffer = nullptr; + // m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); + // //m_pGameInstance->Copy_RenderTarget(TEXT("Target_Diffuse"), pBackBuffer); + // m_pGameInstance->Paste_RenderTarget(TEXT("Target_Bloom_Input"), pBackBuffer); + // SAFE_RELEASE(pBackBuffer); + //} // "Target_Bloom_Input" // "Target_Bloom" @@ -432,6 +437,9 @@ void CRenderer::Render_Bloom() // "Target_Bloom_8x8_2" // "Target_Bloom_4x4_2" + m_pShader->Bind_RawValue("g_fThreshold", &m_fThreshold, sizeof(_float)); + m_pShader->Bind_RawValue("g_iBloomEmbossingPass", &m_iBloomEmbossingPass, sizeof(_int)); + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_Input"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::EMBOSSING); // 2 m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::REFIT); // 3 m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_16x16"), SHADER_PASS_DEFERRED::REFIT); // 4 diff --git a/Jusin154_Team3D/Engine/Public/Picking.h b/Jusin154_Team3D/Engine/Public/Picking.h index a41197db0..5ef8825c9 100644 --- a/Jusin154_Team3D/Engine/Public/Picking.h +++ b/Jusin154_Team3D/Engine/Public/Picking.h @@ -22,11 +22,9 @@ class CPicking final : public CBase ID3D11Texture2D* m_pTexture2D = { nullptr }; class CGameInstance* m_pGameInstance = { nullptr }; - _uint m_iNumPixels = {}; _uint m_iNumPixelW = {}; _uint m_iNumPixelH = {}; - _float4* m_pPixels = { nullptr }; public: static CPicking* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, HWND hWnd, _uint iSizeX, _uint iSizeY); diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index 83aa33cfe..5bc3f3814 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -45,7 +45,8 @@ class CRenderer final : public CBase _float4x4 m_PreShadowMatrices[ENUM_CLASS(D3DTS::END)] = {}; _bool m_bPostProcessing_BLOOM = { false }; - + _int m_iBloomEmbossingPass = { 0 }; + _float m_fThreshold = { 1.26f }; private: void Render_Priority(); From ba187e4199a602dc21c32854d795b613624422d4 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 00:27:41 +0900 Subject: [PATCH 05/10] [fix] picking exception --- Jusin154_Team3D/Engine/Private/GameInstance.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 07f79843a..eba74dd9a 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -109,20 +109,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta) m_pMouse_Manager->Update(); //m_pSound_Manager->Update(); -#ifdef _DEBUG - - -#ifdef 기무리 - static _bool bPicking = false; - GUI::Checkbox("Picking Enable", &bPicking); - if (bPicking) { - m_pPicking->Update(); - } -#endif // 기무리 -#endif // _DEBUG -#ifndef 기무리 m_pPicking->Update(); -#endif // !기무리 m_pObject_Manager->Priority_Update(fTimeDelta); From 098593b2b639a1e62eb61dc3003eeada6cedd831 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 10:33:32 +0900 Subject: [PATCH 06/10] [add] fix --- .../ShaderFiles/Shader_UIEditor.hlsl | 346 +++++++++++++++--- .../Client/Private/EffectObject.cpp | 2 +- Jusin154_Team3D/Client/Public/Client_Enum.h | 2 +- .../ShaderFiles/Shader_Deferred.hlsl | 4 +- .../Editor/Private/EffectObject.cpp | 2 +- Jusin154_Team3D/Editor/Public/Editor_Define.h | 2 +- .../ShaderFiles/Shader_Deferred.hlsl | 4 +- .../Engine/Default/Engine.vcxproj.filters | 48 +-- Jusin154_Team3D/Engine/Private/Renderer.cpp | 27 +- Jusin154_Team3D/Engine/Public/Engine_Enum.h | 2 +- Jusin154_Team3D/Engine/Public/GameObject.h | 1 + 11 files changed, 361 insertions(+), 79 deletions(-) diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 067d90c1d..cd43fbd4d 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -13,6 +13,7 @@ uint g_iSpellType; float g_fPI; float g_fFar; +float g_fBlinkTime; float g_fTime; float g_fTimeMult; float g_fFrame; @@ -28,12 +29,20 @@ float g_fHp; float2 g_fOrigin_Size; float2 g_fCurrent_Size; float2 g_fHpBG; +float2 g_Pos; +float2 g_fImageSize; float4 g_fNine_Slice; float4 g_fImageUV; float4 g_fImageUV1; +uint g_iArrayCount; +float2 g_fItemPosition1; +float2 g_fItemImageSizes1; +float2 g_fItemPosition2; +float2 g_fItemImageSizes2; float2 g_fPosition[4]; +float2 g_fImageSizes[4]; float4 g_fImagesUV[4]; Texture2D g_Texture; @@ -41,6 +50,7 @@ Texture2D g_Texture1; Texture2D g_Texture2; Texture2D g_Texture3; Texture2D g_Texture4; +Texture2D g_Texture5; Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; @@ -251,6 +261,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In) if (Color.r <= 0.4f) discard; + Color.a *= Alpha; Out.vColor = Color; @@ -416,8 +427,30 @@ PS_OUT PS_SpellAnim(PS_IN In) float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 color = float4(1.f, 1.f, 1.f, 1.f); - + float4 color = float4(0.f, 0.f, 0.f, 0.f); + + float2 center = float2(0.5f, 0.5f); + float2 uv = In.vTexcoord - center; + uv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); + Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); + Rotation += center; + + float2 startUV = g_fImageUV.xy; + float2 endUV = g_fImageUV.zw; + + float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture2.Sample(DefaultSampler, atlasUV); + + tex1.rgb *= 0.4f; + color = tex1; + tex2.rgb *= 0.3f; + + if (tex2.a >= 0.9f) + color = tex2; float3 BGColor = float3(1.f, 1.f, 1.f); switch (g_iSpellType) @@ -444,39 +477,42 @@ PS_OUT PS_SpellAnim(PS_IN In) BGColor = float3(0.f, 0.f, 0.f); break; } + float4 color1 = float4(1.f, 1.f, 1.f, 1.f); - float2 uv = In.vTexcoord; + float2 OverrayUV = In.vTexcoord; float CoolTime = 1.f - g_fDeltaV; float CoolTime2 = 1.f - g_fDeltaV + 0.05; + atlasUV = startUV + In.vTexcoord * (endUV - startUV); + float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV); + tex3.rgb *= BGColor; + float4 tex4 = g_Texture2.Sample(DefaultSampler, atlasUV); - float4 tex1 = g_Texture.Sample(ClampSampler, uv); - tex1.rgb *= BGColor; - float4 tex2 = g_Texture1.Sample(DefaultSampler, uv); + if (tex4.a >= 0.9f) + tex3 = tex4; - if (tex2.a >= 0.9f) - tex1 = tex2; - - color = tex1; + color1 = tex3; - float wave1 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f; - float wave2 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f; + float wave1 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; + float wave2 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; float waveThreshold1 = CoolTime + wave1; float waveThreshold2 = CoolTime2 + wave2; if (g_fDeltaV <= 1.f) { - if (uv.y >= waveThreshold1 && uv.y <= waveThreshold2) + if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2) { - color.rgb = float3(1.f, 1.f, 1.f); + color1.rgb = float3(1.f, 1.f, 1.f); } } - if (uv.y <= CoolTime) + if (OverrayUV.y <= CoolTime) { - color.a = 0.f; + color1.a = 0.f; } + color = lerp(color, color1, color1.a); + color.a *= Alpha; Out.vColor = color; @@ -488,6 +524,7 @@ PS_OUT PS_HpBar(PS_IN In) PS_OUT Out; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; float2 CurrentPixelPosition = uv * g_fCurrent_Size; float OriginLeft = g_fNine_Slice.x; @@ -533,24 +570,46 @@ PS_OUT PS_HpBar(PS_IN In) } float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv); + tex1.rgb = float3(255.f, 0.f, 0.f) / 255.f; + if (g_fHp <= 0.3f) + { + tex1.a *= (sin(g_fBlinkTime) * 0.25f + 0.75f) * 1.5f; + } + else + { + tex1.a = 0.f; + } Color = tex1; + + float2 BGPos = g_Pos; + float2 BGSize = g_fImageSize; + float2 BGPixel = Finaluv * g_fOrigin_Size; + float2 localUV = (BGPixel - BGPos) / BGSize; + bool inside = all(localUV >= 0.0f && localUV <= 1.0f); + + float4 tex2 = g_Texture1.Sample(ClampSampler, localUV); + + if (inside) + Color = lerp(Color, tex2, tex2.a); + float2 reversuv = In.vTexcoord; - reversuv.x = 1.0f - Finaluv; + reversuv.x = 1.0f - localUV.x; - float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv); + float4 tex3 = g_Texture2.Sample(ClampSampler, localUV); if (reversuv.x >= g_fHp) { - tex2.rgb = float3(0.f, 0.f, 0.f); + tex3.rgb = float3(0.f, 0.f, 0.f); } - float3 Green = float3(112.f, 241.f, 31.f) / 255.f; - Green *= 1.2f; - tex2.rgb *= Green; + float3 Green = (float3(112.f, 241.f, 31.f) / 255.f) * 1.2f; + float3 Red = (float3(255.f, 0.f, 0.f) / 255.f) * 1.2f; - if (all(Color.rgb >= float3(70.f / 255.f, 70.f / 255.f, 70.f / 255.f))) - Color = tex2; + tex3.rgb *= lerp(Green, Red, g_fTime); + + if (all(Color.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) + Color = lerp(Color, tex3, tex3.a); Color.a *= Alpha; Out.vColor = Color; @@ -595,18 +654,28 @@ PS_OUT PS_Magic_Icon(PS_IN In) float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float2 center = float2(0.5f, 0.5f); + float2 BGuv = In.vTexcoord - center; + BGuv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = BGuv.x * cos(g_fAngle) - BGuv.y * sin(g_fAngle); + Rotation.y = BGuv.x * sin(g_fAngle) + BGuv.y * cos(g_fAngle); + Rotation += center; + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation); + + Color = tex1; + Color = lerp(tex1, tex2, tex2.a); + float2 uv = In.vTexcoord; - float2 center = float2(0.5, 0.5); float scale = 1.2; uv = (uv - center) * scale + center; - float4 tex2 = g_Texture1.Sample(ClampSampler, uv); + float4 tex3 = g_Texture2.Sample(ClampSampler, uv); - Color = tex1; - - Color = tex1 * (1 - tex2.a) + tex2; + Color = Color * (1 - tex3.a) + tex3; Color.a *= Alpha; Out.vColor = Color; @@ -645,30 +714,30 @@ PS_OUT PS_Revelio(PS_IN In) float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 UV = In.vTexcoord; - float2 Position[4]; - float2 startUV[4]; - float2 endUV[4]; + //float2 Position[4]; + //float2 startUV[4]; + //float2 endUV[4]; - float2 Atlases[4]; + //float2 Atlases[4]; - for (int i = 0; i < 4; ++i) - { - Position[i] = g_fPosition[i]; - startUV[i] = g_fImagesUV[i].xy; - endUV[i] = g_fImagesUV[i].zw; + //for (int i = 0; i < 4; ++i) + //{ + // Position[i] = g_fPosition[i]; + // startUV[i] = g_fImagesUV[i].xy; + // endUV[i] = g_fImagesUV[i].zw; - Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]); - } + // Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]); + //} - float4 tex1 = g_Texture.Sample(DefaultSampler, UV); - float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]); - float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]); - float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]); - float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]); + //float4 tex1 = g_Texture.Sample(DefaultSampler, UV); + //float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]); + //float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]); + //float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]); + //float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]); - //float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); + ////float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); Color.a *= Alpha; Out.vColor = Color; @@ -676,6 +745,169 @@ PS_OUT PS_Revelio(PS_IN In) return Out; } +PS_OUT PS_Potion(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f); + + float2 center = float2(0.5f, 0.5f); + float2 uv = In.vTexcoord - center; + uv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); + Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); + Rotation += center; + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + Color = tex1; + + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + //Color += tex2; + float4 tex3 = g_Texture2.Sample(ClampSampler, Rotation); + Color = lerp(Color, tex3, tex3.a); + + float2 Potionuv = In.vTexcoord; + float scale = 1.2; + + Potionuv = (Potionuv - center) * scale + center; + float4 tex4 = g_Texture3.Sample(ClampSampler, Potionuv); + Color = lerp(Color, tex4, tex4.a); + + float2 tex5pos = g_Pos / g_fCurrent_Size; + float2 tex5size = g_fOrigin_Size / g_fCurrent_Size; + float2 tex5local = (In.vTexcoord - tex5pos) / tex5size; + bool inside = all(tex5local >= 0.0f && tex5local <= 1.0f); + float4 tex5 = g_Texture4.Sample(ClampSampler, tex5local); + if (inside) + Color = lerp(Color, tex5, tex5.a); + + Color.a *= Alpha; + Out.vColor = Color; + + return Out; +} + +PS_OUT PS_Magic_Item(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 color = float4(1.f, 1.f, 1.f, 1.f); + + float2 center = float2(0.5f, 0.5f); + float2 uv = In.vTexcoord - center; + uv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); + Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); + Rotation += center; + + float2 startUV = g_fImageUV.xy; + float2 endUV = g_fImageUV.zw; + + float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture3.Sample(ClampSampler, atlasUV); + + tex1.rgb *= 0.4f; + color = tex1; + tex2.rgb *= 0.3f; + + if (tex2.a >= 0.9f) + color = tex2; + float3 BGColor = float3(1.f, 1.f, 1.f); + + switch (g_iSpellType) + { + case 0: + BGColor = float3(50.f, 50.f, 50.f) / 255.f; + break; + case 1: + BGColor = float3(89.f, 32.f, 215.f) / 255.f; + break; + case 2: + BGColor = float3(190.f, 46., 34.f) / 255.f; + break; + case 3: + BGColor = float3(37.f, 129.f, 162.f) / 255.f; + break; + case 4: + BGColor = float3(134.f, 171.f, 78.f) / 255.f; + break; + } + + float4 color1 = float4(1.f, 1.f, 1.f, 1.f); + + float2 OverrayUV = In.vTexcoord; + float CoolTime = 0.f + g_fDeltaV; + float CoolTime2 = 0.f + g_fDeltaV + 0.05; + atlasUV = startUV + In.vTexcoord * (endUV - startUV); + float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV); + tex3.rgb *= BGColor; + float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV); + + if (g_fDeltaV <= 1.f) + { + if (tex4.a >= 0.9f) + tex3 = tex4; + + color1 = tex3; + + float wave1 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; + float wave2 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; + + float waveThreshold1 = CoolTime + wave1; + float waveThreshold2 = CoolTime2 + wave2; + + if (g_fDeltaV <= 1.f) + { + if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2) + { + color1.rgb = float3(1.f, 1.f, 1.f); + } + } + + if (OverrayUV.y <= CoolTime) + { + color1.a = 0.f; + } + + color = lerp(color, color1, color1.a); + } + else if (g_fDeltaV >= 1.f) + color = lerp(color, tex4, tex4.a); + + float4 tex5 = g_Texture2.Sample(ClampSampler, Rotation); + color = lerp(color, tex5, tex5.a); + + float2 texpos1 = g_fItemPosition1 / g_fCurrent_Size; + float2 texpos2 = g_fItemPosition2 / g_fCurrent_Size; + float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size; + float2 texsize2 = g_fItemImageSizes2 / g_fCurrent_Size; + float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1; + float2 texlocal2 = (In.vTexcoord - texpos2) / texsize2; + + + bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f); + float4 tex6 = g_Texture4.Sample(DefaultSampler, texlocal1); + + if (inside1) + color = lerp(color, tex6, tex6.a); + + bool inside2 = all(texlocal2 >= 0.0f && texlocal2 <= 1.0f); + + float4 tex7 = g_Texture5.Sample(DefaultSampler, texlocal2); + if (inside2) + color = lerp(color, tex7, tex7.a); + + color.a *= Alpha; + + Out.vColor = color; + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -856,4 +1088,24 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Revelio(); } + pass Potion + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Potion(); + } + + pass Magic_Item + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Magic_Item(); + } + } diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index 204608121..c46bf2ebb 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -84,7 +84,7 @@ HRESULT CEffectObject::Render_Blur() if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD) { - BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_WORLD; + BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; } else { diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 63f562157..99f111ed4 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -13,7 +13,7 @@ namespace Client enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, END }; - enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, BLUR_NO_WORLD, END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index a2a3848b7..8cbe259c7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -455,7 +455,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; float3 vColor = vInput.rgb; - uint iMask = (uint) round(vInput.a * 255.f); + uint iMask = (uint) round(vInput.a * 255.f); // int a = 1 // vBloom.a = (enum / 255); switch (iMask) { @@ -470,6 +470,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) /* Multiply */ vColor *= 3; break; + case 3: + break; } float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f)); // 대략적인 밝기 ( 인간적인 ) diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 403d6720b..1a57a01fe 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -77,7 +77,7 @@ HRESULT CEffectObject::Render_Blur() if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD) { - BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_WORLD; + BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; } else { diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 09936371a..d7a83e80b 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -24,7 +24,7 @@ namespace Editor enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR ,END }; - enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END }; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index a2a3848b7..8cbe259c7 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -455,7 +455,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; float3 vColor = vInput.rgb; - uint iMask = (uint) round(vInput.a * 255.f); + uint iMask = (uint) round(vInput.a * 255.f); // int a = 1 // vBloom.a = (enum / 255); switch (iMask) { @@ -470,6 +470,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) /* Multiply */ vColor *= 3; break; + case 3: + break; } float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f)); // 대략적인 밝기 ( 인간적인 ) diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index ffed8f443..495a08229 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -169,24 +169,6 @@ {0e35cd1b-88f6-46b9-b72e-b46eeaacd4e0} - - {32ca0c26-d3e2-49c5-8dc6-cc67e5291214} - - - {17dcadfe-e4cd-46c6-8122-e5e02bb73e57} - - - {c3e7b75b-ec8b-4071-8b52-e5c356febfa6} - - - {57dd171f-f788-4918-aae2-85c20794b3cb} - - - {40758cb1-0f91-4db9-bad7-7c77eb8002da} - - - {bbf3ec67-56f5-4e67-b6cf-8eb1eb4400ff} - {30c382b4-2ac9-4355-b3a5-c1b3622c2982} @@ -202,9 +184,6 @@ {be0d499e-e4cf-4dde-92a0-a0904e713045} - - {d93660eb-4bf9-43d2-902e-8ecbefd02481} - {41e9427d-6e3b-4424-b2d0-0496a0a875af} @@ -217,9 +196,6 @@ {96600587-16b1-4627-914d-7fc413c501ba} - - {5948985e-f67e-4627-aca4-09b8e9edc359} - {5e6a85cd-455a-4161-83c8-ba5f4ce2ba41} @@ -289,6 +265,30 @@ {d76a5d4a-1627-448d-9631-239540dd8eb2} + + {32ca0c26-d3e2-49c5-8dc6-cc67e5291214} + + + {17dcadfe-e4cd-46c6-8122-e5e02bb73e57} + + + {c3e7b75b-ec8b-4071-8b52-e5c356febfa6} + + + {57dd171f-f788-4918-aae2-85c20794b3cb} + + + {40758cb1-0f91-4db9-bad7-7c77eb8002da} + + + {bbf3ec67-56f5-4e67-b6cf-8eb1eb4400ff} + + + {d93660eb-4bf9-43d2-902e-8ecbefd02481} + + + {5948985e-f67e-4627-aca4-09b8e9edc359} + diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 20253e755..e939a0f9a 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -420,7 +420,8 @@ void CRenderer::Render_Bloom() GUI::DragFloat("g_fThreshold", &m_fThreshold, 0.01f, 0.02f, 100.f, "%.3f"); GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); GUI::End(); - //{ // BackBuffer + + //{ // BackBuffer // ID3D11Texture2D* pBackBuffer = nullptr; // m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); // //m_pGameInstance->Copy_RenderTarget(TEXT("Target_Diffuse"), pBackBuffer); @@ -437,6 +438,26 @@ void CRenderer::Render_Bloom() // "Target_Bloom_8x8_2" // "Target_Bloom_4x4_2" + if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Bloom")))) { + return; + } + + for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::BLOOM)]) + { + if (nullptr != pRenderObject) + if (FAILED(pRenderObject->Render_Bloom())) { + assert(false); + } + + SAFE_RELEASE(pRenderObject); + } + + m_RenderObjects[ENUM_CLASS(RENDER::BLOOM)].clear(); + + if (FAILED(m_pGameInstance->End_MRT())) { + return; + } + m_pShader->Bind_RawValue("g_fThreshold", &m_fThreshold, sizeof(_float)); m_pShader->Bind_RawValue("g_iBloomEmbossingPass", &m_iBloomEmbossingPass, sizeof(_int)); @@ -756,6 +777,10 @@ HRESULT CRenderer::Initialize() if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) { return E_FAIL; } + /* MRT_Blur */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Bloom"), TEXT("Target_Bloom_Input")))) { + return E_FAIL; + } /* MRT_Blur_X */ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) { diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index a2f0c036c..549785c98 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -5,7 +5,7 @@ NS_BEGIN(Engine) enum class STATE { RIGHT, UP, LOOK, POSITION, END }; enum class LIGHT { DIRECTIONAL, POINT, SPOT, END }; enum class COLLIDER { AABB, OBB, SPHERE, END }; -enum class RENDER { PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, UI, END }; +enum class RENDER { PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, UI, END }; enum class RAY { LOCAL, WORLD, END }; enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END }; diff --git a/Jusin154_Team3D/Engine/Public/GameObject.h b/Jusin154_Team3D/Engine/Public/GameObject.h index 7cb2635fe..e97b994af 100644 --- a/Jusin154_Team3D/Engine/Public/GameObject.h +++ b/Jusin154_Team3D/Engine/Public/GameObject.h @@ -22,6 +22,7 @@ class ENGINE_DLL CGameObject abstract virtual HRESULT Render(); virtual HRESULT Render_Shadow() { return S_OK; } virtual HRESULT Render_Blur() { return S_OK; } + virtual HRESULT Render_Bloom() { return S_OK; } virtual _float Get_Depth(); // z 소팅 할 때 쓰시면 됨 From e560e4b80e276adaa269b85236c0812c05572a9b Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 11:59:11 +0900 Subject: [PATCH 07/10] =?UTF-8?q?[add]=20=EB=AA=AC=EC=8A=A4=ED=84=B0=20?= =?UTF-8?q?=EC=9D=B8=ED=8F=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/InfoInstance.cpp | 7 + Jusin154_Team3D/Client/Private/MapInfo.cpp | 4 + Jusin154_Team3D/Client/Private/Monster.cpp | 3 +- .../Client/Private/MonsterInfo.cpp | 121 ++++++++++++++++++ Jusin154_Team3D/Client/Private/PlayerInfo.cpp | 4 + Jusin154_Team3D/Client/Private/Terrain.cpp | 3 +- Jusin154_Team3D/Client/Public/InfoInstance.h | 1 + Jusin154_Team3D/Client/Public/MapInfo.h | 1 + Jusin154_Team3D/Client/Public/MonsterInfo.h | 17 +++ Jusin154_Team3D/Client/Public/PlayerInfo.h | 6 + Jusin154_Team3D/Editor/Private/Wand.cpp | 2 +- Jusin154_Team3D/Engine/Public/Picking.h | 1 - 12 files changed, 166 insertions(+), 4 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 97e98fb42..f703114ee 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -17,6 +17,13 @@ void CInfoInstance::Update(_float fTimeDelta) } +void CInfoInstance::Change_Level() +{ + m_pPlayerInfo->Change_Level(); + m_pMonsterInfo->Change_Level(); + m_pMapInfo->Change_Level(); +} + HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath) { return m_pMapInfo->Load_MapObjects(pFilePath); diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp index b556b49f6..ca6e5880e 100644 --- a/Jusin154_Team3D/Client/Private/MapInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp @@ -15,6 +15,10 @@ void CMapInfo::Update(_float fTimeDelta) { } +void CMapInfo::Change_Level() +{ +} + HRESULT CMapInfo::Load_MapObjects(const _char* pFileName) { tinyxml2::XMLDocument xmlDoc; diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index 2600aecab..33aa00c2d 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -21,8 +21,9 @@ HRESULT CMonster::Initialize_Prototype() HRESULT CMonster::Initialize(void* pArg) { - if (FAILED(__super::Initialize(pArg))) + if (FAILED(__super::Initialize(pArg))){ return E_FAIL; + } m_pPlayerTransform = static_cast(pArg)->Get_Component(); SAFE_ADDREF(m_pPlayerTransform); diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp index 27d673a78..c45993331 100644 --- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp @@ -2,6 +2,7 @@ #include "MonsterInfo.h" #include "GameInstance.h" #include "InfoInstance.h" +#include "Monster.h" CMonsterInfo::CMonsterInfo() { @@ -9,6 +10,95 @@ CMonsterInfo::CMonsterInfo() void CMonsterInfo::Update(_float fTimeDelta) { + Refresh_PlayerAllies(); + Refresh_LockOnMonsters(); +} + +void CMonsterInfo::Change_Level() +{ + SAFE_RELEASE(m_pLockOnMonster); + for (CMonster* pMonster : m_ActiveMonsters) { + SAFE_RELEASE(pMonster); + } m_ActiveMonsters.clear(); + for (CUnit* pPlayerAlly : m_PlayerAllies) { + SAFE_RELEASE(pPlayerAlly); + } m_PlayerAllies.clear(); +} + +HRESULT CMonsterInfo::Regist_PlayerAlly(CUnit* pUnit) +{ + for (CUnit* pAlly : m_PlayerAllies) { + if (pAlly == pUnit) { + return E_ACCESSDENIED; + } + } m_PlayerAllies.push_back(pUnit); + SAFE_ADDREF(pUnit); + return S_OK; +} + +HRESULT CMonsterInfo::Deregist_PlayerAlly(CUnit* pUnit) +{ + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) { + if (*iter == pUnit) { + SAFE_RELEASE(*iter); + m_PlayerAllies.erase(iter); + break; + } + } + return E_FAIL; +} + +HRESULT CMonsterInfo::Regist_ActiveMonster(CMonster* pUnit) +{ + for (CMonster* pMonster : m_ActiveMonsters) { + if (pMonster == pUnit) { + return E_ACCESSDENIED; + } + } m_ActiveMonsters.push_back(pUnit); + SAFE_ADDREF(pUnit); + return S_OK; +} + +HRESULT CMonsterInfo::Deregist_ActiveMonster(CMonster* pUnit) +{ + for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end();) { + if (*iter == pUnit) { + SAFE_RELEASE(*iter); + m_ActiveMonsters.erase(iter); + break; + } + } + return E_FAIL; +} + +CMonster* CMonsterInfo::Get_LockOnMonster() +{ + return m_pLockOnMonster; +} + +pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) +{ + _float fLength = FLT_MAX; + CTransform* pNearestTransform = { nullptr }; + CUnit* pNearestPlayer = { nullptr }; + + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end(); ++iter) { + + CTransform* pTransform = (*iter)->Get_Component(); + _float fNewLength = XMVectorGetX(XMVector3LengthSq(pTransform->Get_State(STATE::POSITION) - vPos)); + + if (nullptr == pNearestPlayer) { + pNearestPlayer = (*iter); + fLength = fNewLength; + continue; + } + + if (fNewLength < fLength) { + pNearestPlayer = (*iter); + fLength = fNewLength; + } + } + return { pNearestPlayer, pNearestTransform }; } HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) @@ -23,7 +113,30 @@ HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCo SAFE_ADDREF(m_pDevice); SAFE_ADDREF(m_pContext); + return S_OK; +} +HRESULT CMonsterInfo::Refresh_LockOnMonsters() +{ + SAFE_RELEASE(m_pLockOnMonster); + { // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기 + + } + + return S_OK; +} + +HRESULT CMonsterInfo::Refresh_PlayerAllies() +{ + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) { + if (true == (*iter)->isDead()) { + SAFE_RELEASE(*iter); + iter = m_PlayerAllies.erase(iter); + } + else { + iter++; + } + } return S_OK; } @@ -42,6 +155,14 @@ void CMonsterInfo::Free() { __super::Free(); + SAFE_RELEASE(m_pLockOnMonster); + for (CMonster* pMonster : m_ActiveMonsters) { + SAFE_RELEASE(pMonster); + } m_ActiveMonsters.clear(); + for (CUnit* pAlly : m_PlayerAllies) { + SAFE_RELEASE(pAlly); + } m_PlayerAllies.clear(); + SAFE_RELEASE(m_pGameInstance); SAFE_RELEASE(m_pInfoInstance); SAFE_RELEASE(m_pDevice); diff --git a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp index d355667a6..a923b62a7 100644 --- a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp @@ -11,6 +11,10 @@ void CPlayerInfo::Update(_float fTimeDelta) { } +void CPlayerInfo::Change_Level() +{ +} + HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) { m_pGameInstance = CGameInstance::GetInstance(); diff --git a/Jusin154_Team3D/Client/Private/Terrain.cpp b/Jusin154_Team3D/Client/Private/Terrain.cpp index 019ea5f7d..d6c9f79a4 100644 --- a/Jusin154_Team3D/Client/Private/Terrain.cpp +++ b/Jusin154_Team3D/Client/Private/Terrain.cpp @@ -166,8 +166,9 @@ HRESULT CTerrain::Bind_ShaderResources() return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float)))){ return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 3ac241636..27540e938 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -21,6 +21,7 @@ class CInfoInstance final : public CBase LEVEL Get_RestartLevel(); public: void Update(_float fTimeDelta); + void Change_Level(); #pragma region MAP_INFO diff --git a/Jusin154_Team3D/Client/Public/MapInfo.h b/Jusin154_Team3D/Client/Public/MapInfo.h index b75b500ec..0a3e4c98b 100644 --- a/Jusin154_Team3D/Client/Public/MapInfo.h +++ b/Jusin154_Team3D/Client/Public/MapInfo.h @@ -16,6 +16,7 @@ class CMapInfo final : public CBase ~CMapInfo() = default; public: void Update(_float fTimeDelta); + void Change_Level(); HRESULT Load_MapObjects(const _char* pFilePath); diff --git a/Jusin154_Team3D/Client/Public/MonsterInfo.h b/Jusin154_Team3D/Client/Public/MonsterInfo.h index 66828a8de..3761b3e70 100644 --- a/Jusin154_Team3D/Client/Public/MonsterInfo.h +++ b/Jusin154_Team3D/Client/Public/MonsterInfo.h @@ -5,6 +5,8 @@ NS_BEGIN(Engine) class CGameInstance; +class CUnit; +class CTransform; NS_END NS_BEGIN(Client) @@ -16,6 +18,15 @@ class CMonsterInfo final : public CBase ~CMonsterInfo() = default; public: void Update(_float fTimeDelta); + void Change_Level(); + + HRESULT Regist_PlayerAlly(CUnit* pUnit); + HRESULT Deregist_PlayerAlly(CUnit* pUnit); + HRESULT Regist_ActiveMonster(class CMonster* pUnit); + HRESULT Deregist_ActiveMonster(class CMonster* pUnit); + + class CMonster* Get_LockOnMonster(); + pair Get_NearestPlayerAlly(_fvector vPos); private: CGameInstance* m_pGameInstance = { nullptr }; @@ -23,8 +34,14 @@ class CMonsterInfo final : public CBase ID3D11Device* m_pDevice = { nullptr }; ID3D11DeviceContext* m_pContext = { nullptr }; + class CMonster* m_pLockOnMonster = { nullptr }; + list m_ActiveMonsters = {}; + list m_PlayerAllies = {}; private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + HRESULT Refresh_LockOnMonsters(); + HRESULT Refresh_PlayerAllies(); + public: static CMonsterInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); diff --git a/Jusin154_Team3D/Client/Public/PlayerInfo.h b/Jusin154_Team3D/Client/Public/PlayerInfo.h index 84027298e..01ebcd01b 100644 --- a/Jusin154_Team3D/Client/Public/PlayerInfo.h +++ b/Jusin154_Team3D/Client/Public/PlayerInfo.h @@ -5,6 +5,7 @@ NS_BEGIN(Engine) class CGameInstance; +class CTransform; NS_END NS_BEGIN(Client) @@ -16,6 +17,7 @@ class CPlayerInfo final : public CBase ~CPlayerInfo() = default; public: void Update(_float fTimeDelta); + void Change_Level(); private: CGameInstance* m_pGameInstance = { nullptr }; @@ -23,6 +25,10 @@ class CPlayerInfo final : public CBase ID3D11Device* m_pDevice = { nullptr }; ID3D11DeviceContext* m_pContext = { nullptr }; +private: + CTransform* m_pTransform = { nullptr }; + + private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); diff --git a/Jusin154_Team3D/Editor/Private/Wand.cpp b/Jusin154_Team3D/Editor/Private/Wand.cpp index 5286bb428..b2106de12 100644 --- a/Jusin154_Team3D/Editor/Private/Wand.cpp +++ b/Jusin154_Team3D/Editor/Private/Wand.cpp @@ -36,7 +36,7 @@ HRESULT CWand::Initialize(void* pArg) PartsDesc.pParentTransform = m_pTransformCom; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) { + /*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) { assert(false); return E_FAIL; } diff --git a/Jusin154_Team3D/Engine/Public/Picking.h b/Jusin154_Team3D/Engine/Public/Picking.h index 5ef8825c9..ab11f5cce 100644 --- a/Jusin154_Team3D/Engine/Public/Picking.h +++ b/Jusin154_Team3D/Engine/Public/Picking.h @@ -25,7 +25,6 @@ class CPicking final : public CBase _uint m_iNumPixelW = {}; _uint m_iNumPixelH = {}; - public: static CPicking* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, HWND hWnd, _uint iSizeX, _uint iSizeY); virtual void Free(); From a0449b8d357ce370af28df4321af0e3bed8232ef Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 13:42:25 +0900 Subject: [PATCH 08/10] [add] client MovePatch --- Jusin154_Team3D/Client/Default/Client.cpp | 28 +++++++++++++------ .../ShaderFiles/Engine_Shader_Functions.hlsli | 2 +- .../ShaderFiles/Shader_Deferred.hlsl | 2 +- .../ShaderFiles/Engine_Shader_Functions.hlsli | 2 +- .../ShaderFiles/Shader_Deferred.hlsl | 2 +- .../Engine/Private/RenderTarget_Manager.cpp | 9 ++++++ 6 files changed, 32 insertions(+), 13 deletions(-) diff --git a/Jusin154_Team3D/Client/Default/Client.cpp b/Jusin154_Team3D/Client/Default/Client.cpp index 0dfea5d85..149f8d4c1 100644 --- a/Jusin154_Team3D/Client/Default/Client.cpp +++ b/Jusin154_Team3D/Client/Default/Client.cpp @@ -25,10 +25,18 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, { #ifdef _DEBUG _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); + //_CrtSetBreakAlloc(1181); + //_CrtSetBreakAlloc(1182); + //_CrtSetBreakAlloc(1183); + //_CrtSetBreakAlloc(1184); + //_CrtSetBreakAlloc(1185); + //_CrtSetBreakAlloc(1186); + //_CrtSetBreakAlloc(1187); #endif UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); + CMainApp* pMainApp = { nullptr }; LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); @@ -41,8 +49,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, } HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_CLIENT)); - - MSG msg = {}; + + MSG msg; pMainApp = CMainApp::Create(); if (nullptr == pMainApp) @@ -106,13 +114,13 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, #endif // _DEBUG pGameInstance->Compute_TimeDelta(TEXT("Timer_60")); + #ifdef _DEBUG - pMainApp->Update(0.0166f); -#endif // _DEBUG + pMainApp->Update(1.f / 60.f); +#endif // _DEBUG #ifndef _DEBUG pMainApp->Update(pGameInstance->Get_TimeDelta(TEXT("Timer_60"))); -#endif // !_DEBUG - +#endif pMainApp->Render(); fTimeAcc = 0.f; @@ -163,7 +171,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY }; - AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, TRUE); + AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, FALSE); HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, nullptr, nullptr, hInstance, nullptr); @@ -178,18 +186,20 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) g_hWnd = hWnd; - return TRUE; + return TRUE; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam)) + if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam)) { return true; + } switch (message) { case WM_DESTROY: PostQuitMessage(0); break; + default: return DefWindowProc(hWnd, message, wParam, lParam); } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 14a4fff41..754d895eb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -165,7 +165,7 @@ PBR_LIGHT_OUT PBR_Lighting( Out.vShade = (kD / PI) * (NdotL * fAttenuation) * vLightColor; Out.vSpecular = specularBRDF * vLightColor * fAttenuation * NdotL; - + return Out; } float GetBloomCurve(float x, float fThreshold, uint iMethod) diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 8cbe259c7..f401dc228 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -150,7 +150,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) fMetallic = vMRO.r; fRoughness = vMRO.g; fOcclusion = vMRO.b; - + vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic); } else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 14a4fff41..754d895eb 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -165,7 +165,7 @@ PBR_LIGHT_OUT PBR_Lighting( Out.vShade = (kD / PI) * (NdotL * fAttenuation) * vLightColor; Out.vSpecular = specularBRDF * vLightColor * fAttenuation * NdotL; - + return Out; } float GetBloomCurve(float x, float fThreshold, uint iMethod) diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 8cbe259c7..f401dc228 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -150,7 +150,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) fMetallic = vMRO.r; fRoughness = vMRO.g; fOcclusion = vMRO.b; - + vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic); } else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp index 88ed5c0cf..5f9241e67 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp @@ -289,6 +289,11 @@ HRESULT CRenderTarget_Manager::Refit_RenderTarget(CVIBuffer_Rect* pVIBuffer, CSh NewViewport.MinDepth = 0.f; NewViewport.MaxDepth = 1.f; + _float2 vResolution = { NewViewport.Width, NewViewport.Height }; + if (FAILED(pShader->Bind_RawValue("g_vResolution", &vResolution, sizeof(_float2)))) { + assert(false); + } + pOutput->Clear(); { // Bind RTVs @@ -354,6 +359,10 @@ HRESULT CRenderTarget_Manager::Refit_RenderTarget(CVIBuffer_Rect* pVIBuffer, CSh m_pContext->OMSetRenderTargets(1, &m_pBackBufferRTV, m_pOriginalDSV); m_pContext->RSSetViewports(iNumViewPorts, &OriginalViewport); + vResolution = { OriginalViewport.Width, OriginalViewport.Height }; + if (FAILED(pShader->Bind_RawValue("g_vResolution", &vResolution, sizeof(_float2)))) { + assert(false); + } SAFE_RELEASE(m_pBackBufferRTV); SAFE_RELEASE(m_pOriginalDSV); From 17f28cdac383e6123f003e2d56c53970a24e9adc Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 14:07:39 +0900 Subject: [PATCH 09/10] [fix] Monster_LockOn --- .../Client/Private/MonsterInfo.cpp | 50 ++++++++++++------- Jusin154_Team3D/Client/Public/MonsterInfo.h | 4 +- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp index c45993331..8bc1b86e3 100644 --- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp @@ -76,10 +76,9 @@ CMonster* CMonsterInfo::Get_LockOnMonster() return m_pLockOnMonster; } -pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) +pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) { _float fLength = FLT_MAX; - CTransform* pNearestTransform = { nullptr }; CUnit* pNearestPlayer = { nullptr }; for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end(); ++iter) { @@ -98,29 +97,29 @@ pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) fLength = fNewLength; } } - return { pNearestPlayer, pNearestTransform }; -} - -HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) -{ - m_pGameInstance = CGameInstance::GetInstance(); - m_pInfoInstance = CInfoInstance::GetInstance(); - m_pDevice = pDevice; - m_pContext = pContex; - - SAFE_ADDREF(m_pGameInstance); - SAFE_ADDREF(m_pInfoInstance); - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - - return S_OK; + return { pNearestPlayer, fLength }; } HRESULT CMonsterInfo::Refresh_LockOnMonsters() { SAFE_RELEASE(m_pLockOnMonster); { // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기 + //for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) { + // CTransform* pTransform = (*iter)->Get_Component(); + // _float fNewLength = XMVectorGetX(XMVector3LengthSq(pTransform->Get_State(STATE::POSITION) - vPos)); + + // if (nullptr == pNearestPlayer) { + // pNearestPlayer = (*iter); + // fLength = fNewLength; + // continue; + // } + + // if (fNewLength < fLength) { + // pNearestPlayer = (*iter); + // fLength = fNewLength; + // } + //} } return S_OK; @@ -140,6 +139,21 @@ HRESULT CMonsterInfo::Refresh_PlayerAllies() return S_OK; } +HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + return S_OK; +} + CMonsterInfo* CMonsterInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) { CMonsterInfo* pInstance = new CMonsterInfo(); diff --git a/Jusin154_Team3D/Client/Public/MonsterInfo.h b/Jusin154_Team3D/Client/Public/MonsterInfo.h index 3761b3e70..d09933b48 100644 --- a/Jusin154_Team3D/Client/Public/MonsterInfo.h +++ b/Jusin154_Team3D/Client/Public/MonsterInfo.h @@ -26,7 +26,7 @@ class CMonsterInfo final : public CBase HRESULT Deregist_ActiveMonster(class CMonster* pUnit); class CMonster* Get_LockOnMonster(); - pair Get_NearestPlayerAlly(_fvector vPos); + pair Get_NearestPlayerAlly(_fvector vPos); private: CGameInstance* m_pGameInstance = { nullptr }; @@ -36,7 +36,7 @@ class CMonsterInfo final : public CBase class CMonster* m_pLockOnMonster = { nullptr }; list m_ActiveMonsters = {}; - list m_PlayerAllies = {}; + list m_PlayerAllies = {}; private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); HRESULT Refresh_LockOnMonsters(); From 1a6ea72d7b9d5325597760c0e5ec033e13d7dfa7 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 27 Nov 2025 15:33:55 +0900 Subject: [PATCH 10/10] =?UTF-8?q?[add]=20=EB=AA=AC=EC=8A=A4=ED=84=B0=20?= =?UTF-8?q?=EC=9D=B8=ED=8F=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Goblin.cpp | 6 +- .../Client/Private/InfoInstance.cpp | 38 ++++++++++- .../Client/Private/Level_Field.cpp | 1 + .../Client/Private/Level_GamePlay.cpp | 1 + Jusin154_Team3D/Client/Private/Level_Logo.cpp | 2 +- .../Client/Private/Level_Restart.cpp | 2 +- Jusin154_Team3D/Client/Private/Monster.cpp | 42 +++++++++--- .../Client/Private/MonsterInfo.cpp | 66 ++++++++++++------- Jusin154_Team3D/Client/Private/Player.cpp | 8 ++- Jusin154_Team3D/Client/Public/Client_Define.h | 2 +- Jusin154_Team3D/Client/Public/Goblin.h | 4 +- Jusin154_Team3D/Client/Public/InfoInstance.h | 10 +++ Jusin154_Team3D/Client/Public/Monster.h | 12 ++-- Jusin154_Team3D/Client/Public/MonsterInfo.h | 3 +- Jusin154_Team3D/Client/Public/Player.h | 1 + 15 files changed, 150 insertions(+), 48 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index 82d1ddf03..66bf65703 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -58,11 +58,13 @@ HRESULT CGoblin::Initialize(void* pArg) void CGoblin::Priority_Update(_float fTimeDelta) { - m_pTransformCom->RewindMomentum(); + __super::Priority_Update(fTimeDelta); } void CGoblin::Update(_float fTimeDelta) { + __super::Update(fTimeDelta); + m_pFSM->Update_State(fTimeDelta); m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); @@ -76,7 +78,7 @@ void CGoblin::Late_Update(_float fTimeDelta) __super::Late_Update(fTimeDelta); m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position()); - m_pTransformCom->LookAt(m_pPlayerTransform->Get_State(STATE::POSITION)); + m_pTransformCom->LookAt(XMLoadFloat4(&m_vTargetPos)); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index f703114ee..abebb92ae 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -14,7 +14,9 @@ CInfoInstance::CInfoInstance() void CInfoInstance::Update(_float fTimeDelta) { - + m_pPlayerInfo->Update(fTimeDelta); + m_pMonsterInfo->Update(fTimeDelta); + m_pMapInfo->Update(fTimeDelta); } void CInfoInstance::Change_Level() @@ -24,11 +26,43 @@ void CInfoInstance::Change_Level() m_pMapInfo->Change_Level(); } +#pragma region MONSTER_INFO +HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit) +{ + return m_pMonsterInfo->Regist_PlayerAlly(pUnit); +} + +HRESULT CInfoInstance::Deregist_PlayerAlly(CUnit* pUnit) +{ + return m_pMonsterInfo->Deregist_PlayerAlly(pUnit); +} + +HRESULT CInfoInstance::Regist_ActiveMonster(CMonster* pUnit) +{ + return m_pMonsterInfo->Regist_ActiveMonster(pUnit); +} + +HRESULT CInfoInstance::Deregist_ActiveMonster(CMonster* pUnit) +{ + return m_pMonsterInfo->Deregist_ActiveMonster(pUnit); +} + +CMonster* CInfoInstance::Get_LockOnMonster() +{ + return m_pMonsterInfo->Get_LockOnMonster(); +} + +pair CInfoInstance::Get_NearestPlayerAlly(_fvector vPos) +{ + return m_pMonsterInfo->Get_NearestPlayerAlly(vPos); +} +#pragma endregion +#pragma region MAP_INFO HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath) { return m_pMapInfo->Load_MapObjects(pFilePath); } - +#pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { return LEVEL::GAMEPLAY; diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index b13002b56..251db9428 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -48,6 +48,7 @@ void CLevel_Field::Update(_float fTimeDelta) m_pInfoInstance->Update(fTimeDelta); if (true == m_pGameInstance->Check_LevelShouldChange()) { + m_pInfoInstance->Change_Level(); if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::RESTART)))) { return; } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 80c098524..c44b37501 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -65,6 +65,7 @@ void CLevel_GamePlay::Update(_float fTimeDelta) m_pInfoInstance->Update(fTimeDelta); if (true == m_pGameInstance->Check_LevelShouldChange()) { + m_pInfoInstance->Change_Level(); if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::FIELD)))) { return; } diff --git a/Jusin154_Team3D/Client/Private/Level_Logo.cpp b/Jusin154_Team3D/Client/Private/Level_Logo.cpp index 3520a55ea..d0bd0854a 100644 --- a/Jusin154_Team3D/Client/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Logo.cpp @@ -28,7 +28,7 @@ void CLevel_Logo::Update(_float fTimeDelta) m_pGameInstance->Set_LevelToChange(); } - m_pInfoInstance->Update(fTimeDelta); + //m_pInfoInstance->Update(fTimeDelta); if (true == m_pGameInstance->Check_LevelShouldChange()) { if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::GAMEPLAY)))) { diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp index 48f96f994..ddab4e3cf 100644 --- a/Jusin154_Team3D/Client/Private/Level_Restart.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp @@ -27,7 +27,7 @@ void CLevel_Restart::Update(_float fTimeDelta) m_pGameInstance->Set_LevelToChange(); } - m_pInfoInstance->Update(fTimeDelta); + //m_pInfoInstance->Update(fTimeDelta); if (true == m_pGameInstance->Check_LevelShouldChange()) { if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) { diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index 33aa00c2d..d0e910781 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -2,6 +2,7 @@ #include "Monster.h" #include "GameInstance.h" +#include "InfoInstance.h" #include "Player.h" CMonster::CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -10,8 +11,10 @@ CMonster::CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CMonster::CMonster(const CMonster& Prototype) - : CUnit(Prototype) + : CUnit(Prototype), + m_pInfoInstance(CInfoInstance::GetInstance()) { + SAFE_ADDREF(m_pInfoInstance); } HRESULT CMonster::Initialize_Prototype() @@ -25,25 +28,33 @@ HRESULT CMonster::Initialize(void* pArg) return E_FAIL; } - m_pPlayerTransform = static_cast(pArg)->Get_Component(); - SAFE_ADDREF(m_pPlayerTransform); return S_OK; } void CMonster::Priority_Update(_float fTimeDelta) { - + m_pTransformCom->RewindMomentum(); + __super::Priority_Update(fTimeDelta); } void CMonster::Update(_float fTimeDelta) { - + _vector vCurrentPos = Get_WorldPostion(); + pair pairTarget = m_pInfoInstance->Get_NearestPlayerAlly(vCurrentPos); + if (nullptr != pairTarget.first) { + Set_Target(*pairTarget.first, *pairTarget.second); + } + if (nullptr != m_pTarget && m_pTarget->isDead()) { + SAFE_RELEASE(m_pTarget); + m_fTargetDistance = { FLT_MAX }; + } + __super::Update(fTimeDelta); } void CMonster::Late_Update(_float fTimeDelta) { - m_fTargetDistance = m_pTransformCom->TargetDis(m_pPlayerTransform->Get_State(STATE::POSITION)); + __super::Late_Update(fTimeDelta); } HRESULT CMonster::Render() @@ -57,8 +68,9 @@ HRESULT CMonster::Ready_Components(void*pArg) /* Com_Shader */ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH, - reinterpret_cast(&m_pShaderCom)))) + reinterpret_cast(&m_pShaderCom)))){ return E_FAIL; + } return S_OK; } @@ -68,11 +80,25 @@ HRESULT CMonster::Bind_ShaderResources() return S_OK; } +void CMonster::Set_Target(CUnit& pTarget, CTransform& pTransform) +{ + SAFE_RELEASE(m_pTarget); + m_pTarget = &pTarget; + SAFE_ADDREF(m_pTarget); + + _vector vTargetPos = pTransform.Get_State(STATE::POSITION); + _vector vToTargetDir = vTargetPos - Get_WorldPostion(); + XMStoreFloat4(&m_vTargetPos, vTargetPos); + XMStoreFloat3(&m_vToTargetDir, XMVector3Normalize(vToTargetDir)); + m_fTargetDistance = XMVectorGetX(XMVector3Length(vToTargetDir)); +} + void CMonster::Free() { __super::Free(); - SAFE_RELEASE(m_pPlayerTransform); + SAFE_RELEASE(m_pTarget); + SAFE_RELEASE(m_pInfoInstance); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp index 8bc1b86e3..3b45a35b0 100644 --- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp @@ -76,52 +76,69 @@ CMonster* CMonsterInfo::Get_LockOnMonster() return m_pLockOnMonster; } -pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) +pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) { - _float fLength = FLT_MAX; - CUnit* pNearestPlayer = { nullptr }; + _float fLengthMAX = FLT_MAX; + CTransform* pNearestPlayerAllyTransform = { nullptr }; + CUnit* pNearestPlayerAlly = { nullptr }; for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end(); ++iter) { CTransform* pTransform = (*iter)->Get_Component(); _float fNewLength = XMVectorGetX(XMVector3LengthSq(pTransform->Get_State(STATE::POSITION) - vPos)); - if (nullptr == pNearestPlayer) { - pNearestPlayer = (*iter); - fLength = fNewLength; + if (nullptr == pNearestPlayerAlly) { + pNearestPlayerAlly = (*iter); + fLengthMAX = fNewLength; + pNearestPlayerAllyTransform = pTransform; continue; } - if (fNewLength < fLength) { - pNearestPlayer = (*iter); - fLength = fNewLength; + if (fNewLength < fLengthMAX) { + pNearestPlayerAlly = (*iter); + pNearestPlayerAllyTransform = pTransform; + fLengthMAX = fNewLength; } } - return { pNearestPlayer, fLength }; + return { pNearestPlayerAlly, pNearestPlayerAllyTransform }; } HRESULT CMonsterInfo::Refresh_LockOnMonsters() { SAFE_RELEASE(m_pLockOnMonster); + _vector vCameraLook = m_pGameInstance->Get_CameraLook(); + _vector vCameraPos = m_pGameInstance->Get_CamXMPosition(); + _float fMaxDot = { 0.f }; + + _vector vMonsterPos; + _vector vToMonsterDir; + { // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기 - //for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) { + for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) { - // CTransform* pTransform = (*iter)->Get_Component(); - // _float fNewLength = XMVectorGetX(XMVector3LengthSq(pTransform->Get_State(STATE::POSITION) - vPos)); + // (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상 + vMonsterPos = (*iter)->Get_WorldPostion(); + vToMonsterDir = vMonsterPos - vCameraPos; + _float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir); + if (fDotResult <= 0.f) { + continue; + } - // if (nullptr == pNearestPlayer) { - // pNearestPlayer = (*iter); - // fLength = fNewLength; - // continue; - // } + if (nullptr == m_pLockOnMonster) { + m_pLockOnMonster = (*iter); + fMaxDot = fDotResult; + continue; + } - // if (fNewLength < fLength) { - // pNearestPlayer = (*iter); - // fLength = fNewLength; - // } - //} + if (fMaxDot < fDotResult) { + m_pLockOnMonster = (*iter); + fMaxDot = fDotResult; + } + } + } + if (nullptr != m_pLockOnMonster) { + SAFE_ADDREF(m_pLockOnMonster); } - return S_OK; } @@ -181,5 +198,4 @@ void CMonsterInfo::Free() SAFE_RELEASE(m_pInfoInstance); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); - } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index b9d22ce31..3aadbfd63 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -2,6 +2,7 @@ #include "Player.h" #include "GameInstance.h" +#include "InfoInstance.h" #include "CamPosition_Socket.h" #include "Camera_Gaze.h" #include "CamPosition_Arm.h" @@ -28,8 +29,10 @@ CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CPlayer::CPlayer(const CPlayer& Prototype) - : CUnit(Prototype) + : CUnit(Prototype), + m_pInfoInstance(CInfoInstance::GetInstance()) { + SAFE_ADDREF(m_pInfoInstance); } HRESULT CPlayer::Initialize_Prototype() @@ -73,6 +76,8 @@ HRESULT CPlayer::Initialize(void* pArg) m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody); m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody); + m_pInfoInstance->Regist_PlayerAlly(this); + #ifdef _DEBUG m_BasicEffect = make_unique(m_pDevice); m_BasicEffect->SetVertexColorEnabled(true); @@ -362,6 +367,7 @@ void CPlayer::Free() SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart); SAFE_RELEASE(m_pCamPosition_TopDown_LookPart); SAFE_RELEASE(m_pCamPosition_ShoulderPart); + SAFE_RELEASE(m_pInfoInstance); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Client_Define.h b/Jusin154_Team3D/Client/Public/Client_Define.h index 875851cbf..2c0362b5d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Define.h +++ b/Jusin154_Team3D/Client/Public/Client_Define.h @@ -12,7 +12,7 @@ namespace Client { const unsigned int g_iWinSizeX = 1920; const unsigned int g_iWinSizeY = 1080; - + class CInfoInstance; } using namespace Client; diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h index 0665ba634..4769da3e5 100644 --- a/Jusin154_Team3D/Client/Public/Goblin.h +++ b/Jusin154_Team3D/Client/Public/Goblin.h @@ -15,8 +15,6 @@ class CGoblin final : public CMonster virtual ~CGoblin() = 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; @@ -30,6 +28,8 @@ class CGoblin final : public CMonster CRigidBody_Dynamic* m_pRigidBody = { nullptr }; private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 27540e938..982be5a56 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -5,6 +5,8 @@ NS_BEGIN(Engine) class CGameInstance; +class CTransform; +class CUnit; NS_END NS_BEGIN(Client) @@ -23,7 +25,15 @@ class CInfoInstance final : public CBase void Update(_float fTimeDelta); void Change_Level(); +#pragma region MONSTER_INFO + HRESULT Regist_PlayerAlly(CUnit* pUnit); + HRESULT Deregist_PlayerAlly(CUnit* pUnit); + HRESULT Regist_ActiveMonster(class CMonster* pUnit); + HRESULT Deregist_ActiveMonster(class CMonster* pUnit); + class CMonster* Get_LockOnMonster(); + pair Get_NearestPlayerAlly(_fvector vPos); +#pragma endregion #pragma region MAP_INFO HRESULT Load_MapObjects(const _char* pFilePath); #pragma endregion diff --git a/Jusin154_Team3D/Client/Public/Monster.h b/Jusin154_Team3D/Client/Public/Monster.h index dfca98381..d14859b21 100644 --- a/Jusin154_Team3D/Client/Public/Monster.h +++ b/Jusin154_Team3D/Client/Public/Monster.h @@ -13,20 +13,24 @@ class CMonster abstract : public CUnit virtual ~CMonster() = 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; protected: - CTransform* m_pPlayerTransform = { nullptr }; - _float m_fTargetDistance = {}; + CInfoInstance* m_pInfoInstance = { nullptr }; + CUnit* m_pTarget = { nullptr }; + _float4 m_vTargetPos = { }; + _float3 m_vToTargetDir = { }; + _float m_fTargetDistance = { FLT_MAX }; protected: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(void* pArg); HRESULT Bind_ShaderResources(); + void Set_Target(CUnit& pTarget, CTransform& pTransform); public: virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE; diff --git a/Jusin154_Team3D/Client/Public/MonsterInfo.h b/Jusin154_Team3D/Client/Public/MonsterInfo.h index d09933b48..e16801af6 100644 --- a/Jusin154_Team3D/Client/Public/MonsterInfo.h +++ b/Jusin154_Team3D/Client/Public/MonsterInfo.h @@ -26,7 +26,7 @@ class CMonsterInfo final : public CBase HRESULT Deregist_ActiveMonster(class CMonster* pUnit); class CMonster* Get_LockOnMonster(); - pair Get_NearestPlayerAlly(_fvector vPos); + pair Get_NearestPlayerAlly(_fvector vPos); private: CGameInstance* m_pGameInstance = { nullptr }; @@ -37,6 +37,7 @@ class CMonsterInfo final : public CBase class CMonster* m_pLockOnMonster = { nullptr }; list m_ActiveMonsters = {}; list m_PlayerAllies = {}; + private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); HRESULT Refresh_LockOnMonsters(); diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 329c0a62a..cad8003fb 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -23,6 +23,7 @@ class CPlayer final : public CUnit _bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; } private: + CInfoInstance* m_pInfoInstance = { nullptr }; _float m_fDirectionRadian = 0.f; _bool m_bSprintToggle = { false };