From 1021970609297b2360ca0f07a11d192bd8b9daa7 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 20 Nov 2025 19:36:53 +0900 Subject: [PATCH] [initial Comiit] --- Jusin154_Team3D/Client/Default/Client.vcxproj | 18 +- .../Client/Default/Client.vcxproj.filters | 75 +++++++++ .../Client/Private/Camera_Debug.cpp | 156 ++++++++++++++++++ .../Client/Private/Information.cpp | 33 ++++ .../Client/Private/Level_Field.cpp | 114 +++++++++++++ .../Client/Private/Level_GamePlay.cpp | 36 ++-- .../Client/Private/Level_Restart.cpp | 51 ++++++ Jusin154_Team3D/Client/Private/Light_Main.cpp | 116 +++++++++++++ Jusin154_Team3D/Client/Private/Loader.cpp | 34 ++++ Jusin154_Team3D/Client/Public/Camera_Debug.h | 48 ++++++ Jusin154_Team3D/Client/Public/Client_Define.h | 6 +- Jusin154_Team3D/Client/Public/Client_Enum.h | 14 +- Jusin154_Team3D/Client/Public/Client_Macro.h | 5 + Jusin154_Team3D/Client/Public/Client_Struct.h | 10 ++ Jusin154_Team3D/Client/Public/Information.h | 42 +++++ Jusin154_Team3D/Client/Public/Level_Field.h | 34 ++++ Jusin154_Team3D/Client/Public/Level_Restart.h | 29 ++++ Jusin154_Team3D/Client/Public/Light_Main.h | 41 +++++ Jusin154_Team3D/Client/Public/Loader.h | 1 + Jusin154_Team3D/Editor/Default/Editor.vcxproj | 2 - .../Editor/Default/Editor.vcxproj.filters | 16 +- .../Editor/Private/Information.cpp | 86 ---------- Jusin154_Team3D/Editor/Public/Information.h | 60 ------- .../Engine/Private/PhysX_Manager.cpp | 6 +- .../Engine/Public/Engine_Function.h | 2 +- .../Engine/Public/Instance_Model.h | 2 - 26 files changed, 847 insertions(+), 190 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Camera_Debug.cpp create mode 100644 Jusin154_Team3D/Client/Private/Information.cpp create mode 100644 Jusin154_Team3D/Client/Private/Level_Field.cpp create mode 100644 Jusin154_Team3D/Client/Private/Level_Restart.cpp create mode 100644 Jusin154_Team3D/Client/Private/Light_Main.cpp create mode 100644 Jusin154_Team3D/Client/Public/Camera_Debug.h create mode 100644 Jusin154_Team3D/Client/Public/Client_Struct.h create mode 100644 Jusin154_Team3D/Client/Public/Information.h create mode 100644 Jusin154_Team3D/Client/Public/Level_Field.h create mode 100644 Jusin154_Team3D/Client/Public/Level_Restart.h create mode 100644 Jusin154_Team3D/Client/Public/Light_Main.h delete mode 100644 Jusin154_Team3D/Editor/Private/Information.cpp delete mode 100644 Jusin154_Team3D/Editor/Public/Information.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index dbbcc6a86..b1ec0747c 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -110,7 +110,7 @@ Level3 true - EDITOR_PROJECT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + _DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -136,7 +136,7 @@ true true true - EDITOR_PROJECT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -157,12 +157,21 @@ + + + true + true + + + + + @@ -171,9 +180,14 @@ + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 264f91f6e..ad2c3c07f 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -37,6 +37,24 @@ 01.Levels\02.GamePlay + + 99.Define + + + 03.Information + + + 01.Levels\10.Field + + + 01.Levels\99.Restart + + + 02.GameObjects\Environment\Lights + + + 02.GameObjects\Cameras\Debug + @@ -98,6 +116,48 @@ {a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1} + + {1cfdfc05-0b0d-4c58-8c2d-58090efea4fd} + + + {621b87a7-54b8-4d90-84b2-fa8cd26cc396} + + + {caa3de9a-fe01-426c-9cea-195c2f9b18f6} + + + {b5bef783-5315-4488-ac64-cb98d16a84a9} + + + {31681680-d5de-43c9-bc2d-2c91ca58a593} + + + {1bfec6dc-f008-4d18-87d6-be38824b1272} + + + {3eb21e8e-e01c-47fe-828e-800212456eb5} + + + {9f952e5a-835c-4de9-b7b5-9a731912774d} + + + {c5b61cb3-bc5f-4429-8715-b309dcf054b2} + + + {2b209526-b728-4fba-a184-b9224d72903a} + + + {e12b3048-dd6d-41bf-b346-e4abdaa4f215} + + + {74f21f9b-30bf-412e-ba4e-526958ab2a52} + + + {8d89a59c-fbd2-4a4a-ab01-a70abb80cc49} + + + {708bbc88-47fb-42c5-b060-14cec7d646f2} + @@ -121,6 +181,21 @@ 01.Levels\02.GamePlay + + 03.Information + + + 01.Levels\10.Field + + + 01.Levels\99.Restart + + + 02.GameObjects\Environment\Lights + + + 02.GameObjects\Cameras\Debug + diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp new file mode 100644 index 000000000..c82a2a622 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -0,0 +1,156 @@ +#include "pch.h" +#include "Camera_Debug.h" +#include "Shader.h" + +CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CCamera(pDevice, pContext) +{ +} + +CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs) + : CCamera(rhs) +{ +} + +void CCamera_Debug::Priority_Update(_float fTimeDelta) +{ +} + +void CCamera_Debug::Update(_float fTimeDelta) +{ + Transition(fTimeDelta); + _float3 vCamPos = {}; + XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION)); + GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z); + if (m_pGameInstance->Key_Up(DIK_GRAVE)) { + m_bMovable = !m_bMovable; + } + if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) { + m_pGameInstance->Toggle_MouseCenter(); + } + if (m_bMovable) { +#pragma region Position + _float fSpeed = 5.f; + if (m_pGameInstance->Key_Pressing(DIK_W)) { + m_pTransformCom->Go_Straight(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_A)) { + m_pTransformCom->Go_Left(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_S)) { + m_pTransformCom->Go_Backward(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_D)) { + m_pTransformCom->Go_Right(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_SPACE)) { + m_pTransformCom->Go_Up(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_C)) { + m_pTransformCom->Go_Down(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_TAB)) { + Set_InitialPos(); + } + +#pragma endregion +#pragma region Angle + + _float3 fMove = m_pGameInstance->Get_MouseMove(); + m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta * fMove.x * m_fMouseSensor); + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::RIGHT), fTimeDelta * fMove.y * m_fMouseSensor); + +#pragma endregion + + } + __super::Bind_Matrices(); +} + +void CCamera_Debug::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CCamera_Debug::Render() +{ + return S_OK; +} + +HRESULT CCamera_Debug::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCamera_Debug::Initialize(void* pArg) +{ + CAMERA_DEBUG_DESC* pDesc = static_cast(pArg); + m_fMouseSensor = pDesc->fMouseSensor; + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f)); + m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f)); + m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr(); + m_bActive = true; + + m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey); + m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false); + return S_OK; +} + +HRESULT CCamera_Debug::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CCamera_Debug::Bind_ShaderResources() +{ + return S_OK; +} + +void CCamera_Debug::Set_InitialPos() +{ + m_pTransformCom->Set_WorldMatrix(m_matInitial); +} + +CCamera_Debug* CCamera_Debug::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCamera_Debug* pInstance = new CCamera_Debug(pDevice, pContext); + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCamera_Debug"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CCamera_Debug* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner) +{ + CCamera_Debug* pInstance = new CCamera_Debug(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCamera_Debug"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCamera_Debug::Free() +{ + __super::Free(); +} + +void CCamera_Debug::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Information.cpp b/Jusin154_Team3D/Client/Private/Information.cpp new file mode 100644 index 000000000..25dc551fd --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Information.cpp @@ -0,0 +1,33 @@ +#include "pch.h" +#include "Information.h" +#include "GameInstance.h" + + +CInformation::CInformation() +{ +} + +HRESULT CInformation::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContext; + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + return S_OK; +} + +void CInformation::Release_Information() +{ + +} + +void CInformation::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pGameInstance); +} diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp new file mode 100644 index 000000000..43e23c39c --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -0,0 +1,114 @@ +#include "pch.h" +#include "Level_Field.h" +#include "GameInstance.h" +#include "Level_Loading.h" +#include "Layer.h" + +CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) + : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } +{ + +} + +HRESULT CLevel_Field::Initialize(void* pArg) +{ + if (FAILED(Ready_Lights())) { + return E_FAIL; + } + + if (FAILED(Ready_Markers())) { + return E_FAIL; + } + if (FAILED(Ready_Layer_UI(LAYER_UI))) { + return E_FAIL; + } + if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLevel_Field::Initialize() +{ + assert(false); + return E_FAIL; +} + +void CLevel_Field::Update(_float fTimeDelta) +{ + if (true == m_pGameInstance->Check_LevelShouldChange()) { + //if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) { + // return; + //} + } +} + +HRESULT CLevel_Field::Render() +{ + SetWindowText(g_hWnd, TEXT("게임플레이레벨입니다")); + return S_OK; +} + +HRESULT CLevel_Field::Ready_Lights() +{ + LIGHT_DESC LightDesc{}; + + LightDesc.eType = LIGHT::DIRECTIONAL; + LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 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_Field::Ready_Layer_UI(const _wstring& strLayerTag) +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Camera() +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Sound() +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Markers() +{ + + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag) +{ + return S_OK; +} + +pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg) +{ + CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID); + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Created : CLevel_Field"); + SAFE_RELEASE(pInstance); + } + + return { pInstance, [pInstance]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound(); } }; +} + +void CLevel_Field::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 418e8082c..766d6da10 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -2,6 +2,8 @@ #include "Level_GamePlay.h" #include "GameInstance.h" #include "Level_Loading.h" +#include "Light_Main.h" +#include "Camera_Debug.h" #include "Layer.h" CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) @@ -52,19 +54,8 @@ HRESULT CLevel_GamePlay::Render() HRESULT CLevel_GamePlay::Ready_Lights() { - LIGHT_DESC LightDesc{}; - - LightDesc.eType = LIGHT::DIRECTIONAL; - LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); - LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 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; - //} - assert(false); - + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) + return E_FAIL; return S_OK; } @@ -76,6 +67,25 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Camera() { + CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{}; + Camera_Desc.fFovy = XMConvertToRadians(60.0f); + Camera_Desc.fNear = 0.1f; + Camera_Desc.fFar = 200.f; + Camera_Desc.vEye = _float3(0.f, 10.f, -10.f); + Camera_Desc.vAt = _float3(0.f, 0.f, 0.f); + Camera_Desc.fSpeedPerSec = 5.f; + Camera_Desc.pCameraKey = CAMERA_DEBUG; + Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f); + Camera_Desc.fMouseSensor = 0.1f; + + CCamera_Debug* pCamera = { nullptr }; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))){ + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) { + return E_FAIL; + } + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp new file mode 100644 index 000000000..75fb7534d --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp @@ -0,0 +1,51 @@ +#include "pch.h" +#include "Level_Restart.h" +#include "Information.h" +#include "GameInstance.h" +#include "Level_Loading.h" + + + +CLevel_Restart::CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) + : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } +{ + +} + +HRESULT CLevel_Restart::Initialize() +{ + //m_eNextLevel = CInformation::GetInstance()->Get_RestartLevel(); + + return S_OK; +} + +void CLevel_Restart::Update(_float fTimeDelta) +{ + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) { + return; + } +} + +HRESULT CLevel_Restart::Render() +{ + return S_OK; +} + +pair> CLevel_Restart::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) +{ + CLevel_Restart* pInstance = new CLevel_Restart(pDevice, pContext, eLevelID); + + if (FAILED(pInstance->Initialize())) + { + MSG_BOX("Failed to Created : CLevel_Restart"); + SAFE_RELEASE(pInstance); + } + + return { pInstance, nullptr }; +} + +void CLevel_Restart::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Light_Main.cpp b/Jusin154_Team3D/Client/Private/Light_Main.cpp new file mode 100644 index 000000000..7c279f486 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Light_Main.cpp @@ -0,0 +1,116 @@ +#include "pch.h" +#include "Light_Main.h" +#include "GameInstance.h" + +CLight_Main::CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject(pDevice, pContext) +{ +} + +CLight_Main::CLight_Main(const CLight_Main& Prototype) + : CGameObject(Prototype) +{ +} + +HRESULT CLight_Main::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLight_Main::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + + if (FAILED(Ready_Components())) + return E_FAIL; + + m_pTransformCom->Set_State(STATE::LOOK, XMVectorSet(1.f, -1.f, 1.f, 0.f)); + + return S_OK; +} + +void CLight_Main::Priority_Update(_float fTimeDelta) +{ + +} + +void CLight_Main::Update(_float fTimeDelta) +{ + +} + +void CLight_Main::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CLight_Main::Render() +{ + return S_OK; +} + +HRESULT CLight_Main::Ready_Components() +{ + __super::Ready_Components(nullptr); + + LIGHT_DESC LightDesc{}; + + LightDesc.eType = LIGHT::DIRECTIONAL; + LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f); + LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); + LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK); + LightDesc.iLevel = NEXT_LEVEL; + + /* Com_Light*/ + if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &LightDesc))) + { + return E_FAIL; + } + + + return S_OK; +} + +HRESULT CLight_Main::Bind_ShaderResources() +{ + return S_OK; +} + +CLight_Main* CLight_Main::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLight_Main* pInstance = new CLight_Main(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLight_Main"); + Safe_Release(pInstance); + } + + return pInstance; +} + +CGameObject* CLight_Main::Clone(void* pArg, CGameObject* pOwner) +{ + CLight_Main* pInstance = new CLight_Main(*this); + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLight_Main"); + Safe_Release(pInstance); + } + + return pInstance; +} + +void CLight_Main::Free() +{ + __super::Free(); + + Safe_Release(m_pLightCom); +} + +void CLight_Main::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 4abe2e521..4aa07b34f 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -2,6 +2,8 @@ #include "Loader.h" #include "GameInstance.h" #include "MainApp.h" +#include "Light_Main.h" +#include "Camera_Debug.h" CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : m_pDevice{ pDevice } @@ -51,6 +53,9 @@ HRESULT CLoader::Loading() case LEVEL::GAMEPLAY: hr = Loading_For_GamePlay(); break; + case LEVEL::FIELD: + hr = Loading_For_Field(); + break; default: break; } @@ -79,6 +84,14 @@ HRESULT CLoader::Loading_For_Logo() m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Debug::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLight_Main::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + m_strMessage = TEXT("로딩이 완료되었습니다.."); m_isFinished = true; @@ -107,6 +120,27 @@ HRESULT CLoader::Loading_For_GamePlay() return S_OK; } +HRESULT CLoader::Loading_For_Field() +{ + m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("모델를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("정보를 불러오는 중입니다."); + + m_strMessage = TEXT("로딩이 완료되었습니다.."); + + m_isFinished = true; + + return S_OK; +} + CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID) { CLoader* pInstance = new CLoader(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Public/Camera_Debug.h b/Jusin154_Team3D/Client/Public/Camera_Debug.h new file mode 100644 index 000000000..0662b8e1e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Camera_Debug.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Client_Define.h" +#include "Camera.h" + +NS_BEGIN(Client) + +class CCamera_Debug final : public CCamera +{ +public: + typedef struct tagCamera_Debug : public CCamera::CAMERA_DESC + { + _float3 vEye{}, vAt{}; + _float fMouseSensor{}; + }CAMERA_DEBUG_DESC; + +private: + CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCamera_Debug(const CCamera_Debug& rhs); + virtual ~CCamera_Debug() = 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: + _bool m_bMovable = true; + _float m_fMouseSensor = {}; + _float4x4 m_matInitial = {}; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Bind_ShaderResources() override; + void Set_InitialPos(); + +public: + static CCamera_Debug* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CCamera_Debug* Clone(void* pArg, CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; + +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Define.h b/Jusin154_Team3D/Client/Public/Client_Define.h index e369c022d..fdd0675aa 100644 --- a/Jusin154_Team3D/Client/Public/Client_Define.h +++ b/Jusin154_Team3D/Client/Public/Client_Define.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include "../Default/framework.h" @@ -7,8 +7,8 @@ namespace Client { - const unsigned int g_iWinSizeX = 1920; - const unsigned int g_iWinSizeY = 1080; + const unsigned int g_iWinSizeX = 1920; + const unsigned int g_iWinSizeY = 1080; } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 1a7388311..1096d0d07 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -1,15 +1,19 @@ -#pragma once +#pragma once namespace Client { - enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END }; + enum class LEVEL { STATIC, LOADING, LOGO, INTRO, GAMEPLAY, FIELD, RESTART, END }; enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END }; + enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT }; enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END }; enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END }; - enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, END }; + enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, END }; enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; -} \ No newline at end of file + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END }; + + enum class EFFECT_TYPE { EFFECT, TRAIL, END }; +} diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h index b9f913fc8..074c0d74d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Macro.h +++ b/Jusin154_Team3D/Client/Public/Client_Macro.h @@ -16,7 +16,9 @@ namespace Client { #define FX_NORTEX TEXT("FX_NORTEX") #define FX_CELL TEXT("FX_CELL") #define FX_PARTICLE TEXT("FX_PARTICLE") +#define FX_INSTANCE_MODEL TEXT("FX_INSTANCE_MODEL") #define FX_UIEDITOR TEXT("FX_UIEDITOR") +#define FX_UIINSTANCE TEXT("FX_UIINSTANCE") #pragma endregion #pragma region MACRO_PROTOTYPE @@ -26,6 +28,7 @@ namespace Client { #pragma endregion #pragma region OBJECT +#define CAMERA_DEBUG TEXT("CAMERA_DEBUG") #pragma endregion #pragma region COMPONENT @@ -48,7 +51,9 @@ namespace Client { #define LAYER_DOT TEXT("Layer_Dot") #define LAYER_CELL TEXT("Layer_Cell") #define LAYER_TRIGGER TEXT("Layer_Trigger") +#define LAYER_LIGHT TEXT("Layer_Light") +#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager") #pragma endregion #pragma region MACRO_TEXTURE diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h new file mode 100644 index 000000000..7eb5d8e59 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -0,0 +1,10 @@ +#pragma once + +NS_BEGIN(Engine) +class CTransform; +NS_END + +NS_BEGIN(Client) + + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Information.h b/Jusin154_Team3D/Client/Public/Information.h new file mode 100644 index 000000000..c7c011f70 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Information.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CInformation final : public CBase +{ + DECLARE_SINGLETON(CInformation) +private: + CInformation(); + virtual ~CInformation() = default; +public: + HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + void Release_Information(); + + +private: + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + class CGameInstance* m_pGameInstance = { nullptr }; + + class CPlayerInfo* m_pPlayerInfo = { nullptr }; + class CMonsterInfo* m_pMonsterInfo = { nullptr }; + class CNeutralInfo* m_pNeutralInfo = { nullptr }; + +private: +#ifdef _DEBUG + _string m_strLog = {}; +#endif // _DEBUG + +public: + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h new file mode 100644 index 000000000..d4b52ca78 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -0,0 +1,34 @@ +#pragma once + +#include "Client_Define.h" +#include "Level.h" +NS_BEGIN(Engine) +NS_END +NS_BEGIN(Client) + +class CLevel_Field final : public CLevel +{ +private: + CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual ~CLevel_Field() = default; + +public: + virtual void Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize() override; + HRESULT Initialize(void* pArg); + HRESULT Ready_Lights(); + HRESULT Ready_Markers(); + HRESULT Ready_Layer_UI(const _wstring& strLayerTag); + HRESULT Ready_Layer_Camera(); + HRESULT Ready_Layer_Sound(); + HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); + +public: + static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Restart.h b/Jusin154_Team3D/Client/Public/Level_Restart.h new file mode 100644 index 000000000..4c6d1dedd --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Level_Restart.h @@ -0,0 +1,29 @@ +#pragma once + +#include "Client_Define.h" +#include "Level.h" +NS_BEGIN(Engine) +NS_END +NS_BEGIN(Client) + + +class CLevel_Restart final : public CLevel +{ +private: + CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual ~CLevel_Restart() = default; + +public: + virtual void Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize() override; +private: + LEVEL m_eNextLevel = {}; +public: + static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Light_Main.h b/Jusin154_Team3D/Client/Public/Light_Main.h new file mode 100644 index 000000000..8b513af4d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Light_Main.h @@ -0,0 +1,41 @@ +#pragma once + +#include "Client_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CLight; +NS_END + +NS_BEGIN(Client) + +class CLight_Main final : public CGameObject +{ +private: + CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLight_Main(const CLight_Main& Prototype); + virtual ~CLight_Main() = 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: + CLight* m_pLightCom = { nullptr }; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CLight_Main* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; + virtual void Free() override; + virtual void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h index ab651f55d..9dcd8d2a3 100644 --- a/Jusin154_Team3D/Client/Public/Loader.h +++ b/Jusin154_Team3D/Client/Public/Loader.h @@ -34,6 +34,7 @@ class CLoader final : public CBase HRESULT Initialize(LEVEL eNextLevelID); HRESULT Loading_For_Logo(); HRESULT Loading_For_GamePlay(); + HRESULT Loading_For_Field(); public: static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID); diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 04b874e45..c87161d16 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -207,7 +207,6 @@ - @@ -327,7 +326,6 @@ - diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 4237eaa35..a9a36e2fb 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -16,9 +16,6 @@ {79dcc46a-5ae9-48bb-962b-8984b15e4f5a} - - {fc210c4d-b8a6-4ed4-b19c-4bd175232e5f} - {47a1f529-dd0e-4f37-9ada-5aa6731dea0b} @@ -315,7 +312,7 @@ {8882358e-c8eb-4222-a87e-01d902533b8f} - + {3614836d-9988-4ec0-95a8-f8ebc25a9a13} @@ -522,9 +519,6 @@ 02.GameObjects\Dummys\DummySkyBox - - 03.Information - 02.GameObjects\MainLight @@ -632,8 +626,7 @@ 02.GameObjects\Layer_Effect\Effect\05.NomalJap - - + 80.State\State_Combat\State_Skill2 @@ -645,7 +638,6 @@ 02.GameObjects\Broom - @@ -837,9 +829,6 @@ 02.GameObjects\Dummys\DummySkyBox - - 03.Information - 02.GameObjects\MainLight @@ -959,7 +948,6 @@ 02.GameObjects\Broom - diff --git a/Jusin154_Team3D/Editor/Private/Information.cpp b/Jusin154_Team3D/Editor/Private/Information.cpp deleted file mode 100644 index 35c5c8a6e..000000000 --- a/Jusin154_Team3D/Editor/Private/Information.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "pch.h" - -#include "Information.h" - -IMPLEMENT_SINGLETON(CInformation) - - -HRESULT CInformation::Initialize_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - m_pDevice = pDevice; - m_pContext = pContext; - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - - - - return S_OK; -} - -HRESULT CInformation::Release_Info() -{ - if (nullptr == s_pInstance) { - return S_OK; - } - DestroyInstance(); - - //SAFE_RELEASE(); - //SAFE_RELEASE(); - - return S_OK; -} - -_bool CInformation::strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents) -{ - assert(iCurrentIndex < contents.size()); - assert(iCurrentIndex >= 0); - return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char* - { - auto vec = static_cast*>(data); - return (*vec)[iIndex].c_str(); - }, &contents, (_int)(contents.size()) - ); -} - -_bool CInformation::wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents) -{ - assert(iCurrentIndex < contents.size()); - assert(iCurrentIndex >= 0); - return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char* - { - auto vec = static_cast*>(data); - return CMyTools::ToString((*vec)[iIndex]).c_str(); - }, &contents, (_int)(contents.size()) - ); -} - -void CInformation::Log_Render() -{ - GUI::Begin("Log"); - GUI::Text(m_strLog.c_str()); - GUI::End(); -} - -void CInformation::Log_Push(const _char* pContents) -{ - m_strLog.append(_string("\n") + pContents); -} - -void CInformation::Log_Clear() -{ - m_strLog.clear(); -} - -CInformation::CInformation() -{ -} - -void CInformation::Free() -{ - __super::Free(); - - - - SAFE_RELEASE(m_pDevice); - SAFE_RELEASE(m_pContext); -} diff --git a/Jusin154_Team3D/Editor/Public/Information.h b/Jusin154_Team3D/Editor/Public/Information.h deleted file mode 100644 index dc4c393dd..000000000 --- a/Jusin154_Team3D/Editor/Public/Information.h +++ /dev/null @@ -1,60 +0,0 @@ -#pragma once - -#include "Base.h" -#include "Editor_Define.h" - -NS_BEGIN(Editor) - -typedef class CInformation final : public CBase -{ - DECLARE_SINGLETON(CInformation) -public: - HRESULT Initialize_Info(ID3D11Device* pDevice = nullptr, ID3D11DeviceContext* pContext = nullptr); - HRESULT Release_Info(); -#pragma region WHOLEPART - _bool strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents); - _bool wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents); - -#pragma endregion // 전역 - -#pragma region OBJECTVIEWER - -#pragma endregion -#pragma region MAPVIEWER - -#pragma endregion -#pragma region EFFECTVIEWER - -#pragma endregion -#pragma region UIVIEWER - -#pragma endregion -#pragma region PHYSXVIEWER - -#pragma endregion -#pragma region COMBINEDVIEWER - -#pragma endregion - -public: -#pragma region LOG - void Log_Render(); - void Log_Push(const _char* pContents); - void Log_Clear(); -#pragma endregion - -private: - ID3D11Device* m_pDevice = { nullptr }; - ID3D11DeviceContext* m_pContext = { nullptr }; - class CGameInstance* m_pGameInstance = { nullptr }; - - _string m_strLog = {}; - - -private: - CInformation(); - virtual ~CInformation() = default; - virtual void Free() override; -}INFO; - -NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 6bb1707e3..3151da03d 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -38,7 +38,7 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.capsule(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]); break; case ACTOR::SPHERE: - geoHolder = PSX::PxCapsuleGeometry(vVolume.x); + geoHolder = PSX::PxSphereGeometry(vVolume.x); pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.sphere(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]); break; default: @@ -474,7 +474,7 @@ HRESULT CPhysX_Manager::Initialize() } // m_pScene->overlap();?????? - +#ifdef EDITOR_PROJECT #ifdef 기무리 PlaneData.eKind = PHYSX_KIND::BODY_STATIC; PlaneData.iSubKind = UINT_MAX; @@ -505,6 +505,8 @@ HRESULT CPhysX_Manager::Initialize() // } //} #endif // 기무리 +#endif // EDITOR_PROJECT + diff --git a/Jusin154_Team3D/Engine/Public/Engine_Function.h b/Jusin154_Team3D/Engine/Public/Engine_Function.h index 6ce4121da..64086a61a 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Function.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Function.h @@ -24,7 +24,7 @@ void Safe_Delete_Array(T& Pointer) } template -unsigned long SAFE_ADDREF(T& pInstance) +unsigned long Safe_AddRef(T& pInstance) { unsigned long dwRefCnt = 0; diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index 201eaa47f..dee49ef0f 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -1,8 +1,6 @@ #pragma once #include "Component.h" -#include "Assimp/scene.h" - NS_BEGIN(Engine) class ENGINE_DLL CInstance_Model final : public CComponent