diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Box/Box b/Jusin154_Team3D/Client/Bin/Resources/Models/Box/Box similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Box/Box rename to Jusin154_Team3D/Client/Bin/Resources/Models/Box/Box diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinBody b/Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/GoblinBody similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinBody rename to Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/GoblinBody diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinHead b/Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/GoblinHead similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinHead rename to Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/GoblinHead diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/T_GOB_Mage_Head_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/T_GOB_Mage_Head_D.png new file mode 100644 index 000000000..72d3d63fc Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Goblin/T_GOB_Mage_Head_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Body/Body b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/Body similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Body/Body rename to Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/Body diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/Body.fbx b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/Body.fbx new file mode 100644 index 000000000..a9b67e9ba --- /dev/null +++ b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/Body.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7586f3029f295dbcb4d0306a07464420af0efc524cf09568464b07d67340a95c +size 3076716 diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_D.png new file mode 100644 index 000000000..bd1d863a5 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_N.png new file mode 100644 index 000000000..88d3686f0 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Body/T_Vendor_DADA_N.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Hair/Hair b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Hair/Hair similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Hair/Hair rename to Jusin154_Team3D/Client/Bin/Resources/Models/Human/Hair/Hair diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Hair/Hair.fbx b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Hair/Hair.fbx new file mode 100644 index 000000000..b30f6ac18 --- /dev/null +++ b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Hair/Hair.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6bed60c6be5555ed08388845e833b539eb5ca8095be2e7096aad754450f0320 +size 3383676 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Head b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/Head similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Head rename to Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/Head diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/Head.fbx b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/Head.fbx new file mode 100644 index 000000000..d0d7958de --- /dev/null +++ b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/Head.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8c2af954e432ef10626e687fc032c826b4042f6ba058e485347273087509b76 +size 2730924 diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/T_NPC_Young_M_Head_Ivory_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/T_NPC_Young_M_Head_Ivory_D.png new file mode 100644 index 000000000..c4b770cdd Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Human/Head/T_NPC_Young_M_Head_Ivory_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Steve/Steve b/Jusin154_Team3D/Client/Bin/Resources/Models/Steve/Steve similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Steve/Steve rename to Jusin154_Team3D/Client/Bin/Resources/Models/Steve/Steve diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/TombProtector b/Jusin154_Team3D/Client/Bin/Resources/Models/TombProtector/TombProtector similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/TombProtector rename to Jusin154_Team3D/Client/Bin/Resources/Models/TombProtector/TombProtector diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Body_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Body_D.png new file mode 100644 index 000000000..b63e5e4a5 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Body_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_D.png new file mode 100644 index 000000000..9d495b121 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_N.png new file mode 100644 index 000000000..3533f9808 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Leather_N.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_D.png new file mode 100644 index 000000000..bbbb5572a Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_E.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_E.png new file mode 100644 index 000000000..b23efd89f Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_E.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_N.png new file mode 100644 index 000000000..3c8bca8ba Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_ArmoredTroll_Metal_N.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Eye_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Eye_D.png new file mode 100644 index 000000000..df0e9262f Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Eye_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_D.png new file mode 100644 index 000000000..0276f34ab Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_N.png new file mode 100644 index 000000000..f4280c6f9 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Head_N.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_D.png new file mode 100644 index 000000000..04895a31f Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_N.png new file mode 100644 index 000000000..e3d44cbb1 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Mountain01_Skirt_N.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_D.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_D.png new file mode 100644 index 000000000..5db401caf Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_D.png differ diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_N.png b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_N.png new file mode 100644 index 000000000..7c0338fd8 Binary files /dev/null and b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/T_Troll_Teeth_N.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Troll/Troll b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/Troll similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Troll/Troll rename to Jusin154_Team3D/Client/Bin/Resources/Models/Troll/Troll diff --git a/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/Troll.fbx b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/Troll.fbx new file mode 100644 index 000000000..94e082474 --- /dev/null +++ b/Jusin154_Team3D/Client/Bin/Resources/Models/Troll/Troll.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b44b64d49d58489c7ac80620cbd2bf5c5827343301d5303bdaa6314b4040634 +size 136314364 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinBody.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinBody.bin new file mode 100644 index 000000000..d0c63a25f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinBody.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinHead.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinHead.bin new file mode 100644 index 000000000..70cdd40d1 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Goblin/GoblinHead.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Body/Body.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Body/Body.bin new file mode 100644 index 000000000..594d7b2a7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Body/Body.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Hair/Hair.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Hair/Hair.bin new file mode 100644 index 000000000..7305034ef Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Hair/Hair.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Head.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Head.bin new file mode 100644 index 000000000..92616bccf Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Head.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Steve/Steve.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Steve/Steve.bin new file mode 100644 index 000000000..4cd475871 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Steve/Steve.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/TombProtector.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/TombProtector.bin new file mode 100644 index 000000000..6662964a2 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/TombProtector.bin differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Troll/Troll.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Troll/Troll.bin new file mode 100644 index 000000000..181da1740 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Troll/Troll.bin differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index da7309606..068571263 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -151,10 +151,17 @@ + + + + false + false + + @@ -170,10 +177,13 @@ - + + + + - + @@ -197,10 +207,17 @@ + + + + false + false + + @@ -213,11 +230,14 @@ - + + + + - + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index e6ff8795a..c670f29d8 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -64,9 +64,6 @@ {627570ac-7129-4888-bdd1-467149dbcf35} - - {b652ee5a-69ca-4c85-8c6c-def398a4dd23} - {b5d188ff-5925-40bd-8da4-2ed00c89f730} @@ -106,36 +103,45 @@ {5b31b993-b137-42d2-b737-000aeb27a675} - - {167182ec-ed5f-46fc-9c27-a82e327fa1ac} - - - {887de1c6-ada2-4dc8-be5c-bcef4213e3b6} - - - {3804137e-7af7-40db-b729-8afa81035b35} - - - {f897068c-184a-4bb2-a4fb-e74ec1877b02} - - - {d1c99bb3-369e-49b9-93f9-6b8536579cb5} - - - {5da34159-e4a2-4b4b-a7a0-a65966579e2f} - - - {61a808c7-2765-42d9-8b4c-b4bed93b013e} - - - {999ed728-0bc5-425c-b861-1422c77ccbe6} - {f60f1948-8c11-4796-843a-8c38f10043e3} - + + {9900c91e-574d-4d80-b8bc-142c971fb7b4} + + + {b652ee5a-69ca-4c85-8c6c-def398a4dd23} + + + {887de1c6-ada2-4dc8-be5c-bcef4213e3b6} + + + {3804137e-7af7-40db-b729-8afa81035b35} + + + {f897068c-184a-4bb2-a4fb-e74ec1877b02} + + + {d1c99bb3-369e-49b9-93f9-6b8536579cb5} + + + {5da34159-e4a2-4b4b-a7a0-a65966579e2f} + + {977fe4d3-c3b5-413c-80fe-777ece19453e} + + {61a808c7-2765-42d9-8b4c-b4bed93b013e} + + + {999ed728-0bc5-425c-b861-1422c77ccbe6} + + + {f21ccde9-97d1-4700-af94-2e5cf21a72c4} + + + {167182ec-ed5f-46fc-9c27-a82e327fa1ac} + {44a3ddc2-3993-48d6-840c-3da09daeab70} @@ -151,6 +157,15 @@ {a2944f33-1db0-480a-b793-7ec7f81e8116} + + {c347da03-98f1-4095-a4e4-2c840c308916} + + + {c7e7d3c7-fd26-4035-88b4-11233459559c} + + + {15a9dfe7-f3f7-4906-8bd4-91734f4ddc92} + @@ -195,8 +210,8 @@ 01.Level\50.UIViewer - - 50.UI\Mission + + 50.UI\GamePlay_Canvas\Mission_Panel 50.UI\Mouse_Cursor @@ -246,29 +261,44 @@ 02.GameObjects\Layer_Effect\Effect_Editor - - 50.UI\LodingWidget1 + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget - 50.UI\Mission\Mission_Key + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_Key - 50.UI\Mission\MissionBanner_Border + 50.UI\GamePlay_Canvas\Mission_Panel\MissionBanner_Border - 50.UI\Mission\Mission_KeyHold + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_KeyHold - 50.UI\Mission\MissionBanner_Key + 50.UI\GamePlay_Canvas\Mission_Panel\MissionBanner_Key - 50.UI\Mission\Mission_Icon + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_Icon - 50.UI\MiniMap\MiniMap_TrimBorder + 50.UI\GamePlay_Canvas\MiniMap_Panel\MiniMap_TrimBorder - 50.UI\Mission\Active_Icon + 50.UI\GamePlay_Canvas\Mission_Panel\Active_Icon + + + 50.UI\IMGUIUI + + + 50.UI\GamePlay_Canvas + + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget_Flame + + + 50.UI\GamePlay_Canvas\MiniMap_Panel + + + 50.UI\GamePlay_Canvas\Loding_Panel 01.Level\30.MapViewer @@ -285,6 +315,15 @@ 01.Level\60.PhysXLab + + 02.GameObjects\Dummys\PhysXBox + + + 02.GameObjects\Dummys\PhysXMesh + + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget + @@ -319,8 +358,8 @@ 01.Level\50.UIViewer - - 50.UI\Mission + + 50.UI\GamePlay_Canvas\Mission_Panel 50.UI\Mouse_Cursor @@ -361,29 +400,44 @@ 02.GameObjects\Layer_Effect\Effect_Editor - - 50.UI\LodingWidget1 + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget - 50.UI\Mission\Mission_Key + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_Key - 50.UI\Mission\MissionBanner_Border + 50.UI\GamePlay_Canvas\Mission_Panel\MissionBanner_Border - 50.UI\Mission\Mission_KeyHold + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_KeyHold - 50.UI\Mission\MissionBanner_Key + 50.UI\GamePlay_Canvas\Mission_Panel\MissionBanner_Key - 50.UI\Mission\Mission_Icon + 50.UI\GamePlay_Canvas\Mission_Panel\Mission_Icon - 50.UI\MiniMap\MiniMap_TrimBorder + 50.UI\GamePlay_Canvas\MiniMap_Panel\MiniMap_TrimBorder - 50.UI\Mission\Active_Icon + 50.UI\GamePlay_Canvas\Mission_Panel\Active_Icon + + + 50.UI\IMGUIUI + + + 50.UI\GamePlay_Canvas + + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget_Flame + + + 50.UI\GamePlay_Canvas\MiniMap_Panel + + + 50.UI\GamePlay_Canvas\Loding_Panel 01.Level\30.MapViewer @@ -412,6 +466,18 @@ 02.GameObjects\Monster + + 02.GameObjects\Dummys\PhysXBox + + + 02.GameObjects\Dummys\PhysXMesh + + + 50.UI\LoadingWidget + + + 50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget + diff --git a/Jusin154_Team3D/Editor/Private/DummyRect.cpp b/Jusin154_Team3D/Editor/Private/DummyRect.cpp index 1fcbb6318..ee738796a 100644 --- a/Jusin154_Team3D/Editor/Private/DummyRect.cpp +++ b/Jusin154_Team3D/Editor/Private/DummyRect.cpp @@ -83,6 +83,8 @@ HRESULT CDummyRect::Ready_Components(void* pArg) return E_FAIL; } } + + CGameObject* asdf = this; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp new file mode 100644 index 000000000..748af56c8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp @@ -0,0 +1,167 @@ +#include "pch.h" +#include "Dummy_PhysXBox.h" + +#include "GameInstance.h" + + +CDummy_PhysXBox::CDummy_PhysXBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject{ pDevice, pContext } +{ +} + +CDummy_PhysXBox::CDummy_PhysXBox(const CDummy_PhysXBox& rhs) + : CGameObject(rhs) +{ +} + +HRESULT CDummy_PhysXBox::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CDummy_PhysXBox::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +void CDummy_PhysXBox::Priority_Update(_float fTimeDelta) +{ + +} + +void CDummy_PhysXBox::Update(_float fTimeDelta) +{ +} + +void CDummy_PhysXBox::Late_Update(_float fTimeDelta) +{ + //_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + //m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, *vPos, m_pTransformCom->Get_Radius()); +} + +HRESULT CDummy_PhysXBox::Render() +{ + //if (FAILED(Bind_ShaderResources())) { + // return E_FAIL; + //} + + + //_uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + //for (_uint i = 0; i < iNumMeshes; i++) + //{ + // if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) { + // return E_FAIL; + // } + // if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) { + // return E_FAIL; + // } + + // if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) { + // return E_FAIL; + // } + + // if (FAILED(m_pModelCom->Render(i))) { + // return E_FAIL; + // } + //} + + + return S_OK; +} + +HRESULT CDummy_PhysXBox::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + BOXSTARTPOS_DESC* pBox = static_cast(pArg); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pBox->vPos), 1.f)); + m_pTransformCom->Rotation(pBox->vRotRPY.x, pBox->vRotRPY.y, pBox->vRotRPY.z); + + + { // RIGID_BODY + CRigidBody::RIGIDBODY_DESC Desc{}; + Desc.tRigidDynamicDesc.bIsKinematic = false; + Desc.tRigidDynamicDesc.fDensity = 1000.f; + + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) { + return E_FAIL; + } + + m_pActor = m_pGameInstance->Add_DynamicActor(*m_pRigidBody); + if (nullptr == m_pActor) { + assert(false); + return E_FAIL; + } + + } + + return S_OK; +} + +HRESULT CDummy_PhysXBox::Bind_ShaderResources() +{ + //if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + // return E_FAIL; + //} + + //if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + // return E_FAIL; + //} + return S_OK; +} + +CDummy_PhysXBox* CDummy_PhysXBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDummy_PhysXBox* pInstance = new CDummy_PhysXBox(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDummy_PhysXBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CDummy_PhysXBox::Clone(void* pArg, CGameObject* pOwner) +{ + CDummy_PhysXBox* pInstance = new CDummy_PhysXBox(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDummy_PhysXBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDummy_PhysXBox::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pRigidBody); + //SAFE_RELEASE(m_pModelCom); + //SAFE_RELEASE(m_pShaderCom); +} + +void CDummy_PhysXBox::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXMesh.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXMesh.cpp new file mode 100644 index 000000000..550fde9cb --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXMesh.cpp @@ -0,0 +1,166 @@ +#include "pch.h" +#include "Dummy_PhysXMesh.h" + +#include "GameInstance.h" + + +CDummy_PhysXMesh::CDummy_PhysXMesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject{ pDevice, pContext } +{ +} + +CDummy_PhysXMesh::CDummy_PhysXMesh(const CDummy_PhysXMesh& rhs) + : CGameObject(rhs) +{ +} + +HRESULT CDummy_PhysXMesh::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CDummy_PhysXMesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +void CDummy_PhysXMesh::Priority_Update(_float fTimeDelta) +{ + +} + +void CDummy_PhysXMesh::Update(_float fTimeDelta) +{ +} + +void CDummy_PhysXMesh::Late_Update(_float fTimeDelta) +{ + //_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + //m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, *vPos, m_pTransformCom->Get_Radius()); +} + +HRESULT CDummy_PhysXMesh::Render() +{ + //if (FAILED(Bind_ShaderResources())) { + // return E_FAIL; + //} + + + //_uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + //for (_uint i = 0; i < iNumMeshes; i++) + //{ + // if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) { + // return E_FAIL; + // } + // if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) { + // return E_FAIL; + // } + + // if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) { + // return E_FAIL; + // } + + // if (FAILED(m_pModelCom->Render(i))) { + // return E_FAIL; + // } + //} + + + return S_OK; +} + +HRESULT CDummy_PhysXMesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + BOXSTARTPOS_DESC* pBox = static_cast(pArg); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pBox->vPos), 1.f)); + m_pTransformCom->Rotation(pBox->vRotRPY.x, pBox->vRotRPY.y, pBox->vRotRPY.z); + + + { // RIGID_BODY + CRigidBody::RIGIDBODY_DESC Desc{}; + Desc.tRigidDynamicDesc.bIsKinematic = false; + Desc.tRigidDynamicDesc.fDensity = 1000.f; + + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) { + return E_FAIL; + } + + m_pActor = m_pGameInstance->Add_DynamicActor(*m_pRigidBody); + if (nullptr == m_pActor) { + assert(false); + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CDummy_PhysXMesh::Bind_ShaderResources() +{ + //if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + // return E_FAIL; + //} + + //if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + // return E_FAIL; + //} + return S_OK; +} + +CDummy_PhysXMesh* CDummy_PhysXMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDummy_PhysXMesh* pInstance = new CDummy_PhysXMesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDummy_PhysXMesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CDummy_PhysXMesh::Clone(void* pArg, CGameObject* pOwner) +{ + CDummy_PhysXMesh* pInstance = new CDummy_PhysXMesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDummy_PhysXMesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDummy_PhysXMesh::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pRigidBody); + //SAFE_RELEASE(m_pModelCom); + //SAFE_RELEASE(m_pShaderCom); +} + +void CDummy_PhysXMesh::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp new file mode 100644 index 000000000..a36cd7d50 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp @@ -0,0 +1,157 @@ +#include "pch.h" +#include "GamePlay_Canvas.h" +#include "GameInstance.h" +#include "Mission_Panel.h" +#include "MiniMap_Panel.h" +#include "Loading_Panel.h" +#include "Mouse_Cursor.h" + +CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CGamePlay_Canvas::CGamePlay_Canvas(const CGamePlay_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + + +HRESULT CGamePlay_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CGamePlay_Canvas::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1920.f; + Desc.fSizeY = 1080.f; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Panel(pArg))) + { + return E_FAIL; + } + + return S_OK; +} + +void CGamePlay_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CGamePlay_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CGamePlay_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CGamePlay_Canvas::Render() +{ + return S_OK; +} + +_vector CGamePlay_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CGamePlay_Canvas::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CGamePlay_Canvas::Ready_Components(void* pArg) +{ + + + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Mission_Panel))) + //{ + // return E_FAIL; + //} + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Minimap_Panel))) + //{ + // return E_FAIL; + //} + + + CGameObject* asdf = this; + + + return S_OK; +} + +HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg) +{ + CGameObject* asdf = this; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Loading_Panel))) + { + return E_FAIL; + } + return S_OK; +} + +void CGamePlay_Canvas::Clear_Penel() +{ +} + +CGamePlay_Canvas* CGamePlay_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CGamePlay_Canvas* pInstance = new CGamePlay_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CGamePlay_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CGamePlay_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CGamePlay_Canvas* pInstance = new CGamePlay_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CGamePlay_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CGamePlay_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CGamePlay_Canvas::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp new file mode 100644 index 000000000..5c7fec565 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp @@ -0,0 +1,149 @@ +#include "pch.h" +#include "IMGUIUI.h" +#include "UIObject.h" +#include "GamePlay_Canvas.h" + +CIMGUIUI::CIMGUIUI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject(pDevice, pContext) +{ +} + +CIMGUIUI::CIMGUIUI(const CIMGUIUI& rhs) + : CGameObject(rhs) +{ +} + +HRESULT CIMGUIUI::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CIMGUIUI::Initialize(void* pArg) +{ + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + return S_OK; +} + +void CIMGUIUI::Priority_Update(_float fTimeDelta) +{ +} + +void CIMGUIUI::Update(_float fTimeDelta) +{ + if (m_pElementObject != nullptr) + { + m_fPos.x = static_cast(m_pElementObject)->Get_Current_Position().m128_f32[0]; + m_fPos.y = static_cast(m_pElementObject)->Get_Current_Position().m128_f32[1]; + + m_fSize.x = static_cast(m_pElementObject)->Get_Current_Size().x; + m_fSize.y = static_cast(m_pElementObject)->Get_Current_Size().y; + + m_fSizeXY = static_cast(m_pElementObject)->Get_Current_Size(); + + m_fTimeMult = static_cast(m_pElementObject)->Get_TimeMult(); + } + GUI::Begin("Current_UIObject_Info"); + + if (m_pElementObject != nullptr) + { + GUI::Text("Origin Position : %.1f, %.1f", static_cast(m_pElementObject)->Get_Origin_Position().x, static_cast(m_pElementObject)->Get_Origin_Position().y); + GUI::Text("Current Position : %.1f, %.1f", static_cast(m_pElementObject)->Get_Current_Position().m128_f32[0], static_cast(m_pElementObject)->Get_Current_Position().m128_f32[1]); + GUI::Text("Origin Size : %.1f, %.1f", static_cast(m_pElementObject)->Get_Origin_Size().x, static_cast(m_pElementObject)->Get_Origin_Size().y); + GUI::Text("Current Size : %.1f, %.1f", static_cast(m_pElementObject)->Get_Current_Size().x, static_cast(m_pElementObject)->Get_Current_Size().y); + + GUI::Text("Position"); + if (GUI::SliderFloat("X##Pos", &m_fPos.x, 0.f, 1920.f)) + { + static_cast(m_pElementObject)->MoveX(m_fPos.x); + } + + if (GUI::SliderFloat("Y##Pos", &m_fPos.y, 0.f, 1080)) + { + static_cast(m_pElementObject)->MoveY(m_fPos.y); + } + + GUI::Text("Size"); + if (GUI::SliderFloat("X##Size", &m_fSize.x, 1.f, 1920.f)) + { + static_cast(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y); + } + + if (GUI::SliderFloat("Y##Size", &m_fSize.y, 1.f, 1080.f)) + { + static_cast(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y); + } + + if (GUI::SliderFloat("Size", &m_fSizeXY.x, 1.f, 1980.f)) + { + m_fSizeXY.y = m_fSizeXY.x; + static_cast(m_pElementObject)->SizeUpdate_float(m_fSizeXY); + } + + if (GUI::DragFloat("TimeMult", &m_fTimeMult, 0.01f, 0.f, 10.f)) + { + static_cast(m_pElementObject)->Set_TimeMult(m_fTimeMult); + } + } + GUI::End(); + + +} + +void CIMGUIUI::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CIMGUIUI::Render() +{ + return S_OK; +} + +HRESULT CIMGUIUI::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CIMGUIUI::Ready_Components(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pGamePlay_Canvas))) + { + return E_FAIL; + } + return S_OK; +} + +CIMGUIUI* CIMGUIUI::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CIMGUIUI* pInstance = new CIMGUIUI(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CIMGUIUI"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CIMGUIUI::Clone(void* pArg, CGameObject* pOwner) +{ + CIMGUIUI* pInstance = new CIMGUIUI(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CIMGUIUI"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CIMGUIUI::Free() +{ + __super::Free(); +} + +void CIMGUIUI::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp index ad3efb73f..f8f1dca2e 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp @@ -8,6 +8,8 @@ #include "Level_ObjectViewer.h" #include "Level_EffectViewer.h" #include "Level_MapViewer.h" +#include "Level_PhysXLab.h" + CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -57,9 +59,9 @@ void CLevel_Loading::Update(_float fTimeDelta) case LEVEL::EFFECT: pNewLevel = CLevel_EffectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID); break; - //case LEVEL::SKIllSTUDIO: - // pNewLevel = CLevel_SkillStudio::Create(m_pDevice, m_pContext, m_eNextLevelID); - // break; + case LEVEL::PHYSX: + pNewLevel = CLevel_PhysXLab::Create(m_pDevice, m_pContext, m_eNextLevelID); + break; //case LEVEL::PARTICLE: // pNewLevel = CLevel_ParticleViewer::Create(m_pDevice, m_pContext, m_eNextLevelID); // break; diff --git a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp index d2f696d5b..7b3736fd5 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp @@ -38,10 +38,10 @@ void CLevel_Logo::Update(_float fTimeDelta) if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::EFFECT)))) return; } - //else if (GUI::Button("Skill Editor", { 100, 100 })) { - // if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::SKIllSTUDIO)))) - // return; - //} + else if (GUI::Button("PhysX Simulator", { 100, 100 })) { + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::PHYSX)))) + return; + } //else if (GUI::Button("Particle Editor", { 100, 100 })) { // if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::PARTICLE)))) // return; diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp index 20a9d21a3..e6175746c 100644 --- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp @@ -132,42 +132,26 @@ void CLevel_ObjectViewer::Add_Human() void CLevel_ObjectViewer::Show_ModelFilePath() { - /*GUI::Begin("Model_List"); + GUI::Begin("Model_List"); if(GUI::BeginTabBar("Model_List")) { - if (GUI::BeginTabItem("Assimp_Model")) - { - if (m_pGameInstance->ModelFilePathCount() > 0) - { - for (_uint i = 0; i < m_pGameInstance->ModelFilePathCount(); i++) - { - GUI::Text(m_pGameInstance->Load_ModelFilePath(i)); - GUI::SameLine(); - - std::string label = "Binary##" + std::to_string(i); - if (GUI::Button(label.c_str())) - { - m_pGameInstance->SaveAssimpModel(m_pGameInstance->Load_ModelFilePath(i)); - } - } - GUI::EndTabItem(); - } - } - - if (GUI::BeginTabItem("Binary_Model")) + if (GUI::BeginTabItem("Model")) { if (m_pGameInstance->BinaryModelFilePathCount() > 0) { for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++) { - GUI::Text(m_pGameInstance->Load_BinaryModelFilePath(i)); + if (GUI::Button(m_pGameInstance->Load_BinaryModelFilePath(i))) + { + + } } } GUI::EndTabItem(); } } GUI::EndTabBar(); - GUI::End();*/ + GUI::End(); } void CLevel_ObjectViewer::Show_AnimList() diff --git a/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp b/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp index a4f23480e..19a0e36d8 100644 --- a/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp @@ -1,2 +1,122 @@ #include "pch.h" -#include "Level_PhysXLab.h" \ No newline at end of file +#include "Level_PhysXLab.h" +#include "GameInstance.h" + +#include "Level_Loading.h" +#include "DebugCamera.h" +#include "Terrain.h" +#include "Dummy_PhysXBox.h" + +CLevel_PhysXLab::CLevel_PhysXLab(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) + : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } +{ + +} + +void CLevel_PhysXLab::Update(_float fTimeDelta) +{ + +} + +HRESULT CLevel_PhysXLab::Render() +{ + SetWindowText(g_hWnd, TEXT("PhysXEditor레벨입니다")); + GUI::ShowDemoWindow(); + return S_OK; +} + +HRESULT CLevel_PhysXLab::Initialize() +{ + if (FAILED(Ready_Layer_Light())) + return E_FAIL; + + if (FAILED(Ready_Layer_Camera(LAYER_CAMERA))) { + return E_FAIL; + } + + if (FAILED(Ready_Layer_Terrain(TEXT("Layer_Terrain")))) { + return E_FAIL; + } + + if (FAILED(Ready_Layer_PhysXObjects(TEXT("Layer_PhysXObject")))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLevel_PhysXLab::Ready_Layer_Light() +{ + LIGHT_DESC LightDesc{}; + + LightDesc.eType = LIGHT::DIRECTIONAL; + LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vAmbient = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); + LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f); + + if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) { + return E_FAIL; + } + return S_OK; +} + +HRESULT CLevel_PhysXLab::Ready_Layer_Camera(const _wstring& strLayerTag) +{ + CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{}; + CameraDesc.fFovy = XMConvertToRadians(60.0f); + CameraDesc.fNear = 0.1f; + CameraDesc.fFar = 500.f; + CameraDesc.vEye = _float3(0.f, 10.f, -10.f); + CameraDesc.vAt = _float3(0.f, 0.f, 0.f); + CameraDesc.fSpeedPerSec = 2.f; + CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f); + CameraDesc.fMouseSensor = 0.1f; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, + strLayerTag, &CameraDesc))) + return E_FAIL; + + return S_OK; +} + +HRESULT CLevel_PhysXLab::Ready_Layer_Terrain(const _wstring& strLayerTag) +{ + + return S_OK; +} + +HRESULT CLevel_PhysXLab::Ready_Layer_PhysXObjects(const _wstring& strLayerTag) +{ + for (int i = 0; i < 50; ++i) { + CDummy_PhysXBox::BOXSTARTPOS_DESC Desc{}; + Desc.vPos = { m_pGameInstance->Random_Float(0.f, 30.f), m_pGameInstance->Random_Float(3.f, 33.f), m_pGameInstance->Random_Float(0.f, 30.f) }; + Desc.vRotRPY = { m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI) }; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) { + return E_FAIL; + } + } + + return S_OK; +} + +CLevel_PhysXLab* CLevel_PhysXLab::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) +{ + CLevel_PhysXLab* pInstance = new CLevel_PhysXLab(pDevice, pContext, eLevelID); + + if (FAILED(pInstance->Initialize())) + { + MSG_BOX("Failed to Created : CLevel_PhysXLab"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + + +void CLevel_PhysXLab::Free() +{ + __super::Free(); +} diff --git a/Jusin154_Team3D/Editor/Private/Level_UI.cpp b/Jusin154_Team3D/Editor/Private/Level_UI.cpp index 54cd2573e..89438401e 100644 --- a/Jusin154_Team3D/Editor/Private/Level_UI.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_UI.cpp @@ -3,15 +3,9 @@ #include "GameInstance.h" #include "Level_Loading.h" #include "DummyRect.h" -#include "Mission.h" -#include "MissionBanner_Border.h" -#include "MissionBanner_Key.h" -#include "Mission_Icon.h" -#include "Mission_Key.h" -#include "Mission_KeyHold.h" +#include "IMGUIUI.h" +#include "GamePlay_Canvas.h" #include "Mouse_Cursor.h" -#include "LodingWidget1.h" -#include "MiniMap_TrimBorder.h" CLevel_UI::CLevel_UI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -51,28 +45,17 @@ HRESULT CLevel_UI::Ready_Layer_Camera(const _wstring& strLayerTag) HRESULT CLevel_UI::Ready_Layer_UI(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { return E_FAIL; } + return S_OK; } HRESULT CLevel_UI::Ready_Layer_Cursor(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 3f34cf1ab..7fb838ae8 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -13,27 +13,32 @@ #include "Body.h" #include "Hair.h" #include "Dummy_Goblin.h" -#include "Dummy_Goblin.h" #include "Monster.h" -#include - #pragma endregion #pragma region UI -#include "Mission.h" +#include "GamePlay_Canvas.h" + +#include "Mission_Panel.h" #include "MissionBanner_Border.h" #include "MissionBanner_Key.h" #include "Mission_Icon.h" #include "Mission_Key.h" #include "Mission_KeyHold.h" #include "Mouse_Cursor.h" - -#include "Dummy_Cube.h" -#include "LodingWidget1.h" #include "MiniMap_TrimBorder.h" #include "Active_Icon.h" +#include "MiniMap_Panel.h" +#include "MiniMap_TrimBorder.h" + +#include "Loading_Panel.h" +#include "LoadingWidget.h" +#include "LoadingWidget_Flame.h" + +#include "IMGUIUI.h" + #pragma endregion #pragma region MAP_HEADER @@ -52,6 +57,12 @@ #pragma endregion +#pragma region PHYSX_HEADER + +#include "Dummy_PhysXBox.h" + +#pragma endregion + CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : m_pDevice{ pDevice } , m_pContext{ pContext } @@ -118,9 +129,9 @@ HRESULT CLoader::Loading() case LEVEL::EFFECT: hr = Loading_For_Effect(); break; - //case LEVEL::SKIllSTUDIO: - // hr = Loading_For_SkillStudio(); - // break; + case LEVEL::PHYSX: + hr = Loading_For_PhysXLevel(); + break; //case LEVEL::PARTICLE: // hr = Loading_For_Particle(); // break; @@ -257,11 +268,21 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/ActiveMission_Icon_%d.png"), 2)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/Mission_Icon_%d.png"), 2)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/ActiveMission_Icon_%d.png"), 2)))) { return E_FAIL; @@ -270,6 +291,11 @@ HRESULT CLoader::Loading_For_UI() if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon_"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/Mission_Icon_%d.png"), 2)))) { return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) { + return E_FAIL; } @@ -286,7 +312,7 @@ HRESULT CLoader::Loading_For_UI() m_strMessage = TEXT("Prototype Loading.."); - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMission::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -296,11 +322,23 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLodingWidget1::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoadingWidget::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoadingWidget_Flame::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMission_Panel::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMissionBanner_Border::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -321,11 +359,22 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CActive_Icon::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMiniMap_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMiniMap_TrimBorder::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CActive_Icon::Create(m_pDevice, m_pContext)))) + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -435,6 +484,46 @@ HRESULT CLoader::Loading_For_Effect() return S_OK; } +HRESULT CLoader::Loading_For_PhysXLevel() +{ + m_strMessage = TEXT("PhysX Bodies Loading.."); + + { + CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{}; + Desc.tRigidDynamicDesc.bExclusive = false; + Desc.tRigidDynamicDesc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f }; + Desc.tRigidDynamicDesc.vMatInfo = { 0.5f, 0.5f, 0.6f }; + Desc.tRigidDynamicDesc.ePxShapeFlag = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE }; + + m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody::Create(m_pDevice, m_pContext, Desc)); + } + //{ + // CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{}; + // Desc.tRigidStaticDesc.pMesh; + // Desc.tRigidStaticDesc.vMatInfo = { 0.5f, 0.5f, 0.6f }; + // Desc.tRigidStaticDesc.pMeshKey = TEXT("PHYSX_STATIC_MESH"); + //} + + m_strMessage = TEXT("Texture Loading.."); + + m_strMessage = TEXT("Model Loading.."); + + m_strMessage = TEXT("Shader Loading.."); + + m_strMessage = TEXT("Prototype Loading.."); + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXBox::Create(m_pDevice, m_pContext)))){ + return E_FAIL; + } + + m_strMessage = TEXT("Loading Success!"); + + m_isFinished = true; + + + return S_OK; +} + HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent) { for (const auto& file : filesystem::directory_iterator(pDirectoryPath)) @@ -468,44 +557,41 @@ HRESULT CLoader::Loading_For_ObjectViewer() m_strMessage = TEXT("Model Loading.."); - - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"), - CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinBody.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0)))) if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanBody_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHead_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHair_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; - m_strMessage = TEXT("Shader Loading.."); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Steve_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve.bin",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))) return E_FAIL; + m_strMessage = TEXT("Shader Loading.."); + m_strMessage = TEXT("Prototype Loading.."); /* For.Prototype_GameObject_RootModelPart */ diff --git a/Jusin154_Team3D/Editor/Private/LodingWidget1.cpp b/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp similarity index 69% rename from Jusin154_Team3D/Editor/Private/LodingWidget1.cpp rename to Jusin154_Team3D/Editor/Private/LoadingWidget.cpp index ff5c7f71d..09942294c 100644 --- a/Jusin154_Team3D/Editor/Private/LodingWidget1.cpp +++ b/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp @@ -1,23 +1,23 @@ #include "pch.h" -#include "LodingWidget1.h" +#include "LoadingWidget.h" #include "GameInstance.h" -CLodingWidget1::CLodingWidget1(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CUIObject(pDevice, pContext) +CLoadingWidget::CLoadingWidget(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) { } -CLodingWidget1::CLodingWidget1(const CLodingWidget1& rhs) - :CUIObject(rhs) +CLoadingWidget::CLoadingWidget(const CLoadingWidget& rhs) + :CElementObject(rhs) { } - -HRESULT CLodingWidget1::Initialize_Prototype() + +HRESULT CLoadingWidget::Initialize_Prototype() { return S_OK; } -HRESULT CLodingWidget1::Initialize(void* pArg) +HRESULT CLoadingWidget::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -39,28 +39,31 @@ HRESULT CLodingWidget1::Initialize(void* pArg) m_iImageFrameX = 6; m_fFrame = 0.2f; - + m_fTimeMult = 3.f; return S_OK; } -void CLodingWidget1::Priority_Update(_float fTimeDelta) +void CLoadingWidget::Priority_Update(_float fTimeDelta) { + __super::Priority_Update(fTimeDelta); } -void CLodingWidget1::Update(_float fTimeDelta) +void CLoadingWidget::Update(_float fTimeDelta) { - m_fTime += fTimeDelta * 3.f; + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); } -void CLodingWidget1::Late_Update(_float fTimeDelta) +void CLoadingWidget::Late_Update(_float fTimeDelta) { if (m_bVisible) { _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); + __super::Late_Update(fTimeDelta); } } -HRESULT CLodingWidget1::Render() +HRESULT CLoadingWidget::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -78,12 +81,12 @@ HRESULT CLodingWidget1::Render() return S_OK; } -_vector CLodingWidget1::Get_WorldPostion() +_vector CLoadingWidget::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CLodingWidget1::Bind_ShaderResources() +HRESULT CLoadingWidget::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -120,7 +123,7 @@ HRESULT CLodingWidget1::Bind_ShaderResources() return S_OK; } -HRESULT CLodingWidget1::Ready_Components(void* pArg) +HRESULT CLoadingWidget::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -138,33 +141,33 @@ HRESULT CLodingWidget1::Ready_Components(void* pArg) return S_OK; } -CLodingWidget1* CLodingWidget1::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CLoadingWidget* CLoadingWidget::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CLodingWidget1* pInstance = new CLodingWidget1(pDevice, pContext); + CLoadingWidget* pInstance = new CLoadingWidget(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CLodingWidget1"); + MSG_BOX("Failed to Created : CLoadingWidget"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CLodingWidget1::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CLoadingWidget::Clone(void* pArg, CGameObject* pOwner) { - CLodingWidget1* pInstance = new CLodingWidget1(*this); + CLoadingWidget* pInstance = new CLoadingWidget(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CLodingWidget1"); + MSG_BOX("Failed to Cloned : CLoadingWidget"); SAFE_RELEASE(pInstance); } return pInstance; } -void CLodingWidget1::Free() +void CLoadingWidget::Free() { __super::Free(); @@ -173,6 +176,6 @@ void CLodingWidget1::Free() SAFE_RELEASE(m_pVIBufferCom); } -void CLodingWidget1::Describe_Entity() +void CLoadingWidget::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp b/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp new file mode 100644 index 000000000..d282e0768 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp @@ -0,0 +1,181 @@ +#include "pch.h" +#include "LoadingWidget_Flame.h" +#include "GameInstance.h" + +CLoadingWidget_Flame::CLoadingWidget_Flame(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CLoadingWidget_Flame::CLoadingWidget_Flame(const CLoadingWidget_Flame& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CLoadingWidget_Flame::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLoadingWidget_Flame::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 1800.f; + Desc.fY = 850.f; + Desc.fSizeX = 200.f; + Desc.fSizeY = 200.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_iImageFrameX = 3; + m_fFrame = 0.2f; + m_fTimeMult = 3.f; + return S_OK; +} + +void CLoadingWidget_Flame::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CLoadingWidget_Flame::Update(_float fTimeDelta) +{ + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CLoadingWidget_Flame::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CLoadingWidget_Flame::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::LODING)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CLoadingWidget_Flame::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CLoadingWidget_Flame::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFrame", &m_fFrame, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCount", &m_iImageFrameX, sizeof(_int)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CLoadingWidget_Flame::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LodingWidget1"), reinterpret_cast(&m_pTextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CLoadingWidget_Flame* CLoadingWidget_Flame::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLoadingWidget_Flame* pInstance = new CLoadingWidget_Flame(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLoadingWidget_Flame"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CLoadingWidget_Flame::Clone(void* pArg, CGameObject* pOwner) +{ + CLoadingWidget_Flame* pInstance = new CLoadingWidget_Flame(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLoadingWidget_Flame"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLoadingWidget_Flame::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pTextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CLoadingWidget_Flame::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Mission.cpp b/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp similarity index 57% rename from Jusin154_Team3D/Editor/Private/Mission.cpp rename to Jusin154_Team3D/Editor/Private/Loading_Panel.cpp index a93b486f9..9aff0df11 100644 --- a/Jusin154_Team3D/Editor/Private/Mission.cpp +++ b/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp @@ -1,33 +1,33 @@ #include "pch.h" -#include "Mission.h" +#include "Loading_Panel.h" #include "GameInstance.h" +#include "LoadingWidget.h" +#include "LoadingWidget_Flame.h" -CMission::CMission(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CUIObject(pDevice, pContext) +CLoading_Panel::CLoading_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) { } -CMission::CMission(const CMission& rhs) - :CUIObject(rhs) +CLoading_Panel::CLoading_Panel(const CLoading_Panel& rhs) + :CPanelObject(rhs) { } -HRESULT CMission::Initialize_Prototype() +HRESULT CLoading_Panel::Initialize_Prototype() { return S_OK; } -HRESULT CMission::Initialize(void* pArg) +HRESULT CLoading_Panel::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - - Desc.fX = 300.f; - Desc.fY = 300.f; + + Desc.fX = 1920.f; + Desc.fY = 1080.f; Desc.fSizeX = 100.f; Desc.fSizeY = 100.f; - m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; - if (FAILED(__super::Initialize(&Desc))) { return E_FAIL; @@ -39,23 +39,26 @@ HRESULT CMission::Initialize(void* pArg) return S_OK; } -void CMission::Priority_Update(_float fTimeDelta) +void CLoading_Panel::Priority_Update(_float fTimeDelta) { + __super::Priority_Update(fTimeDelta); } -void CMission::Update(_float fTimeDelta) +void CLoading_Panel::Update(_float fTimeDelta) { + __super::Update(fTimeDelta); } -void CMission::Late_Update(_float fTimeDelta) +void CLoading_Panel::Late_Update(_float fTimeDelta) { if (m_bVisible) { _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); } + __super::Late_Update(fTimeDelta); } -HRESULT CMission::Render() +HRESULT CLoading_Panel::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -73,12 +76,12 @@ HRESULT CMission::Render() return S_OK; } -_vector CMission::Get_WorldPostion() +_vector CLoading_Panel::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CMission::Bind_ShaderResources() +HRESULT CLoading_Panel::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -92,7 +95,7 @@ HRESULT CMission::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) { return E_FAIL; } @@ -103,13 +106,14 @@ HRESULT CMission::Bind_ShaderResources() return S_OK; } -HRESULT CMission::Ready_Components(void* pArg) +HRESULT CLoading_Panel::Ready_Components(void* pArg) { + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { return E_FAIL; } - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast(&m_pTextureCom), nullptr))) { return E_FAIL; } @@ -121,41 +125,41 @@ HRESULT CMission::Ready_Components(void* pArg) return S_OK; } -CMission* CMission::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CLoading_Panel* CLoading_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CMission* pInstance = new CMission(pDevice, pContext); + CLoading_Panel* pInstance = new CLoading_Panel(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CMission"); + MSG_BOX("Failed to Created : CLoading_Panel"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CMission::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CLoading_Panel::Clone(void* pArg, CGameObject* pOwner) { - CMission* pInstance = new CMission(*this); + CLoading_Panel* pInstance = new CLoading_Panel(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CMission"); + MSG_BOX("Failed to Cloned : CLoading_Panel"); SAFE_RELEASE(pInstance); } return pInstance; } -void CMission::Free() +void CLoading_Panel::Free() { __super::Free(); - SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pTextureCom); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } -void CMission::Describe_Entity() +void CLoading_Panel::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp b/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp new file mode 100644 index 000000000..64d92d12a --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp @@ -0,0 +1,148 @@ +#include "pch.h" +#include "MiniMap_Panel.h" +#include "GameInstance.h" + +CMiniMap_Panel::CMiniMap_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CMiniMap_Panel::CMiniMap_Panel(const CMiniMap_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CMiniMap_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CMiniMap_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 300.f; + Desc.fY = 300.f; + Desc.fSizeX = 100.f; + Desc.fSizeY = 100.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + return S_OK; +} + +void CMiniMap_Panel::Priority_Update(_float fTimeDelta) +{ +} + +void CMiniMap_Panel::Update(_float fTimeDelta) +{ +} + +void CMiniMap_Panel::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); + } +} + +HRESULT CMiniMap_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CMiniMap_Panel::Get_WorldPostion() +{ + return m_pOwner->Get_WorldPostion(); +} + +HRESULT CMiniMap_Panel::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CMiniMap_Panel::Ready_Components(void* pArg) +{ + return S_OK; +} + +CMiniMap_Panel* CMiniMap_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMiniMap_Panel* pInstance = new CMiniMap_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMiniMap_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CMiniMap_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CMiniMap_Panel* pInstance = new CMiniMap_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMiniMap_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMiniMap_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pTextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CMiniMap_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp b/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp index a3f9f7f54..2fb42410b 100644 --- a/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp +++ b/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp @@ -1,9 +1,6 @@ #include "pch.h" #include "MissionBanner_Key.h" #include "GameInstance.h" -#include "Mission_KeyHold.h" -#include "Mission_Key.h" -#include "Active_Icon.h" CMissionBanner_Key::CMissionBanner_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CUIObject(pDevice, pContext) @@ -121,18 +118,6 @@ HRESULT CMissionBanner_Key::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMission_KeyHold))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMission_Key))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pActive_Icon))) - { - return E_FAIL; - } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp b/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp new file mode 100644 index 000000000..6dc8ad397 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp @@ -0,0 +1,181 @@ +#include "pch.h" +#include "Mission_Panel.h" +#include "GameInstance.h" +#include "Mission_KeyHold.h" +#include "Mission_Key.h" +#include "Active_Icon.h" +#include "MissionBanner_Key.h" + +CMission_Panel::CMission_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CMission_Panel::CMission_Panel(const CMission_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CMission_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CMission_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 300.f; + Desc.fY = 300.f; + Desc.fSizeX = 100.f; + Desc.fSizeY = 100.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + return S_OK; +} + +void CMission_Panel::Priority_Update(_float fTimeDelta) +{ +} + +void CMission_Panel::Update(_float fTimeDelta) +{ +} + +void CMission_Panel::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius()); + } +} + +HRESULT CMission_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CMission_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CMission_Panel::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CMission_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast(&m_pTextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMission_KeyHold))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMission_Key))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pActive_Icon))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMissionBanner_Key))) + { + return E_FAIL; + } + return S_OK; +} + +CMission_Panel* CMission_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMission_Panel* pInstance = new CMission_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMission_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CMission_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CMission_Panel* pInstance = new CMission_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMission_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMission_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pTextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CMission_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Mouse_Cursor.cpp b/Jusin154_Team3D/Editor/Private/Mouse_Cursor.cpp index 93c9e4d9c..7731781d4 100644 --- a/Jusin154_Team3D/Editor/Private/Mouse_Cursor.cpp +++ b/Jusin154_Team3D/Editor/Private/Mouse_Cursor.cpp @@ -48,7 +48,7 @@ void CMouse_Cursor::Priority_Update(_float fTimeDelta) void CMouse_Cursor::Update(_float fTimeDelta) { m_fTime += fTimeDelta; - ShowCursor(false); + //ShowCursor(false); } void CMouse_Cursor::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Editor/Public/Dummy_PhysXBox.h b/Jusin154_Team3D/Editor/Public/Dummy_PhysXBox.h new file mode 100644 index 000000000..706670cd6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Dummy_PhysXBox.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CModel; +class CShader; +class CRigidBody; +NS_END + +NS_BEGIN(Editor) + +class CDummy_PhysXBox final : public CGameObject +{ +public: + typedef struct tagBoxStartPos + { + _float3 vPos = {}; + _float3 vRotRPY = {}; + }BOXSTARTPOS_DESC; +private: + CDummy_PhysXBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDummy_PhysXBox(const CDummy_PhysXBox& rhs); + virtual ~CDummy_PhysXBox() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CRigidBody* m_pRigidBody = { nullptr }; + const PSX::PxRigidDynamic* m_pActor = { nullptr }; + //CModel* m_pModelCom = { nullptr }; + //CShader* m_pShaderCom = { nullptr }; + + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Bind_ShaderResources() override; + +public: + static CDummy_PhysXBox* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Dummy_PhysXMesh.h b/Jusin154_Team3D/Editor/Public/Dummy_PhysXMesh.h new file mode 100644 index 000000000..c667ebe37 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Dummy_PhysXMesh.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CModel; +class CShader; +class CRigidBody; +NS_END + +NS_BEGIN(Editor) + +class CDummy_PhysXMesh final : public CGameObject +{ +public: + typedef struct tagBoxStartPos + { + _float3 vPos = {}; + _float3 vRotRPY = {}; + }BOXSTARTPOS_DESC; +private: + CDummy_PhysXMesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDummy_PhysXMesh(const CDummy_PhysXMesh& rhs); + virtual ~CDummy_PhysXMesh() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CRigidBody* m_pRigidBody = { nullptr }; + const PSX::PxRigidDynamic* m_pActor = { nullptr }; + //CModel* m_pModelCom = { nullptr }; + //CShader* m_pShaderCom = { nullptr }; + + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Bind_ShaderResources() override; + +public: + static CDummy_PhysXMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 64370a8f8..f8b31c8d5 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -11,7 +11,7 @@ namespace Editor const unsigned int g_iWinSizeX = 1920; const unsigned int g_iWinSizeY = 1080; - enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, OBJECT, MAP,UI, EFFECT, END }; + enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, OBJECT, MAP,UI, EFFECT, PHYSX, END }; enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END }; enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END }; diff --git a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h new file mode 100644 index 000000000..92c5bf28c --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Editor_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CGamePlay_Canvas final : public CCanvasObject +{ +private: + CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CGamePlay_Canvas(const CGamePlay_Canvas& rhs); + virtual ~CGamePlay_Canvas() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Panel(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + void Clear_Penel(); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + //CGameObject* Mission_Panel = { nullptr }; + //CGameObject* Minimap_Panel = { nullptr }; + CGameObject* Loading_Panel = { nullptr }; + +public: + static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/IMGUIUI.h b/Jusin154_Team3D/Editor/Public/IMGUIUI.h new file mode 100644 index 000000000..f257384ca --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/IMGUIUI.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CIMGUIUI final : public CGameObject +{ +public: + CIMGUIUI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CIMGUIUI(const CIMGUIUI& rhs); + virtual ~CIMGUIUI() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CGameObject* m_pGamePlay_Canvas = { nullptr }; + CGameObject* m_pPanelObject = { nullptr }; + CGameObject* m_pElementObject = { nullptr }; + _float2 m_fPos{}; + _float2 m_fSize{}; + _float3 m_fSizeXY{}; + _float m_fTimeMult{}; + +public: + static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Level_PhysXLab.h b/Jusin154_Team3D/Editor/Public/Level_PhysXLab.h index f01c7977b..2bca2fc94 100644 --- a/Jusin154_Team3D/Editor/Public/Level_PhysXLab.h +++ b/Jusin154_Team3D/Editor/Public/Level_PhysXLab.h @@ -1,5 +1,32 @@ #pragma once -class CLevel_PhysXLab + +#include "Editor_Define.h" +#include "Level.h" + +NS_BEGIN(Editor) + +class CLevel_PhysXLab final : public CLevel { +private: + CLevel_PhysXLab(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual ~CLevel_PhysXLab() = default; + +public: + virtual void Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize() override; + HRESULT Ready_Layer_Light(); + HRESULT Ready_Layer_Camera(const _wstring& strLayerTag); + HRESULT Ready_Layer_Terrain(const _wstring& strLayerTag); + HRESULT Ready_Layer_PhysXObjects(const _wstring& strLayerTag); + + + +public: + static CLevel_PhysXLab* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual void Free() override; }; +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Loader.h b/Jusin154_Team3D/Editor/Public/Loader.h index bef28bb73..9546ada00 100644 --- a/Jusin154_Team3D/Editor/Public/Loader.h +++ b/Jusin154_Team3D/Editor/Public/Loader.h @@ -47,6 +47,7 @@ class CLoader final : public CBase HRESULT Loading_For_MapViewer(); HRESULT Loading_For_UI(); HRESULT Loading_For_Effect(); + HRESULT Loading_For_PhysXLevel(); private: HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent); diff --git a/Jusin154_Team3D/Editor/Public/LodingWidget1.h b/Jusin154_Team3D/Editor/Public/LoadingWidget.h similarity index 75% rename from Jusin154_Team3D/Editor/Public/LodingWidget1.h rename to Jusin154_Team3D/Editor/Public/LoadingWidget.h index a87244708..e0f15fea0 100644 --- a/Jusin154_Team3D/Editor/Public/LodingWidget1.h +++ b/Jusin154_Team3D/Editor/Public/LoadingWidget.h @@ -1,16 +1,16 @@ #pragma once #include "Editor_Define.h" -#include "UIObject.h" +#include "ElementObject.h" NS_BEGIN(Editor) -class CLodingWidget1 final : public CUIObject +class CLoadingWidget final : public CElementObject { private: - CLodingWidget1(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CLodingWidget1(const CLodingWidget1& rhs); - virtual ~CLodingWidget1() = default; + CLoadingWidget(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoadingWidget(const CLoadingWidget& rhs); + virtual ~CLoadingWidget() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -34,7 +34,7 @@ class CLodingWidget1 final : public CUIObject _int m_iImageFrameX{}; _float m_fFrame{}; public: - static CLodingWidget1* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CLoadingWidget* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/LoadingWidget_Flame.h b/Jusin154_Team3D/Editor/Public/LoadingWidget_Flame.h new file mode 100644 index 000000000..118d5e576 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/LoadingWidget_Flame.h @@ -0,0 +1,43 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CLoadingWidget_Flame final : public CElementObject +{ +private: + CLoadingWidget_Flame(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoadingWidget_Flame(const CLoadingWidget_Flame& rhs); + virtual ~CLoadingWidget_Flame() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pTextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iImageFrameX{}; + _float m_fFrame{}; +public: + static CLoadingWidget_Flame* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Loading_Panel.h b/Jusin154_Team3D/Editor/Public/Loading_Panel.h new file mode 100644 index 000000000..335c7f0a7 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Loading_Panel.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CLoading_Panel final : public CPanelObject +{ +private: + CLoading_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoading_Panel(const CLoading_Panel& rhs); + virtual ~CLoading_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pTextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pMission_KeyHold = { nullptr }; + CGameObject* m_pMission_Key = { nullptr }; + CGameObject* m_pActive_Icon = { nullptr }; + CGameObject* m_pMissionBanner_Key = { nullptr }; + +public: + static CLoading_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Public/Mission.h b/Jusin154_Team3D/Editor/Public/MiniMap_Panel.h similarity index 66% rename from Jusin154_Team3D/Editor/Public/Mission.h rename to Jusin154_Team3D/Editor/Public/MiniMap_Panel.h index 370cdb42b..367943276 100644 --- a/Jusin154_Team3D/Editor/Public/Mission.h +++ b/Jusin154_Team3D/Editor/Public/MiniMap_Panel.h @@ -1,16 +1,20 @@ #pragma once #include "Editor_Define.h" -#include "UIObject.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END NS_BEGIN(Editor) -class CMission final : public CUIObject +class CMiniMap_Panel final : public CPanelObject { private: - CMission(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CMission(const CMission& rhs); - virtual ~CMission() = default; + CMiniMap_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMiniMap_Panel(const CMiniMap_Panel& rhs); + virtual ~CMiniMap_Panel() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -26,13 +30,12 @@ class CMission final : public CUIObject virtual HRESULT Initialize(void* pArg) override; private: - CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pTextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - public: - static CMission* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CMiniMap_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/MissionBanner_Key.h b/Jusin154_Team3D/Editor/Public/MissionBanner_Key.h index 01d2b5ab3..83d353aea 100644 --- a/Jusin154_Team3D/Editor/Public/MissionBanner_Key.h +++ b/Jusin154_Team3D/Editor/Public/MissionBanner_Key.h @@ -30,9 +30,6 @@ class CMissionBanner_Key final : public CUIObject CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - class CGameObject* m_pMission_KeyHold = { nullptr }; - class CGameObject* m_pMission_Key = { nullptr }; - class CGameObject* m_pActive_Icon = { nullptr }; public: static CMissionBanner_Key* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Mission_Panel.h b/Jusin154_Team3D/Editor/Public/Mission_Panel.h new file mode 100644 index 000000000..bf3e11768 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Mission_Panel.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CMission_Panel final : public CPanelObject +{ +private: + CMission_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMission_Panel(const CMission_Panel& rhs); + virtual ~CMission_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pTextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pMission_KeyHold = { nullptr }; + CGameObject* m_pMission_Key = { nullptr }; + CGameObject* m_pActive_Icon = { nullptr }; + CGameObject* m_pMissionBanner_Key = { nullptr }; + +public: + static CMission_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index 8b54ae9b8..8ea9ad4ea 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -170,6 +170,7 @@ + @@ -182,6 +183,7 @@ + @@ -246,6 +248,7 @@ + Create @@ -382,6 +385,7 @@ + @@ -415,6 +419,7 @@ + @@ -461,6 +466,7 @@ + diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index ee6c32a71..f1f28be21 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -238,9 +238,18 @@ {5c89d610-7e57-40a5-bc65-04e5fa25df89} - + {b20c0397-6254-4350-bc83-ee695f9fd012} + + {bbebaf10-533c-4485-88e1-1c141801ef83} + + + {0162c52f-875b-41fd-9f9b-abd68e8483f2} + + + {1eafb189-2d0c-4ad7-8690-10a517668206} + @@ -445,7 +454,16 @@ 02.Element\02.Component\02.VIBuffer\Terrain - 03.Management\21.PhysX_Manager\CCT + 02.Element\02.Component\08.Character_Controller + + + 02.Element\01.GameObject\50.UI\CanvasObject + + + 02.Element\01.GameObject\50.UI\ElementObject + + + 02.Element\01.GameObject\50.UI\PanelObject @@ -1017,7 +1035,16 @@ 02.Element\02.Component\07.RigidBody - 03.Management\21.PhysX_Manager\CCT + 02.Element\02.Component\08.Character_Controller + + + 02.Element\01.GameObject\50.UI\CanvasObject + + + 02.Element\01.GameObject\50.UI\ElementObject + + + 02.Element\01.GameObject\50.UI\PanelObject diff --git a/Jusin154_Team3D/Engine/Private/CanvasObject.cpp b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp new file mode 100644 index 000000000..bb5819182 --- /dev/null +++ b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp @@ -0,0 +1,116 @@ +#include "pch.h" +#include "CanvasObject.h" + +CCanvasObject::CCanvasObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CUIObject{ pDevice, pContext } +{ +} + +CCanvasObject::CCanvasObject(const CCanvasObject& rhs) + : CUIObject(rhs) +{ +} + +_vector CCanvasObject::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CCanvasObject::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCanvasObject::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + { + return E_FAIL; + } + return S_OK; +} + +void CCanvasObject::Priority_Update(_float fTimeDelta) +{ +} + +void CCanvasObject::Update(_float fTimeDelta) +{ + m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f); + m_pTransformCom->Set_Scale(m_vScale); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f)); + + m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f); +} + +void CCanvasObject::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CCanvasObject::Render() +{ + return S_OK; +} + +HRESULT CCanvasObject::Ready_Components(void* pArg) +{ + __super::Ready_Components(pArg); + return S_OK; +} + +HRESULT CCanvasObject::Ready_Panel(void* pArg) +{ + return S_OK; +} + +void CCanvasObject::Visible(_bool bVisible) +{ + if (m_Panels.empty()) + { + return; + } + + for (auto iter : m_Panels) + { + static_cast(iter)->Visible(bVisible); + } +} + +CGameObject* CCanvasObject::Get_Panel(const wstring& Name) +{ + return Find_Panel(Name); +} + +void CCanvasObject::Add_Panel(wstring Name, CGameObject* pPanel) +{ + if (pPanel == nullptr) + { + return; + } + + if (Find_Panel(Name) != nullptr) + { + return; + } + + m_Panels.push_back(pPanel); + m_Panels_map.emplace(Name, pPanel); +} + +CGameObject* CCanvasObject::Find_Panel(const wstring& Name) +{ + auto iter = m_Panels_map.find(Name); + + if (iter == m_Panels_map.end()) + return nullptr; + + return iter->second; +} + +void CCanvasObject::Free() +{ + __super::Free(); + + m_Panels.clear(); +} diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp new file mode 100644 index 000000000..09447652e --- /dev/null +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -0,0 +1,75 @@ +#include "pch.h" +#include "ElementObject.h" + +CElementObject::CElementObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CUIObject{ pDevice, pContext } +{ +} + +CElementObject::CElementObject(const CElementObject& rhs) + : CUIObject(rhs) +{ +} + +HRESULT CElementObject::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CElementObject::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + return S_OK; +} + +void CElementObject::Priority_Update(_float fTimeDelta) +{ + CTransform* pOwnerTransform = m_pOwner->Get_Component(); +} + +void CElementObject::Update(_float fTimeDelta) +{ + m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f); + m_pTransformCom->Set_Scale(m_vScale); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f) * m_pOwner->Get_WorldPostion()); + + m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f); +} + +void CElementObject::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CElementObject::Render() +{ + return S_OK; +} + +_vector CElementObject::Get_WorldPostion() +{ + return m_pOwner->Get_WorldPostion(); +} + +HRESULT CElementObject::Ready_Components(void* pArg) +{ + __super::Ready_Components(pArg); + return S_OK; +} + +void CElementObject::Visible(_bool bVisible) +{ + Set_Visible(bVisible); +} + +void CElementObject::Free() +{ + __super::Free(); +} diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index ad9b1f821..84e655881 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -90,10 +90,10 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De if (nullptr == m_pCollider_Manager) { return E_FAIL; } - //m_pPhysX_Manager = CPhysX_Manager::Create(*ppDevice, *ppContext); - //if (nullptr == m_pPhysX_Manager) { - // return E_FAIL; - //} + m_pPhysX_Manager = CPhysX_Manager::Create(*ppDevice, *ppContext); + if (nullptr == m_pPhysX_Manager) { + return E_FAIL; + } return S_OK; } @@ -117,7 +117,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta) m_pLevel_Manager->Update(fTimeDelta); m_pObject_Manager->Clear_DeadObj(); - //m_pPhysX_Manager->Update(fTimeDelta); + m_pPhysX_Manager->Update(fTimeDelta); //m_pObstacle_Manager->Refresh_Region(); } diff --git a/Jusin154_Team3D/Engine/Private/GameObject.cpp b/Jusin154_Team3D/Engine/Private/GameObject.cpp index 48ddbc7ba..df233fc89 100644 --- a/Jusin154_Team3D/Engine/Private/GameObject.cpp +++ b/Jusin154_Team3D/Engine/Private/GameObject.cpp @@ -78,7 +78,7 @@ HRESULT CGameObject::Add_Asset_Component(_uint iTargetLevel, const _wstring strP if (ppOut != nullptr) { *ppOut = pComponent; - Safe_AddRef(pComponent); + SAFE_ADDREF(pComponent); } diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 6ca5896fa..acef45a16 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -827,13 +827,25 @@ HRESULT CModel::Initialize_Prototype() HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix) { - if (!LoadData(pModelFilePath)) + _char szTextureFileName[MAX_PATH] = {}; + _char szDir[MAX_PATH] = {}; + _char szName[MAX_PATH] = {}; + _char szEXT[MAX_PATH] = {}; + _splitpath_s(pModelFilePath, nullptr, 0, szDir, MAX_PATH, szName, MAX_PATH, szEXT, MAX_PATH); + + if (strcmp(".bin", szEXT) == 0) + { + LoadData(pModelFilePath); + } + else if (strcmp(".fbx", szEXT) == 0) { _char Temp[256]; - strcpy_s(Temp, pModelFilePath); - strcat_s(Temp,".fbx"); - Assimp_Model_Load(Temp, eType, PreTransformMatrix, 0); - SaveAssimpModel(pModelFilePath); + strcpy_s(Temp, szDir); + strcat_s(Temp, szName); + strcat_s(Temp, ".bin"); + Assimp_Model_Load(pModelFilePath, eType, PreTransformMatrix, 0); + SaveAssimpModel(Temp); + return S_OK; } m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath); diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp new file mode 100644 index 000000000..108996ba2 --- /dev/null +++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp @@ -0,0 +1,138 @@ +#include "pch.h" +#include "PanelObject.h" + +CPanelObject::CPanelObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CUIObject{ pDevice, pContext } +{ +} + +CPanelObject::CPanelObject(const CPanelObject& rhs) + : CUIObject(rhs) +{ +} + +_vector CPanelObject::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CPanelObject::Priority_Update(_float fTimeDelta) +{ + CTransform* pOwnerTransform = m_pOwner->Get_Component(); +} + +void CPanelObject::Update(_float fTimeDelta) +{ + m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f); + m_pTransformCom->Set_Scale(m_vScale); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( + m_fX + m_pOwner->Get_WorldPostion().m128_f32[0], + -m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], + 0.f, 1.f)); + + m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f); +} + +void CPanelObject::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CPanelObject::Render() +{ + return E_NOTIMPL; +} + +HRESULT CPanelObject::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CPanelObject::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CPanelObject::Ready_Components(void* pArg) +{ + __super::Ready_Components(pArg); + return S_OK; +} + +HRESULT CPanelObject::Ready_Panel(void* pArg) +{ + return S_OK; +} + +void CPanelObject::MoveX(_float fX) +{ + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( + fX - m_fWinSizeX * 0.5f, + -m_fY + m_fWinSizeY * 0.5f, + 0.f, 1.f)); +} + +void CPanelObject::MoveY(_float fY) +{ + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( + m_fX - m_fWinSizeX * 0.5f, + -fY + m_fWinSizeY * 0.5f, + 0.f, 1.f)); +} + +void CPanelObject::Visible(_bool bVisible) +{ + if (m_Elements.empty()) + return; + + for (auto iter : m_Elements) + { + static_cast(iter)->Visible(bVisible); + } +} + +CGameObject* CPanelObject::Get_Element(const wstring& Name) +{ + return Find_Element(Name); +} + +void CPanelObject::Move_Panel(_float fX, _float fY) +{ +} + +void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel) +{ + if (pPanel == nullptr) + { + return; + } + + if (Find_Element(Name) != nullptr) + { + return; + } + + m_Elements.push_back(pPanel); + m_Elements_map.emplace(Name, pPanel); +} + +CGameObject* CPanelObject::Find_Element(const wstring& Name) +{ + auto iter = m_Elements_map.find(Name); + + if (iter == m_Elements_map.end()) + return nullptr; + + return iter->second; +} + +void CPanelObject::Free() +{ + __super::Free(); +} diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 927708fda..7cb66e0dd 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -10,8 +10,10 @@ static PSX::PxTransform XMWorldToPx(const _matrix& WorldMatrix) _vector vPos, vRotq, vScale; XMMatrixDecompose(&vScale, &vRotq, &vPos, WorldMatrix); + vRotq = XMQuaternionNormalize(vRotq); + PSX::PxTransform out; - XMStoreFloat3((_float3*)&out.p, WorldMatrix.r[3]); + XMStoreFloat3((_float3*)&out.p, vPos); XMStoreFloat4((_float4*)&out.q, vRotq); return out; @@ -78,13 +80,15 @@ const PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody& RigidBody) } - PSX::PxRigidStatic* pActor = m_pPhysics->createRigidStatic(pxWorldMatrix); pPxMeshGeometry; + PSX::PxRigidStatic* pActor = m_pPhysics->createRigidStatic(pxWorldMatrix); PSX::PxShape* pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActor, *pPxMeshGeometry, *RigidBody.Get_PxMaterial()); pShape->setFlag(PSX::PxShapeFlag::eSCENE_QUERY_SHAPE, true); pShape->setFlag(PSX::PxShapeFlag::eSIMULATION_SHAPE, true); - - pActor->attachShape(*pShape); + + pActor->userData = &RigidBody; + m_RigidBodys.emplace_back(&RigidBody, pActor); + m_pScene->addActor(*pActor); return pActor; } @@ -133,9 +137,9 @@ HRESULT CPhysX_Manager::Create_TriangleMesh(const _wstring& wstrMeshKey, CMesh* return E_FAIL; } -PSX::PxTriangleMesh* CPhysX_Manager::Find_TriangleMesh(const _wstring& wstrFilePath) +PSX::PxTriangleMesh* CPhysX_Manager::Find_TriangleMesh(const _wstring& wstrMeshKey) { - map<_wstring, PSX::PxTriangleMesh*>::iterator iter = m_TriangleMeshes.find(wstrFilePath); + map<_wstring, PSX::PxTriangleMesh*>::iterator iter = m_TriangleMeshes.find(wstrMeshKey); if (iter != m_TriangleMeshes.end()) { return iter->second; } @@ -186,6 +190,9 @@ void CPhysX_Manager::Update_Dynamic() PSX::PxRigidDynamic* pActorDynamic = ppActiveActors[i]->is(); if (nullptr != pActorDynamic) { + if (nullptr == ppActiveActors[i]->userData) { + continue; + } CTransform* pTransform = ((CRigidBody*)ppActiveActors[i]->userData)->Get_PxTransformPtr(); PSX::PxTransform pPrevPxTransform; @@ -220,13 +227,13 @@ PSX::PxController* CPhysX_Manager::Add_BoxController(PSX::PxBoxControllerDesc& D PSX::PxController* pController = { nullptr }; pController = m_pCCTManager->createController(Desc); - //pController-> + return pController; } PSX::PxController* CPhysX_Manager::Get_Controller(_uint iControllerIndex) { - return nullptr; + return m_pCCTManager->getController((PSX::PxU32)iControllerIndex); } void CPhysX_Manager::ReleaseController(_uint iControllerIndex) @@ -253,7 +260,6 @@ HRESULT CPhysX_Manager::PurgeAllController() HRESULT CPhysX_Manager::Initialize() { - m_pFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, m_AllocatorCallBack, m_ErrorCallBack); if (nullptr == m_pFoundation) { assert(false); @@ -266,17 +272,23 @@ HRESULT CPhysX_Manager::Initialize() { // 씬 세팅 - m_ToleranceScale.length = 1.f; - m_ToleranceScale.speed = GRAVITY; + m_ToleranceScale.length = 1.f; // 1 meter + m_ToleranceScale.speed = GRAVITY; // + m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true, m_pPvd); m_pCookingParam = new PSX::PxCookingParams(m_pPhysics->getTolerancesScale()); PSX::PxSceneDesc sceneDesc = { m_pPhysics->getTolerancesScale() }; - sceneDesc.gravity = PSX::PxVec3(0.f, GRAVITY, 0.f); + sceneDesc.gravity = PSX::PxVec3(0.f, -GRAVITY, 0.f); - sceneDesc.cpuDispatcher = m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(2/*cpu 코어 갯수*/); + m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(2/*cpu 코어 갯수*/); + if (nullptr == m_pDispatcher) { + assert(false); + return E_FAIL; + } + sceneDesc.cpuDispatcher = m_pDispatcher; sceneDesc.filterShader = PSX::PxDefaultSimulationFilterShader; @@ -298,26 +310,47 @@ HRESULT CPhysX_Manager::Initialize() pPvdClient->setScenePvdFlag(PSX::PxPvdSceneFlag::eTRANSMIT_SCENEQUERIES, true); } + //physx::PxMaterial* pMaterial = m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f); + //physx::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *pMaterial); + //m_pScene->addActor(*pGroundPlane); + + //{ + + // float halfExtent = .5f; + // physx::PxShape* shape = m_pPhysics->createShape(physx::PxSphereGeometry(halfExtent), *pMaterial); + // physx::PxU32 size = 100; + // physx::PxTransform pxTransform(physx::PxVec3(0)); + + // for (physx::PxU32 i = 0; i < size; i++) { + // for (physx::PxU32 j = 0; j < size - i; j++) { + // physx::PxTransform localTm(physx::PxVec3(physx::PxReal(j * 2) - physx::PxReal(size - i) + 100, physx::PxReal(i * 2 + 1), 0) * halfExtent); + // physx::PxRigidDynamic* body = m_pPhysics->createRigidDynamic(pxTransform.transform(localTm)); + // body->attachShape(*shape); + // physx::PxRigidBodyExt::updateMassAndInertia(*body, 10.0f); + // m_pScene->addActor(*body); + // } + // } + //} + return S_OK; } HRESULT CPhysX_Manager::Connect_DebugServer() { // 네트워크 디버거 전송객체 생성 - PSX::PxPvdTransport* pTransport = PSX::PxDefaultPvdSocketTransportCreate("127.0.0.1", 5425, 10); - if (nullptr == pTransport) { + m_pTransport = PSX::PxDefaultPvdSocketTransportCreate("127.0.0.1", 5425, 10); + if (nullptr == m_pTransport) { assert(false); return E_FAIL; } m_pPvd = PSX::PxCreatePvd(*m_pFoundation); if (nullptr == m_pPvd) { - pTransport->release(); + m_pTransport->release(); assert(false); return E_FAIL; } - m_pPvd->connect(*pTransport, PSX::PxPvdInstrumentationFlag::eALL); - pTransport->release(); + m_pPvd->connect(*m_pTransport, PSX::PxPvdInstrumentationFlag::eALL); return S_OK; } @@ -365,11 +398,14 @@ void CPhysX_Manager::Free() m_pPvd->release(); m_pPvd = nullptr; } + if (nullptr != m_pTransport) { + m_pTransport->release(); m_pTransport = nullptr; + } + if (nullptr != m_pFoundation) { m_pFoundation->release(); m_pFoundation = nullptr; } - __super::Free(); SAFE_RELEASE(m_pDevice); diff --git a/Jusin154_Team3D/Engine/Private/RigidBody.cpp b/Jusin154_Team3D/Engine/Private/RigidBody.cpp index 36c12bb51..2ac92547e 100644 --- a/Jusin154_Team3D/Engine/Private/RigidBody.cpp +++ b/Jusin154_Team3D/Engine/Private/RigidBody.cpp @@ -6,8 +6,6 @@ CRigidBody::CRigidBody(ID3D11Device* pDevice, ID3D11DeviceContext* pContext): CComponent(pDevice, pContext) { - SAFE_ADDREF(pDevice); - SAFE_ADDREF(pContext); } CRigidBody::CRigidBody(const CRigidBody& rhs): @@ -16,10 +14,11 @@ CRigidBody::CRigidBody(const CRigidBody& rhs): m_eActorType(rhs.m_eActorType), m_vhalfGeometryInfo(rhs.m_vhalfGeometryInfo), m_pShape(rhs.m_pShape), - m_pMeshKey(rhs.m_pMeshKey) + m_pMeshKey(rhs.m_pMeshKey), + m_bExclusive(rhs.m_bExclusive), + m_bKinematic(rhs.m_bKinematic) { - m_pMaterial->acquireReference(); - m_pShape->acquireReference(); + } HRESULT CRigidBody::Initialize_Prototype(RIGIDBODY_PROTOTYPEDESC& Desc) @@ -32,7 +31,8 @@ HRESULT CRigidBody::Initialize_Prototype(RIGIDBODY_PROTOTYPEDESC& Desc) case ACTOR::SPHERE: m_pMaterial = m_pGameInstance->Get_Material(Desc.tRigidDynamicDesc.vMatInfo); m_vhalfGeometryInfo = Desc.tRigidDynamicDesc.vhalfGeometryInfo; - m_pShape = m_pGameInstance->Create_Shape(m_eActorType, m_vhalfGeometryInfo, *m_pMaterial, Desc.tRigidDynamicDesc.bExclusive, Desc.tRigidDynamicDesc.ePxShapeFlag); + m_bExclusive = Desc.tRigidDynamicDesc.bExclusive; + m_pShape = m_pGameInstance->Create_Shape(m_eActorType, m_vhalfGeometryInfo, *m_pMaterial, m_bExclusive, Desc.tRigidDynamicDesc.ePxShapeFlag); if (nullptr == m_pShape) { assert(false); m_pMaterial->release(); @@ -54,7 +54,6 @@ HRESULT CRigidBody::Initialize_Prototype(RIGIDBODY_PROTOTYPEDESC& Desc) default: break; } - return S_OK; } @@ -65,6 +64,9 @@ HRESULT CRigidBody::Initialize(void* pArg) if (FAILED(__super::Initialize(pArg))) { return E_FAIL; } + if (true == m_bExclusive) { + return E_FAIL; + } m_pTransform = m_pOwner->Get_Component(); SAFE_ADDREF(m_pTransform); @@ -75,7 +77,7 @@ HRESULT CRigidBody::Initialize(void* pArg) case Engine::ACTOR::CAPSULE: case Engine::ACTOR::SPHERE: m_fDensity = pDesc->tRigidDynamicDesc.fDensity; - m_bKenematic = pDesc->tRigidDynamicDesc.bIsKinematic; + m_bKinematic = pDesc->tRigidDynamicDesc.bIsKinematic; m_pRigidBody = m_pGameInstance->Add_DynamicActor(*this); break; case Engine::ACTOR::PLANE: @@ -124,15 +126,6 @@ void CRigidBody::Free() { __super::Free(); - if (nullptr != m_pMaterial) { - m_pMaterial->release(); - m_pMaterial = nullptr; - } - if (nullptr != m_pShape) { - m_pShape->release(); - m_pShape = nullptr; - } - SAFE_RELEASE(m_pTransform); } diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index cf869c577..463c7a933 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -43,6 +43,9 @@ HRESULT CUIObject::Initialize(void* pArg) m_fSizeX = pDesc->fSizeX; m_fSizeY = pDesc->fSizeY; + m_fOrigin_Posigion = _float2(pDesc->fX, pDesc->fY); + + m_fWinSizeX = ViewportDesc.Width; m_fWinSizeY = ViewportDesc.Height; @@ -69,12 +72,14 @@ HRESULT CUIObject::Initialize(void* pArg) pDesc->fY + ViewportDesc.Height * 0.5f, 0.f, 1.f)); + m_fOrigin_Size = m_vScale; + // 직교 투영을 하기 위해서 먼저 뷰 행렬을 항등 행렬로 바꿔준다. XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity()); // 이제 투영 행렬을 직교 투영 행렬로 바꿔 주는데 화면의 사이즈를 받고 near 0 far 1로 // 설정을 한다. - XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(ViewportDesc.Width,ViewportDesc.Height, 0.f, 1.f)); + XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(ViewportDesc.Width, ViewportDesc.Height, 0.f, 1.f)); m_bVisible = true; @@ -89,6 +94,13 @@ void CUIObject::Priority_Update(_float fTimeDelta) void CUIObject::Update(_float fTimeDelta) { + m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f); + m_pTransformCom->Set_Scale(m_vScale); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f,-m_fY + m_fWinSizeY * 0.5f,0.f, 1.f)); + + m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f); + } void CUIObject::Late_Update(_float fTimeDelta) @@ -108,21 +120,68 @@ HRESULT CUIObject::Ready_Components(void* pArg) _vector CUIObject::Get_WorldPostion() { - return m_pOwner->Get_WorldPostion(); } -void CUIObject::Move_vector(_fvector vPos) +void CUIObject::MoveX(_float fX) { - m_pTransformCom->Set_State(STATE::POSITION, vPos); + m_fX = fX; } -void CUIObject::Move_float2(_float fX, _float fY) +void CUIObject::MoveY(_float fY) { - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( - fX - m_fWinSizeX * 0.5f, - -fY + m_fWinSizeY * 0.5f, - 0.f, 1.f)); + m_fY = fY; +} + +void CUIObject::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; +} + +void CUIObject::SizeUpdate_float(_float3 fSizeXY) +{ + m_fSizeX = fSizeXY.x; + m_fSizeY = fSizeXY.y; +} + +void CUIObject::Set_TimeMult(_float Mult) +{ + m_fTimeMult = Mult; +} + +_float CUIObject::Get_TimeMult() +{ + return m_fTimeMult; +} + +void CUIObject::Visible(_bool bVisible) +{ +} + +_bool CUIObject::Get_Visible() +{ + return m_bVisible; +} + +_float2 CUIObject::Get_Origin_Position() +{ + return m_fOrigin_Posigion; +} + +_vector CUIObject::Get_Current_Position() +{ + return m_fCurrent_Posigion; +} + +_float3 CUIObject::Get_Origin_Size() +{ + return m_fOrigin_Size; +} + +_float3 CUIObject::Get_Current_Size() +{ + return m_pTransformCom->Get_Scale(); } void CUIObject::Free() diff --git a/Jusin154_Team3D/Engine/Public/CanvasObject.h b/Jusin154_Team3D/Engine/Public/CanvasObject.h new file mode 100644 index 000000000..70fca8a8d --- /dev/null +++ b/Jusin154_Team3D/Engine/Public/CanvasObject.h @@ -0,0 +1,45 @@ +#pragma once + +#include "UIObject.h" + +NS_BEGIN(Engine) + +class ENGINE_DLL CCanvasObject abstract : public CUIObject +{ +protected: + CCanvasObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCanvasObject(const CCanvasObject& rhs); + virtual ~CCanvasObject() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual HRESULT Render(); + virtual void Late_Update(_float fTimeDelta); + virtual _vector Get_WorldPostion() override; + +protected: + virtual HRESULT Initialize_Prototype(); + virtual HRESULT Initialize(void* pArg); + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Panel(void* pArg); + +public: + virtual void Visible(_bool bVisible) override; + virtual class CGameObject* Get_Panel(const wstring& Name); + +protected: + virtual void Add_Panel(wstring Name, class CGameObject* pPanel); + +protected: + vector m_Panels; // 캔버스가 패널들을 관리 하기 위해서 필요함 + map m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서 + +private: + virtual class CGameObject* Find_Panel(const wstring& Name); + +public: + virtual void Free() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Public/ContainerObject.h b/Jusin154_Team3D/Engine/Public/ContainerObject.h index b9e0c94f2..0c9339555 100644 --- a/Jusin154_Team3D/Engine/Public/ContainerObject.h +++ b/Jusin154_Team3D/Engine/Public/ContainerObject.h @@ -50,8 +50,10 @@ class ENGINE_DLL CContainerObject abstract : public CGameObject SAFE_RELEASE(pPartObject); return E_FAIL; } - *ppOut = pPartObject; - SAFE_ADDREF(pPartObject); + if (nullptr != ppOut) { + *ppOut = pPartObject; + SAFE_ADDREF(pPartObject); + } return S_OK; } diff --git a/Jusin154_Team3D/Engine/Public/ElementObject.h b/Jusin154_Team3D/Engine/Public/ElementObject.h new file mode 100644 index 000000000..fcc41a28e --- /dev/null +++ b/Jusin154_Team3D/Engine/Public/ElementObject.h @@ -0,0 +1,33 @@ +#pragma once + +#include "UIObject.h" + +NS_BEGIN(Engine) + +class ENGINE_DLL CElementObject abstract : public CUIObject +{ +protected: + CElementObject(ID3D11Device * pDevice, ID3D11DeviceContext * pContext); + CElementObject(const CElementObject& rhs); + virtual ~CElementObject() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render(); + virtual _vector Get_WorldPostion() override; + +protected: + virtual HRESULT Initialize_Prototype(); + virtual HRESULT Initialize(void* pArg); + virtual HRESULT Ready_Components(void* pArg) override; + +public: + virtual void Visible(_bool bVisible) override; + +public: + virtual void Free() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index d037b4572..f25f1d8f5 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -79,7 +79,9 @@ //} #define FLT_EPSILON3 1.192092896e-03F #define FLT_EPSILON5 1.192092896e-05F -#define GRAVITY -9.81f + +// GRAVITY �쓬�닔 諛뺤쑝硫� �뵾吏곸뒪 濡쒕뱶 �떎�뙣�븿 +#define GRAVITY 9.81f constexpr unsigned int g_iMaxShadowWidth = 16384; constexpr unsigned int g_iMaxShadowHeight = 9216; diff --git a/Jusin154_Team3D/Engine/Public/PanelObject.h b/Jusin154_Team3D/Engine/Public/PanelObject.h new file mode 100644 index 000000000..880507d5a --- /dev/null +++ b/Jusin154_Team3D/Engine/Public/PanelObject.h @@ -0,0 +1,48 @@ +#pragma once + +#include "UIObject.h" + +NS_BEGIN(Engine) + +class ENGINE_DLL CPanelObject abstract : public CUIObject +{ +protected: + CPanelObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CPanelObject(const CPanelObject& rhs); + virtual ~CPanelObject() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render(); + virtual _vector Get_WorldPostion() override; + +protected: + virtual HRESULT Initialize_Prototype(); + virtual HRESULT Initialize(void* pArg); + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Panel(void* pArg); + +public: + virtual void MoveX(_float fX) override; + virtual void MoveY(_float fY) override; + virtual void Visible(_bool bVisible) override; + virtual class CGameObject* Get_Element(const wstring& Name); + virtual void Move_Panel(_float fX, _float fY); + +protected: + virtual void Add_Element(wstring Name, class CGameObject* pPanel); + +protected: + vector m_Elements; + map m_Elements_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서 + +private: + virtual class CGameObject* Find_Element(const wstring& Name); + +public: + virtual void Free() override; +}; + +NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index 04a3d2322..8d6a6eeed 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -27,7 +27,7 @@ class CPhysX_Manager final : public CBase PSX::PxShape* Create_Shape(ACTOR eType, _float3& vhalfGeometryInfo, PSX::PxMaterial& pxMaterial, _bool bExclusive, PSX::PxShapeFlags ePxShapeFlag); HRESULT Create_TriangleMesh(const _wstring& wstrMeshKey, CMesh* pMesh); - PSX::PxTriangleMesh* Find_TriangleMesh(const _wstring& wstrFilePath); + PSX::PxTriangleMesh* Find_TriangleMesh(const _wstring& wstrMeshKey); void Update(_float fTimeDelta); void ClearScene(); @@ -65,6 +65,8 @@ class CPhysX_Manager final : public CBase PSX::PxControllerManager* m_pCCTManager = { nullptr }; // 피직스 캐릭터 컨트롤러를 전부 추적하고 매니징함 PSX::PxPvd* m_pPvd = { nullptr }; // 피직스 시뮬레이션 디버깅을 위한 도구 PSX::PxCookingParams* m_pCookingParam = { nullptr }; + PSX::PxPvdTransport* m_pTransport = { nullptr }; + list> m_RigidBodys = { }; diff --git a/Jusin154_Team3D/Engine/Public/RigidBody.h b/Jusin154_Team3D/Engine/Public/RigidBody.h index 81fcb3941..06178f4b6 100644 --- a/Jusin154_Team3D/Engine/Public/RigidBody.h +++ b/Jusin154_Team3D/Engine/Public/RigidBody.h @@ -72,7 +72,7 @@ class ENGINE_DLL CRigidBody final : public CComponent const PSX::PxMaterial* Get_PxMaterial() const { return m_pMaterial; } _float Get_Density() const { return m_fDensity; } - _bool Is_Kinematic() const { return m_bKenematic; } + _bool Is_Kinematic() const { return m_bKinematic; } private: ACTOR m_eActorType = ACTOR::END; @@ -81,7 +81,8 @@ class ENGINE_DLL CRigidBody final : public CComponent PSX::PxShape* m_pShape = { nullptr }; // 피직스 객체의 모양 ( 머테리얼로 만들어짐 ) _float3 m_vhalfGeometryInfo = {}; CTransform* m_pTransform = { nullptr }; - _bool m_bKenematic = { false }; + _bool m_bKinematic = { false }; + _bool m_bExclusive = { false }; _float m_fDensity = { 1000.f }; const _tchar* m_pMeshKey = { nullptr }; diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index ec6d44ed2..540319df2 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -26,21 +26,37 @@ class ENGINE_DLL CUIObject abstract : public CGameObject virtual _vector Get_WorldPostion() override; public: - virtual void Move_vector(_fvector vPos); - virtual void Move_float2(_float fX, _float fY); + virtual void MoveX(_float fX); + virtual void MoveY(_float fY); + virtual void SizeUpdate(_float fSizeX, _float fSizeY); + virtual void SizeUpdate_float(_float3 fSizeXY); + virtual void Set_TimeMult(_float Mult); + virtual _float Get_TimeMult(); + + virtual void Visible(_bool bVisible); + virtual _bool Get_Visible(); +public: + virtual _float2 Get_Origin_Position(); // Start Position + virtual _vector Get_Current_Position(); // Current Position + virtual _float3 Get_Origin_Size(); // Start Size + virtual _float3 Get_Current_Size(); // Current Size protected: - _float4x4 m_ViewMatrix{}; + _float2 m_fOrigin_Posigion{}; + _vector m_fCurrent_Posigion{}; + _float3 m_fOrigin_Size{}; + +protected: + _float4x4 m_ViewMatrix{}; // 직교를 하기 위해서 필요 _float4x4 m_ProjMatrix{}; - - _bool m_bActive = { false }; - _bool m_bHover = { false }; - - _float m_fX{}, m_fY{}, m_fSizeX{}, m_fSizeY{}; + _float m_fX{}, m_fY{}, m_fSizeX{}, m_fSizeY{}; _float m_fWinSizeX{}, m_fWinSizeY{}; - _float m_fTime{}; - _float3 m_vScale{}; + _bool m_bHover = { false }; // UI들 위에 마우스가 올라가 있는지 확인 + + _float m_fTime{}; // 캔버스는 아니더라도 패널전체랑 Element들은 필요함 + _float m_fTimeMult{1.f}; // 애니메이션 속도를 조절하기 위해서 필요 + _float3 m_vScale{}; // UI의 스케일을 조절하기 위해서 필요함 RECT m_pRect{};