diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 6863a02f8..00dfe93ff 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -167,7 +167,6 @@ call Update_Resources.bat
-
@@ -183,7 +182,6 @@ call Update_Resources.bat
-
@@ -197,6 +195,9 @@ call Update_Resources.bat
+
+
+
@@ -205,19 +206,13 @@ call Update_Resources.bat
-
-
-
-
-
-
@@ -371,7 +366,6 @@ call Update_Resources.bat
-
@@ -388,7 +382,6 @@ call Update_Resources.bat
-
@@ -401,24 +394,21 @@ call Update_Resources.bat
+
+
-
-
-
-
-
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index e73cd2920..749019eeb 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -563,30 +563,15 @@
02.GameObjects\Effect\Effects\Accio
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Border
-
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Header
-
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_HeaderLine
-
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info_Header
-
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info_Line
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_List
-
02.GameObjects\UI\Quest_Canvas
@@ -605,17 +590,8 @@
02.GameObjects\Effect\ScreenFX
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel
-
-
- 02.GameObjects\UI\Quest_Canvas\InProgress_Panel
-
-
- 02.GameObjects\UI\Quest_Canvas\Completed_Panel
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel\Quest_Status
+ 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Status
04.Mechanic\Quest
@@ -626,6 +602,15 @@
02.GameObjects\UI\Interaction_Key
+
+ 04.Mechanic\Quest\QuestInstance
+
+
+ 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Slot
+
+
+ 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info_Header
+
@@ -1254,18 +1239,9 @@
{322edb99-c59d-4a92-8ab1-8ec57a9e18fb}
-
- {ba5406be-c0a0-41dd-879f-a324d71ea4b8}
-
{c02a6573-5be6-4f17-b1b0-39698c0fff5f}
-
- {da2bbb64-73eb-427a-ae36-21c9ed5db304}
-
-
- {73ceb062-c340-4365-9fb3-7bb21f9b9552}
-
{bfeebdc4-6aa9-400f-a086-3d6a32a3d37e}
@@ -1275,9 +1251,6 @@
{7c8b3162-a6d5-441f-84ae-cfb4bf779dfa}
-
- {2d8d199b-8ba8-497a-afb3-edcc4c905ea5}
-
{2326c134-a2bb-45f1-8452-2dd49bf42697}
@@ -1293,24 +1266,21 @@
{9e8bccb6-c491-4f3a-bdb8-5f03f13ad84d}
-
- {9060b2e1-d8cb-4259-a17a-f8ee2407d37c}
-
-
- {c25a401b-91f1-4e01-8805-51fffef366a6}
-
-
- {2bd79ab2-fae7-4757-81b3-26231a4496cf}
-
-
- {bffcced5-6951-4db4-9df1-44b33b52ece7}
-
{fe64513c-fbb3-4577-b424-82d99c9075a3}
{08163c4a-63c9-4cc2-97b4-97bb2f9467ff}
+
+ {bffcced5-6951-4db4-9df1-44b33b52ece7}
+
+
+ {35a6cb6f-4bbb-47fb-8f7a-63615128dece}
+
+
+ {6bbfb8f0-c71a-4769-b1e6-efd5d863ba7f}
+
@@ -1818,18 +1788,9 @@
02.GameObjects\Effect\Effects\Accio
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Border
-
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Header
-
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_HeaderLine
-
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info
@@ -1839,9 +1800,6 @@
02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Info_Line
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_List
-
02.GameObjects\UI\Quest_Canvas
@@ -1860,17 +1818,8 @@
02.GameObjects\Effect\ScreenFX
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel
-
-
- 02.GameObjects\UI\Quest_Canvas\InProgress_Panel
-
-
- 02.GameObjects\UI\Quest_Canvas\Completed_Panel
-
- 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel\Quest_Status
+ 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Status
04.Mechanic\Quest
@@ -1881,6 +1830,12 @@
02.GameObjects\UI\Interaction_Key
+
+ 04.Mechanic\Quest\QuestInstance
+
+
+ 02.GameObjects\UI\Quest_Canvas\Quest_Panel\Quest_Slot
+
diff --git a/Jusin154_Team3D/Client/Private/Completed_Panel.cpp b/Jusin154_Team3D/Client/Private/Completed_Panel.cpp
deleted file mode 100644
index ed402e72a..000000000
--- a/Jusin154_Team3D/Client/Private/Completed_Panel.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-#include "pch.h"
-#include "Completed_Panel.h"
-#include "GameInstance.h"
-
-CCompleted_Panel::CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CCompleted_Panel::CCompleted_Panel(const CCompleted_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CCompleted_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
- Desc.fSizeY = g_iWinSizeY;
-
- if (FAILED(__super::Initialize(&Desc)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Components(pArg)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(false);
- ElementAllVisible(true);
- return S_OK;
-}
-
-void CCompleted_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CCompleted_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- __super::Update(fTimeDelta);
-}
-
-void CCompleted_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-
-HRESULT CCompleted_Panel::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CCompleted_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CCompleted_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Ready_Element(void* pArg)
-{
- return S_OK;
-}
-
-CCompleted_Panel* CCompleted_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CCompleted_Panel* pInstance = new CCompleted_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CCompleted_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CCompleted_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CCompleted_Panel* pInstance = new CCompleted_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CCompleted_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CCompleted_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CCompleted_Panel::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp
index d6d3eb529..3081e9a49 100644
--- a/Jusin154_Team3D/Client/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin.cpp
@@ -308,6 +308,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
m_pFSM->Change_State(FSMSTATE::DEAD);
+ _int ID = m_pStat->Get_Stat().iObjectID;
+ m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
return;
}
diff --git a/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp b/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp
deleted file mode 100644
index 1eafbed4b..000000000
--- a/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-#include "pch.h"
-#include "InProgress_Panel.h"
-#include "GameInstance.h"
-
-CInProgress_Panel::CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CInProgress_Panel::CInProgress_Panel(const CInProgress_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CInProgress_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
- Desc.fSizeY = g_iWinSizeY;
-
- if (FAILED(__super::Initialize(&Desc)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Components(pArg)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(false);
- ElementAllVisible(true);
- return S_OK;
-}
-
-void CInProgress_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CInProgress_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- __super::Update(fTimeDelta);
-}
-
-void CInProgress_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CInProgress_Panel::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CInProgress_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CInProgress_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Ready_Element(void* pArg)
-{
- return S_OK;
-}
-
-CInProgress_Panel* CInProgress_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CInProgress_Panel* pInstance = new CInProgress_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CInProgress_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CInProgress_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CInProgress_Panel* pInstance = new CInProgress_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CInProgress_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CInProgress_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CInProgress_Panel::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index 9629477bc..d57394f52 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -262,14 +262,34 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg)
}
}
-QUESTINFO CInfoInstance::Get_Quest_Info(_int QuestID)
+QUESTINFO CInfoInstance::Get_Quest(_int QuestID)
{
return m_pQuestInfo->Get_Quest(QuestID);
}
-_int CInfoInstance::Get_Quest_Count()
+_int CInfoInstance::Get_Quest_Count(_int Index)
{
- return m_pQuestInfo->Get_Count();
+ return m_pQuestInfo->Get_Count(Index);
+}
+
+const vector& CInfoInstance::Get_AllQuest() const
+{
+ return m_pQuestInfo->Get_AllQuest();
+}
+
+const vector& CInfoInstance::Get_ClearQuest() const
+{
+ return m_pQuestInfo->Get_ClearQuest();
+}
+
+const vector& CInfoInstance::Get_AcceptQuest() const
+{
+ return m_pQuestInfo->Get_AcceptQuest();
+}
+
+HRESULT CInfoInstance::Set_AcceptQuest(_int Index)
+{
+ return m_pQuestInfo->Set_AcceptQuest(Index);
}
HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive)
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index f3c1285ee..508d8a030 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -103,20 +103,14 @@
#include "Quest_Canvas.h"
#include "Quest_Panel.h"
-#include "Quest_Border.h"
-#include "Quest_Header.h"
-#include "Quest_HeaderLine.h"
-#include "Quest_List.h"
#include "Quest_Info.h"
#include "Quest_Info_Header.h"
#include "Quest_Info_Line.h"
#include "Quest_Entry_Line.h"
-
-#include "Quest_Status_Panel.h"
#include "Quest_Status.h"
+#include "Quest_Slot.h"
-#include "Completed_Panel.h"
-#include "InProgress_Panel.h"
+#include "QuestInstance.h"
#include "Interaction_Key.h"
@@ -1445,6 +1439,14 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ CVIBuffer_UI_Instance::UI_INSTANCE_DESC Quest_Slot_Desc{};
+
+ Quest_Slot_Desc.iNum = 10;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Quest_Slot"),
+ CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Quest_Slot_Desc)))) {
+ return E_FAIL;
+ }
{ // LIGHT PHYSX DYNAMIC
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
@@ -1797,6 +1799,12 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ /* For.Prototype_GameObject_QuestInstance*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuestInstance::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+
/* For.Prototype_GameObject_GamePlay_Canvas*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -1996,26 +2004,6 @@ HRESULT CLoader::Loading_For_GamePlay()
{
return E_FAIL;
}
- /* For.Prototype_GameObject_Quest_Border*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Border::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- /* For.Prototype_GameObject_Quest_Header*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Header::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- /* For.Prototype_GameObject_Quest_HeaderLine*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_HeaderLine::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- /* For.Prototype_GameObject_Quest_List*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_List::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
/* For.Prototype_GameObject_Quest_Info*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Info::Create(m_pDevice, m_pContext))))
{
@@ -2036,25 +2024,13 @@ HRESULT CLoader::Loading_For_GamePlay()
{
return E_FAIL;
}
-
- /* For.Prototype_GameObject_Quest_Status_Panel*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status_Panel::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
/* For.Prototype_GameObject_Quest_Status*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
+ /* For.Prototype_GameObject_Quest_Slot*/
}
-
- /* For.Prototype_GameObject_Completed_Panel*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCompleted_Panel::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- /* For.Prototype_GameObject_InProgress_Panel*/
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInProgress_Panel::Create(m_pDevice, m_pContext))))
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Slot::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/QuestInstance.cpp b/Jusin154_Team3D/Client/Private/QuestInstance.cpp
new file mode 100644
index 000000000..1fcdf7c23
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/QuestInstance.cpp
@@ -0,0 +1,70 @@
+#include "pch.h"
+#include "QuestInstance.h"
+
+CQuestInstance::CQuestInstance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CQuest(pDevice, pContext)
+{
+}
+
+CQuestInstance::CQuestInstance(const CQuestInstance& rhs)
+ :CQuest(rhs)
+{
+}
+
+
+HRESULT CQuestInstance::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CQuestInstance::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CQuestInstance::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+CQuestInstance* CQuestInstance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CQuestInstance* pInstance = new CQuestInstance(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CQuestInstance");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CQuestInstance::Clone(void* pArg, CGameObject* pOwner)
+{
+ CQuestInstance* pInstance = new CQuestInstance(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Header");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CQuestInstance::Free()
+{
+ __super::Free();
+}
+
+#ifdef _DEBUG
+void CQuestInstance::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Quest_Border.cpp b/Jusin154_Team3D/Client/Private/Quest_Border.cpp
deleted file mode 100644
index 76882a96f..000000000
--- a/Jusin154_Team3D/Client/Private/Quest_Border.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-#include "pch.h"
-#include "Quest_Border.h"
-#include "GameInstance.h"
-#include "InfoInstance.h"
-CQuest_Border::CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_Border::CQuest_Border(const CQuest_Border& rhs)
- :CElementObject(rhs),
- m_pInfoInstance(CInfoInstance::GetInstance())
-{
-}
-
-HRESULT CQuest_Border::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Border::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 150.f;
- Desc.fSizeX = 192.f;
- Desc.fSizeY = 192.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f);
- m_fSortZ = 0.02f;
- m_fFontX = -10.f;
- m_fFontY = -50.f;
- SizeUpX(500.f);
- SizeUpY(500.f);
- m_iQuest_Count = m_pInfoInstance->Get_Quest_Count();
- Visible(true);
- return S_OK;
-}
-
-void CQuest_Border::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Border::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- m_fAlpha += fTimeDelta * m_fAlphaTime;
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_bHover = true;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- {
- m_fAlpha -= fTimeDelta * m_fAlphaTime;
- m_bHover = false;
- }
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
- m_fTime += fTimeDelta * m_fTimeMult;
-
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Border::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Border::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("전 체")) - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("전 체"), _float2((m_fFontX - m_fX) - OffSet, m_fFontY + m_fY));
-
- for (_int i = 0; i < m_iQuest_Count; ++i)
- {
- m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest_Info(i).pQuestName.c_str(), _float2((-210 - m_fX), 100 + m_fY));
- }
-
- return S_OK;
-}
-
-_vector CQuest_Border::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Border::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_Border::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_LighthouseGoalBorder_4k"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_Border* CQuest_Border::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Border* pInstance = new CQuest_Border(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Border");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Border::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Border* pInstance = new CQuest_Border(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Border");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Border::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CQuest_Border::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp
index 52b848b66..5da8c63a2 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp
@@ -3,9 +3,7 @@
#include "Quest_Canvas.h"
#include "GameInstance.h"
#include "Quest_Panel.h"
-#include "Quest_Status_Panel.h"
-#include "Completed_Panel.h"
-#include "InProgress_Panel.h"
+#include "InfoInstance.h"
CQuest_Canvas::CQuest_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CCanvasObject(pDevice, pContext)
@@ -13,7 +11,8 @@ CQuest_Canvas::CQuest_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContex
}
CQuest_Canvas::CQuest_Canvas(const CQuest_Canvas& rhs)
- :CCanvasObject(rhs)
+ :CCanvasObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -26,8 +25,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = 960.f;
- Desc.fY = 540.f;
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
Desc.fSizeX = g_iWinSizeX;
Desc.fSizeY = g_iWinSizeY;
@@ -43,13 +42,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
{
return E_FAIL;
}
- m_fAlpha = 1.f;
- m_fOwnerAlpha = 1.f;
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.05f;
Visible(false);
- m_iIndex = -1;
- Add_Function(TEXT("QuestPanelUpdate"), [this](void* p) {this->Update_Panel(*reinterpret_cast<_int*>(p)); });
+ m_pInfoInstance->Set_AcceptQuest(0);
return S_OK;
}
@@ -65,28 +59,11 @@ void CQuest_Canvas::Update(_float fTimeDelta)
void CQuest_Canvas::Late_Update(_float fTimeDelta)
{
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- }
-
__super::Late_Update(fTimeDelta);
}
HRESULT CQuest_Canvas::Render()
{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
return S_OK;
}
@@ -97,39 +74,6 @@ _vector CQuest_Canvas::Get_WorldPostion()
HRESULT CQuest_Canvas::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
-
- }
return S_OK;
}
@@ -139,15 +83,6 @@ HRESULT CQuest_Canvas::Ready_Components(void* pArg)
{
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Quest_Widget"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
return S_OK;
}
@@ -159,24 +94,6 @@ HRESULT CQuest_Canvas::Ready_Panel(void* pArg)
}
Add_Panel(TEXT("Quest_Panel"), m_pQuest_Panel);
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pCompleted_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("Completed_Panel"), m_pCompleted_Panel);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pInProgress_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("InProgress_Panel"), m_pInProgress_Panel);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Status_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("Quest_Status_Panel"), m_pQuest_Status_Panel);
-
return S_OK;
}
@@ -184,26 +101,12 @@ void CQuest_Canvas::Clear_Penel()
{
}
-void CQuest_Canvas::Update_Panel(_int Index)
+void CQuest_Canvas::Visible(_bool bVisible)
{
- if (m_iIndex == Index)
- return;
-
- m_iIndex = Index;
- for (_int i = 0; i < 3; ++i)
- {
- if (i == Index)
- {
- m_bClick[i] = true;
- }
- else
- {
- m_bClick[i] = false;
- }
- }
- static_cast(m_pQuest_Panel)->Visible(m_bClick[0]);
- static_cast(m_pCompleted_Panel)->Visible(m_bClick[1]);
- static_cast(m_pInProgress_Panel)->Visible(m_bClick[2]);
+ _int Index = 0;
+ m_bVisible = bVisible;
+ if (m_bVisible == false)
+ Function_Callback(TEXT("QuestPanelClose"), &Index);
}
CQuest_Canvas* CQuest_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -236,8 +139,6 @@ void CQuest_Canvas::Free()
{
__super::Free();
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
diff --git a/Jusin154_Team3D/Client/Private/Quest_Data.cpp b/Jusin154_Team3D/Client/Private/Quest_Data.cpp
index 59bbba6f1..e7eb9b0e0 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Data.cpp
@@ -4,9 +4,13 @@
#include "UIObject.h"
#include "tinyxml2.h"
#include "InfoInstance.h"
+#include "QuestInstance.h"
+#include "GameInstance.h"
CQuest_Data::CQuest_Data()
- : m_pInfoInstance(CInfoInstance::GetInstance()) {
+ : m_pInfoInstance(CInfoInstance::GetInstance()) ,
+ m_pGameInstance(CGameInstance::GetInstance())
+{
}
HRESULT CQuest_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
@@ -44,6 +48,7 @@ HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath)
pQuest->QueryIntAttribute("QuestType", &quest.iType);
quest.pQuestName = CMyTools::ToWstring(pQuest->Attribute("QuestName"));
quest.pQuestInfo = CMyTools::ToWstring(pQuest->Attribute("QuestInfo"));
+ pQuest->QueryIntAttribute("AcceptState", &quest.iAcceptState);
tinyxml2::XMLElement* pObjectives = pQuest->FirstChildElement("Objectives");
if (pObjectives)
@@ -52,8 +57,9 @@ HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath)
while (pObjective)
{
OBJECTIVEINFO obj{};
-
- pObjective->QueryIntAttribute("Objective", &obj.iObjectType);
+ _int Clear = 0;
+ pObjective->QueryIntAttribute("Clear", &Clear);
+ obj.bClear = Clear != 0;
pObjective->QueryIntAttribute("TargetID", &obj.iTargetID);
pObjective->QueryIntAttribute("RequiredCount", &obj.iRequiredCount);
pObjective->QueryIntAttribute("CurrentCount", &obj.iCurrentCount);
@@ -94,9 +100,82 @@ QUESTINFO CQuest_Data::Get_Quest(_int QuestID)
return QuestInfos[QuestID];
}
-_int CQuest_Data::Get_Count()
+const vector& CQuest_Data::Get_AllQuest() const
{
- return m_iQuest_Count;
+ return QuestInfos;
+}
+
+const vector& CQuest_Data::Get_ClearQuest() const
+{
+ return m_QuestEndInfos;
+}
+
+const vector& CQuest_Data::Get_AcceptQuest() const
+{
+ return m_QuestAcceptedInfos;
+}
+
+_int CQuest_Data::Get_Count(_int Index)
+{
+ switch (Index)
+ {
+ case 0:
+ return m_iQuest_Count;
+
+ case 1:
+ return m_iAcceptQeustCount;
+
+ case 2:
+ return m_iClearQeustCount;
+
+ default:
+ return -1;
+ }
+}
+
+HRESULT CQuest_Data::Set_AcceptQuest(_int Index)
+{
+ if (QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::ACCEPTED) || QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::CLEARED))
+ return S_OK;
+ QuestInfos[Index].iAcceptState = ENUM_CLASS(QUESTSTATE::ACCEPTED);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, &QuestInfos[Index], nullptr, reinterpret_cast(&m_pQuestInstance))))
+ {
+ return E_FAIL;
+ }
+ m_pInfoInstance->Add_Event(TEXT("MonsterDead"), [this](void* p) {this->Update_AcceptQuest(*reinterpret_cast<_int*>(p)); });
+ m_QuestAcceptedInfoObject.push_back(m_pQuestInstance);
+ m_QuestAcceptedInfos.push_back(QuestInfos[Index]);
+ m_iAcceptQeustCount++;
+ return S_OK;
+}
+
+void CQuest_Data::Set_ClearQuest(_int Index)
+{
+ if (QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::NONE) || QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::CLEARED))
+ return;
+
+ QuestInfos[Index].iAcceptState = ENUM_CLASS(QUESTSTATE::CLEARED);
+ m_QuestEndInfos.push_back(QuestInfos[Index]);
+ m_iClearQeustCount++;
+ if (m_iAcceptQeustCount >= 0)
+ m_iAcceptQeustCount--;
+}
+
+void CQuest_Data::Update_AcceptQuest(_int MonsterID)
+{
+ m_QuestAcceptedInfoObject.erase(remove_if(m_QuestAcceptedInfoObject.begin(), m_QuestAcceptedInfoObject.end(),
+ [MonsterID, this](auto& it) {
+ CQuestInstance* instance = static_cast(it);
+ if (static_cast(it)->Update_Objective(MonsterID) == true)
+ {
+ Set_ClearQuest(static_cast(it)->Get_QuestID());
+ return true;
+ }
+ return false;
+ }),
+ m_QuestAcceptedInfoObject.end()
+ );
}
CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -115,5 +194,4 @@ CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
void CQuest_Data::Free()
{
__super::Free();
-
}
diff --git a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp
index 3dec4de70..a00e26462 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp
@@ -121,7 +121,7 @@ HRESULT CQuest_Entry_Line::Render()
return E_FAIL;
}
- _float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("보 상") - 22) * 0.5f;
+ _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("보 상")) - 22) * 0.5f;
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("조 건"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
@@ -214,11 +214,9 @@ void CQuest_Entry_Line::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Entry_Line* CQuest_Entry_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Client/Private/Quest_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Header.cpp
deleted file mode 100644
index 2d265e46a..000000000
--- a/Jusin154_Team3D/Client/Private/Quest_Header.cpp
+++ /dev/null
@@ -1,251 +0,0 @@
-#include "pch.h"
-#include "Quest_Header.h"
-#include "GameInstance.h"
-
-CQuest_Header::CQuest_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_Header::CQuest_Header(const CQuest_Header& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CQuest_Header::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Header::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 352.f;
- Desc.fSizeX = 128.f;
- Desc.fSizeY = 32.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- m_vNine_Slice = _float4(0.f, 128.f, 0.f, 32.f);
- m_fSortZ = 0.02f;
- m_fFontX = 780.f;
- m_fFontY = 520.f;
- SizeUpX(600.f);
- SizeUpY(80.f);
- Visible(true);
- return S_OK;
-}
-
-void CQuest_Header::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Header::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- m_fAlpha += fTimeDelta * m_fAlphaTime;
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_bHover = true;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- {
- m_fAlpha -= fTimeDelta * m_fAlphaTime;
- m_bHover = false;
- }
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
- m_fTime += fTimeDelta * m_fTimeMult;
-
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Header::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Header::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- _float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기") - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
- return S_OK;
-}
-
-_vector CQuest_Header::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Header::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_Header::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_LighthouseHeaderBack"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_Header* CQuest_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Header* pInstance = new CQuest_Header(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Header");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Header::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Header* pInstance = new CQuest_Header(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Header");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Header::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CQuest_Header::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp b/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp
deleted file mode 100644
index 94b9f2bb9..000000000
--- a/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-#include "pch.h"
-#include "Quest_HeaderLine.h"
-#include "GameInstance.h"
-
-CQuest_HeaderLine::CQuest_HeaderLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_HeaderLine::CQuest_HeaderLine(const CQuest_HeaderLine& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CQuest_HeaderLine::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_HeaderLine::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 310.f;
- Desc.fSizeX = 480.f;
- Desc.fSizeY = 10.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- Visible(true);
- return S_OK;
-}
-
-void CQuest_HeaderLine::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_HeaderLine::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- {
- m_fAlpha += fTimeDelta * m_fAlphaTime;
- }
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
-
- m_fTime += fTimeDelta * m_fTimeMult;
- __super::Update(fTimeDelta);
-}
-
-void CQuest_HeaderLine::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_HeaderLine::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CQuest_HeaderLine::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_HeaderLine::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_HeaderLine::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_TutorialDividerBottom_middle"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_HeaderLine* CQuest_HeaderLine::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_HeaderLine* pInstance = new CQuest_HeaderLine(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_HeaderLine");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_HeaderLine::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_HeaderLine* pInstance = new CQuest_HeaderLine(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_HeaderLine");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_HeaderLine::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CQuest_HeaderLine::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Quest_Info.cpp b/Jusin154_Team3D/Client/Private/Quest_Info.cpp
index 591d611b0..1bbad4523 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Info.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Info.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Quest_Info.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
CQuest_Info::CQuest_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -8,7 +9,8 @@ CQuest_Info::CQuest_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CQuest_Info::CQuest_Info(const CQuest_Info& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -45,10 +47,10 @@ HRESULT CQuest_Info::Initialize(void* pArg)
SizeUpX(960);
SizeUpY(m_fOriginPerviewSize);
m_fSortZ = 0.02f;
- m_fFontX = 740.f;
+ m_fFontX = 530.f;
m_fFontY = 500.f;
m_iPerQuestIndex = -1;
- Visible(true);
+ Visible(false);
static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
return S_OK;
}
@@ -97,10 +99,6 @@ void CQuest_Info::Update(_float fTimeDelta)
}
}
m_fTime += fTimeDelta * m_fTimeMult;
- m_pRect.left = long(m_fX - m_vScale.x * 0.5f);
- m_pRect.top = long(m_fY - m_vScale.y * 0.5f);
- m_pRect.right = long(m_fX + m_vScale.x * 0.5f);
- m_pRect.bottom = long(m_fY + m_vScale.y * 0.5f);
__super::Update(fTimeDelta);
}
@@ -131,6 +129,7 @@ HRESULT CQuest_Info::Render()
return E_FAIL;
}
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
@@ -224,11 +223,9 @@ void CQuest_Info::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Info* CQuest_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp
index 5ccff0435..44ef44382 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Quest_Info_Header.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
CQuest_Info_Header::CQuest_Info_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -8,7 +9,8 @@ CQuest_Info_Header::CQuest_Info_Header(ID3D11Device* pDevice, ID3D11DeviceContex
}
CQuest_Info_Header::CQuest_Info_Header(const CQuest_Info_Header& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -41,7 +43,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(0.f, 128.f, 0.f, 32.f);
m_fSortZ = 0.02f;
- m_fFontX = 740.f;
+ m_fFontX = 925.f;
m_fFontY = 520.f;
m_iColor = 2;
SizeUpX(1105.f);
@@ -127,8 +129,8 @@ HRESULT CQuest_Info_Header::Render()
return E_FAIL;
}
- _float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기") - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+ _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
@@ -218,11 +220,9 @@ void CQuest_Info_Header::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Info_Header* CQuest_Info_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.h b/Jusin154_Team3D/Client/Private/Quest_Info_Header.h
deleted file mode 100644
index de74f7283..000000000
--- a/Jusin154_Team3D/Client/Private/Quest_Info_Header.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CQuest_Info_Header final : public CElementObject
-{
-private:
- CQuest_Info_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Info_Header(const CQuest_Info_Header& rhs);
- virtual ~CQuest_Info_Header() = 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;
-
-public:
- void Set_Hover(_int Index);
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- _int m_iColor = true;
- _int m_iQuest_Index{};
-public:
- static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp
index 63a32434f..64ed82ffc 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp
@@ -208,11 +208,9 @@ void CQuest_Info_Line::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Info_Line* CQuest_Info_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp
index 2ebe8114f..41e723493 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp
@@ -1,14 +1,13 @@
#include "pch.h"
#include "Quest_Panel.h"
#include "GameInstance.h"
-#include "Quest_Border.h"
-#include "Quest_Header.h"
-#include "Quest_HeaderLine.h"
-#include "Quest_List.h"
#include "Quest_Info.h"
#include "Quest_Info_Header.h"
#include "Quest_Info_Line.h"
#include "Quest_Entry_Line.h"
+#include "Quest_Data.h"
+#include "Quest_Slot.h"
+#include "Quest_Status.h"
CQuest_Panel::CQuest_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -29,9 +28,9 @@ HRESULT CQuest_Panel::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
+ Desc.fX = 960.f;
+ Desc.fY = -540.f;
+ Desc.fSizeX = g_iWinSizeX;
Desc.fSizeY = g_iWinSizeY;
if (FAILED(__super::Initialize(&Desc)))
@@ -52,7 +51,11 @@ HRESULT CQuest_Panel::Initialize(void* pArg)
m_fDelayTime = 1.f;
Visible(true);
ElementAllVisible(true);
+ Set_Status();
+ Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
+ static_cast(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
return S_OK;
+
}
void CQuest_Panel::Priority_Update(_float fTimeDelta)
@@ -88,6 +91,18 @@ void CQuest_Panel::Late_Update(_float fTimeDelta)
HRESULT CQuest_Panel::Render()
{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -99,39 +114,67 @@ _vector CQuest_Panel::Get_WorldPostion()
HRESULT CQuest_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+
return S_OK;
}
HRESULT CQuest_Panel::Ready_Components(void* pArg)
{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Quest_Widget"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
return S_OK;
}
HRESULT CQuest_Panel::Ready_Element(void* pArg)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Border))))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot))))
{
return E_FAIL;
}
- Add_Element(TEXT("Quest_Border"), m_pQuest_Border);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Header))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Header"), m_pQuest_Header);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_HeaderLine))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_HeaderLine"), m_pQuest_HeaderLine);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_List))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_List"), m_pQuest_List);
+ Add_Element(TEXT("Quest_Slot"), m_pQuest_Slot);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info))))
{
@@ -157,9 +200,63 @@ HRESULT CQuest_Panel::Ready_Element(void* pArg)
}
Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3);
+
return S_OK;
}
+void CQuest_Panel::Set_Status()
+{
+ static_cast(m_pQuest_Status1)->Set_Status(0, -860.f, 400.f, TEXT("전 체"));
+ static_cast(m_pQuest_Status2)->Set_Status(1, -860.f, 220.f, TEXT("진행중"));
+ static_cast(m_pQuest_Status3)->Set_Status(2, -860.f, 40.f, TEXT("완 료"));
+ static_cast(m_pQuest_Status1)->Set_Click(true);
+ m_bClick[0] = true;
+ m_bClick[1] = false;
+ m_bClick[2] = false;
+}
+
+void CQuest_Panel::Slot_Hover(_int Index)
+{
+ _int iIndex{};
+ if (m_bClick[Index] == true)
+ return;
+
+ for (_int i = 0; i < 3; ++i)
+ {
+ if (i == Index)
+ {
+ m_bClick[i] = true;
+ iIndex = i;
+ }
+ else
+ {
+ m_bClick[i] = false;
+ }
+ }
+ static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]);
+ static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]);
+ static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]);
+
+ static_cast(m_pQuest_Slot)->Set_QuestType(iIndex);
+}
+
CQuest_Panel* CQuest_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CQuest_Panel* pInstance = new CQuest_Panel(pDevice, pContext);
@@ -190,6 +287,8 @@ void CQuest_Panel::Free()
{
__super::Free();
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
diff --git a/Jusin154_Team3D/Client/Private/Quest_List.cpp b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp
similarity index 52%
rename from Jusin154_Team3D/Client/Private/Quest_List.cpp
rename to Jusin154_Team3D/Client/Private/Quest_Slot.cpp
index 41c7e36bd..0b5d8f058 100644
--- a/Jusin154_Team3D/Client/Private/Quest_List.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp
@@ -1,32 +1,34 @@
#include "pch.h"
-#include "Quest_List.h"
+#include "Quest_Slot.h"
#include "GameInstance.h"
+#include "Quest_Panel.h"
#include "InfoInstance.h"
-CQuest_List::CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CQuest_Slot::CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
-CQuest_List::CQuest_List(const CQuest_List& rhs)
+CQuest_Slot::CQuest_Slot(const CQuest_Slot& rhs)
:CElementObject(rhs),
m_pInfoInstance(CInfoInstance::GetInstance())
{
}
-HRESULT CQuest_List::Initialize_Prototype()
+HRESULT CQuest_Slot::Initialize_Prototype()
{
return S_OK;
}
-HRESULT CQuest_List::Initialize(void* pArg)
+HRESULT CQuest_Slot::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = -475.f;
- Desc.fY = -150.f;
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
Desc.fSizeX = 256.f;
Desc.fSizeY = 64.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)))
@@ -38,17 +40,26 @@ HRESULT CQuest_List::Initialize(void* pArg)
return E_FAIL;
}
- m_fTimeMult = 3.f;
m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
+ m_fTimeMult = 3.f;
m_vNine_Slice = _float4(70.f, 186.f, 0.f, 64.f);
+ m_fAlphaTime = 1.f;
+ m_fFontX = 300.f;
+ m_fFontY = 330.f;
+ m_fOffSetX = 0.f;
+ m_fOffSetY = 85;
+ m_iCols = 1;
SizeUpX(495.f);
SizeUpY(80.f);
+ m_pVIBufferCom->Set_Cloned(true);
+ m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols);
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+ m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
Visible(true);
return S_OK;
}
-void CQuest_List::Priority_Update(_float fTimeDelta)
+void CQuest_Slot::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
@@ -57,18 +68,17 @@ void CQuest_List::Priority_Update(_float fTimeDelta)
__super::Priority_Update(fTimeDelta);
}
-void CQuest_List::Update(_float fTimeDelta)
+void CQuest_Slot::Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
+
if (m_bFadeIn == true)
{
if (m_fAlpha <= 1.f)
- {
m_fAlpha += fTimeDelta * m_fAlphaTime;
- }
if (m_fAlpha >= 1.f)
{
@@ -80,7 +90,7 @@ void CQuest_List::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ m_fAlpha -= fTimeDelta;
if (m_fAlpha <= 0.f)
{
@@ -88,71 +98,87 @@ void CQuest_List::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
-
Hover();
- if (m_bHover == true)
- {
- m_fSizeX = 505.f;
- m_fSizeY = 90.f;
- m_fFontX = 765.f;
- m_fFontY = 520.f;
- m_pFontSize = TEXT("Font_size21");
- m_pQuest_ID = 0;
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID);
- }
- else
- {
- m_fSizeX = 495.f;
- m_fSizeY = 80.f;
- m_fFontX = 770.f;
- m_fFontY = 520.f;
- m_pFontSize = TEXT("Font_size20");
- m_pQuest_ID = -1;
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID);
- }
+
+ static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_iQuestIndex);
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
-void CQuest_List::Late_Update(_float fTimeDelta)
+void CQuest_Slot::Late_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
- if (m_bVisible) {
+ if (m_bVisible)
+ {
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
}
+ __super::Late_Update(fTimeDelta);
}
-HRESULT CQuest_List::Render()
+HRESULT CQuest_Slot::Render()
{
- if (FAILED(Bind_ShaderResources())) {
+ if (FAILED(Bind_ShaderResources()))
+ {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::QUEST_SLOT))))
+ {
return E_FAIL;
}
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
return E_FAIL;
}
- if (FAILED(m_pVIBufferCom->Render())) {
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
return E_FAIL;
}
- m_pGameInstance->Render_Text(m_pFontSize, m_pQuest_Name.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
-
+ for (_int i = 0; i < m_iQuestCount; ++i)
+ {
+ m_fFontY = 190 + i * 85.f;
+ if (i == m_iQuestIndex)
+ {
+ m_pGameInstance->Render_Text(TEXT("Font_size30"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY));
+ }
+ else
+ {
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
+ }
+ }
return S_OK;
}
-_vector CQuest_List::Get_WorldPostion()
+_vector CQuest_Slot::Get_WorldPostion()
{
return m_pTransformCom->Get_State(STATE::POSITION);
}
-HRESULT CQuest_List::Bind_ShaderResources()
+void CQuest_Slot::SizeUpX(_float fSizeX)
+{
+ m_fSizeX = fSizeX;
+ m_pVIBufferCom->Set_SizeX(m_fSizeX);
+}
+
+void CQuest_Slot::SizeUpY(_float fSizeY)
+{
+ m_fSizeY = fSizeY;
+ m_pVIBufferCom->Set_SizeY(m_fSizeY);
+}
+
+void CQuest_Slot::SizeUpdate(_float fSizeX, _float fSizeY)
+{
+ m_fSizeX = fSizeX;
+ m_fSizeY = fSizeY;
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+}
+
+HRESULT CQuest_Slot::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
{
@@ -202,16 +228,12 @@ HRESULT CQuest_List::Bind_ShaderResources()
{
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
return S_OK;
}
-HRESULT CQuest_List::Ready_Components(void* pArg)
+HRESULT CQuest_Slot::Ready_Components(void* pArg)
{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Quest_Slot"), (CComponent**)&m_pVIBufferCom, nullptr)))
{
return E_FAIL;
}
@@ -219,7 +241,7 @@ HRESULT CQuest_List::Ready_Components(void* pArg)
{
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
{
return E_FAIL;
}
@@ -227,19 +249,18 @@ HRESULT CQuest_List::Ready_Components(void* pArg)
return S_OK;
}
-void CQuest_List::Hover()
+void CQuest_Slot::Hover()
{
POINT ptMouse{};
GetCursorPos(&ptMouse);
ScreenToClient(g_hWnd, &ptMouse);
- _float2 fMouse{};
+ _float2 fMouse;
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
- POINT pt{};
- pt.x = _long(fMouse.x);
- pt.y = _long(fMouse.y);
- if (PtInRect(&m_pRect, pt))
+ m_iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
+
+ if (m_iQuestIndex != -1)
{
m_bHover = true;
}
@@ -249,39 +270,57 @@ void CQuest_List::Hover()
}
}
-void CQuest_List::Set_Name(_wstring Name, _int ID)
+void CQuest_Slot::Set_QuestType(_int Index)
{
- m_pQuest_Name = Name;
- m_pQuest_ID = ID;
+ switch (Index)
+ {
+ case 0:
+ m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
+ m_pVIBufferCom->Set_Draw(-1);
+ break;
+
+ case 1:
+ m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::ACCEPTED));
+ m_pVIBufferCom->Set_Draw(m_iQuestCount);
+ break;
+
+ case 2:
+ m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::CLEARED));
+ m_pVIBufferCom->Set_Draw(m_iQuestCount);
+ break;
+
+ default:
+ break;
+ }
}
-CQuest_List* CQuest_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
- CQuest_List* pInstance = new CQuest_List(pDevice, pContext);
+ CQuest_Slot* pInstance = new CQuest_Slot(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
- MSG_BOX("Failed to Created : CQuest_List");
+ MSG_BOX("Failed to Created : CQuest_Slot");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-CGameObject* CQuest_List::Clone(void* pArg, CGameObject* pOwner)
+CGameObject* CQuest_Slot::Clone(void* pArg, CGameObject* pOwner)
{
- CQuest_List* pInstance = new CQuest_List(*this);
+ CQuest_Slot* pInstance = new CQuest_Slot(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
- MSG_BOX("Failed to Cloned : CSpell_Header");
+ MSG_BOX("Failed to Cloned : CQuest_Slot");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-void CQuest_List::Free()
+void CQuest_Slot::Free()
{
__super::Free();
@@ -290,8 +329,9 @@ void CQuest_List::Free()
SAFE_RELEASE(m_pVIBufferCom);
}
+
#ifdef _DEBUG
-void CQuest_List::Describe_Entity()
+void CQuest_Slot::Describe_Entity()
{
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Quest_Status.cpp b/Jusin154_Team3D/Client/Private/Quest_Status.cpp
index fa937fdfa..28561bc22 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Status.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Status.cpp
@@ -42,8 +42,8 @@ HRESULT CQuest_Status::Initialize(void* pArg)
m_fAlphaTime = 1.f;
Compute_UI(0);
m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f };
- m_fFontX = 80.f;
- m_fFontY = 480.f;
+ m_fFontX = -780.f;
+ m_fFontY = 610.f;
Visible(true);
return S_OK;
}
@@ -97,7 +97,7 @@ void CQuest_Status::Update(_float fTimeDelta)
static_cast(m_pOwner)->Function_Callback(TEXT("Click"), &m_iIndex);
}
}
-
+
if (m_bClick == true)
{
m_fSizeX = 148.f;
@@ -115,6 +115,7 @@ void CQuest_Status::Update(_float fTimeDelta)
__super::Update(fTimeDelta);
}
+
void CQuest_Status::Late_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -274,12 +275,13 @@ void CQuest_Status::Compute_UI(_int Index)
m_vUV = UV;
}
-void CQuest_Status::Set_Status(_int Index, _float m_fPosY, _wstring Text)
+void CQuest_Status::Set_Status(_int Index, _float PosX, _float PosY, _wstring Name)
{
m_iIndex = Index;
Compute_UI(Index);
- MoveY(m_fPosY);
- m_pName = Text;
+ MoveX(PosX);
+ MoveY(PosY);
+ m_pName = Name;
}
void CQuest_Status::Set_Click(_bool bClick)
diff --git a/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp
deleted file mode 100644
index 410ab2832..000000000
--- a/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-#include "pch.h"
-#include "Quest_Status_Panel.h"
-#include "GameInstance.h"
-#include "Quest_Status.h"
-
-CQuest_Status_Panel::CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CQuest_Status_Panel::CQuest_Status_Panel(const CQuest_Status_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CQuest_Status_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Initialize(void* pArg)
-{
-
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -860.f;
- Desc.fY = 120.f;
- Desc.fSizeX = 175.f;
- Desc.fSizeY = 680.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;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
-
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(true);
- Set_Status();
- Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
- return S_OK;
-}
-
-void CQuest_Status_Panel::Set_Status()
-{
- static_cast(m_pQuest_Status1)->Set_Status(0, 180.f, TEXT("전 체"));
- static_cast(m_pQuest_Status2)->Set_Status(1, 0.f, TEXT("진행중"));
- static_cast(m_pQuest_Status3)->Set_Status(2, -180.f, TEXT("완 료"));
- static_cast(m_pQuest_Status1)->Set_Click(true);
- m_bClick[0] = true;
- m_bClick[1] = false;
- m_bClick[2] = false;
-}
-
-void CQuest_Status_Panel::Slot_Hover(_int Index)
-{
- for (_int i = 0; i < 3; ++i)
- {
- if (i == Index)
- {
- m_bClick[i] = true;
- }
- else
- {
- m_bClick[i] = false;
- }
- }
- static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]);
- static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]);
- static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]);
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestPanelUpdate"), &Index);
-}
-
-void CQuest_Status_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Status_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Status_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Status_Panel::Render()
-{
- return S_OK;
-}
-
-_vector CQuest_Status_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Status_Panel::Bind_ShaderResources()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Ready_Element(void* pArg)
-{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3);
-
- return S_OK;
-}
-
-CQuest_Status_Panel* CQuest_Status_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Status_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Status_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Status_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Status_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-#ifdef _DEBUG
-void CQuest_Status_Panel::Describe_Entity()
-{
-}
-#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
index b1756e7b6..6db20bcc1 100644
--- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
@@ -17,6 +17,7 @@ HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon
m_bNoCool = false;
m_pInfoInstance->Add_Event(TEXT("NoCooL"), [this](void* p) {this->NoCool(*reinterpret_cast<_bool*>(p)); });
Spell_UnLock(2);
+ Spell_UnLock(4);
Spell_UnLock(6);
Spell_UnLock(11);
Spell_UnLock(14);
@@ -89,7 +90,7 @@ void CSkill_Data::Update(_float fTimeDelta)
{
for (_int i = 0; i < 34; ++i)
{
- m_fSpell_CoolTime[i] = 1.f;
+ m_fSpell_CoolTime[i] = 1.2f;
}
}
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index a1dcd7a2f..c187db4dc 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -20,7 +20,7 @@ namespace Client
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
ENEMY_DETECTION, INTERACTION_OBJECT, END};
- enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, END };
+ enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
enum class SHADER_PASS_NPC_PBR_ANIM {
EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To
@@ -29,6 +29,9 @@ namespace Client
};
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST_CANVES, INVENTORY, END };
+ enum class QUESTTYPE { MAIN, SUB, END };
+ enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END };
+
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
enum class SKILL_TYPE {
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index 5bb4a18b5..2a5ce88be 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -68,10 +68,10 @@ namespace Client
typedef struct tagObjectiveInfo
{
- _int iObjectType{};
- _int iTargetID{};
- _int iRequiredCount{};
- _int iCurrentCount{};
+ _bool bClear{};
+ _int iTargetID{};
+ _int iRequiredCount{};
+ _int iCurrentCount{};
}OBJECTIVEINFO;
typedef struct tagRewardsInfo
@@ -84,10 +84,11 @@ namespace Client
{
_int iQuestID{};
_int iType{};
- _wstring pQuestName;
- _wstring pQuestInfo;
+ _wstring pQuestName;
+ _wstring pQuestInfo;
vector ObjectiveInfo;
vector RewardsInfo;
+ _int iAcceptState;
}QUESTINFO;
typedef struct tagEffectInfo
diff --git a/Jusin154_Team3D/Client/Public/Completed_Panel.h b/Jusin154_Team3D/Client/Public/Completed_Panel.h
deleted file mode 100644
index 707251e79..000000000
--- a/Jusin154_Team3D/Client/Public/Completed_Panel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CCompleted_Panel final : public CPanelObject
-{
-private:
- CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CCompleted_Panel(const CCompleted_Panel& rhs);
- virtual ~CCompleted_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
-public:
- static CCompleted_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Public/InProgress_Panel.h b/Jusin154_Team3D/Client/Public/InProgress_Panel.h
deleted file mode 100644
index 38f3b5168..000000000
--- a/Jusin154_Team3D/Client/Public/InProgress_Panel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CInProgress_Panel final : public CPanelObject
-{
-private:
- CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CInProgress_Panel(const CInProgress_Panel& rhs);
- virtual ~CInProgress_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
-public:
- static CInProgress_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h
index b3b50d919..92c5ff8f9 100644
--- a/Jusin154_Team3D/Client/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Client/Public/InfoInstance.h
@@ -66,10 +66,14 @@ DECLARE_SINGLETON(CInfoInstance)
void Add_Event(_wstring EventName, function Event);
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
#pragma endregion
-#pragma region Spell_INFO
+#pragma region QuestINFO
+ QUESTINFO Get_Quest(_int QuestID);
+ _int Get_Quest_Count(_int Index);
+ const vector& Get_AllQuest() const;
+ const vector& Get_ClearQuest() const;
+ const vector& Get_AcceptQuest() const;
+ HRESULT Set_AcceptQuest(_int Index);
#pragma endregion
- QUESTINFO Get_Quest_Info(_int QuestID);
- _int Get_Quest_Count();
#pragma region Interactive_INFO
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
diff --git a/Jusin154_Team3D/Client/Public/QuestInstance.h b/Jusin154_Team3D/Client/Public/QuestInstance.h
new file mode 100644
index 000000000..55df4676d
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/QuestInstance.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Quest.h"
+
+NS_BEGIN(Client)
+class CQuestInstance final : public CQuest
+{
+private:
+ CQuestInstance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CQuestInstance(const CQuestInstance& rhs);
+ virtual ~CQuestInstance() = default;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ static CQuestInstance* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Quest_Border.h b/Jusin154_Team3D/Client/Public/Quest_Border.h
deleted file mode 100644
index e103451f6..000000000
--- a/Jusin154_Team3D/Client/Public/Quest_Border.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CQuest_Border final : public CElementObject
-{
-private:
- CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Border(const CQuest_Border& rhs);
- virtual ~CQuest_Border() = 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_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
- CInfoInstance* m_pInfoInstance = { nullptr };
-
- _int m_iColor{};
- _int m_iQuest_Count{};
-
-public:
- static CQuest_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Public/Quest_Canvas.h b/Jusin154_Team3D/Client/Public/Quest_Canvas.h
index 83004c68d..2f452a465 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Canvas.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Canvas.h
@@ -34,18 +34,12 @@ class CQuest_Canvas final : public CCanvasObject
public:
void Clear_Penel();
- void Update_Panel(_int Index);
-
+ virtual void Visible(_bool bVisible) override;
+
private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
CGameObject* m_pQuest_Panel = { nullptr };
- CGameObject* m_pInProgress_Panel = { nullptr };
- CGameObject* m_pCompleted_Panel = { nullptr };
- CGameObject* m_pQuest_Status_Panel = { nullptr };
-
+ CInfoInstance* m_pInfoInstance = { nullptr };
_bool m_bClick[3] = { false };
_int m_iIndex{};
public:
diff --git a/Jusin154_Team3D/Client/Public/Quest_Data.h b/Jusin154_Team3D/Client/Public/Quest_Data.h
index a4bc2cb7c..256bca4cc 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Data.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Data.h
@@ -19,22 +19,37 @@ class CQuest_Data final : public CBase
public:
virtual void Update(_float fTimeDelta);
-public:
+private:
HRESULT Load_QuestInfo(const _char* pFilePath);
+ void Set_ClearQuest(_int Index);
+ void Update_AcceptQuest(_int MonsterIndex = -1);
+
+public:
QUESTINFO Get_Quest(_int QuestID);
- _int Get_Count();
- //const SPELLINFO& Get_Info(_uint SpellID) const;
+ _int Get_Count(_int Index);
+ const vector& Get_AllQuest() const;
+ const vector& Get_ClearQuest() const;
+ const vector& Get_AcceptQuest() const;
+ HRESULT Set_AcceptQuest(_int index);
private:
CInfoInstance* m_pInfoInstance = { nullptr };
+ CGameObject* m_pQuestInstance = { nullptr };
+ CGameInstance* m_pGameInstance = { nullptr };
QUESTINFO QuestInfo = {};
OBJECTIVEINFO ObjectiveInfo = {};
REWARDSINFO RewardsInfo = {};
vector QuestInfos;
+ vector m_QuestNoneInfos;
+ vector m_QuestAcceptedInfoObject;
+ vector m_QuestAcceptedInfos;
+ vector m_QuestEndInfos;
_int m_iQuest_Count{};
+ _int m_iClearQeustCount{};
+ _int m_iAcceptQeustCount{};
_bool m_bClear[1] = { false };
diff --git a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h
index fd9143ab1..9bde54342 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h
@@ -41,6 +41,7 @@ class CQuest_Entry_Line final : public CElementObject
_int m_iColor = { false };
_int m_iQuest_Index{};
+
public:
static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Quest_Header.h b/Jusin154_Team3D/Client/Public/Quest_Header.h
deleted file mode 100644
index 4d342cf34..000000000
--- a/Jusin154_Team3D/Client/Public/Quest_Header.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CQuest_Header final : public CElementObject
-{
-private:
- CQuest_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Header(const CQuest_Header& rhs);
- virtual ~CQuest_Header() = 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_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- _int m_iColor = true;
-
-public:
- static CQuest_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Public/Quest_HeaderLine.h b/Jusin154_Team3D/Client/Public/Quest_HeaderLine.h
deleted file mode 100644
index 8da67c8d6..000000000
--- a/Jusin154_Team3D/Client/Public/Quest_HeaderLine.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CQuest_HeaderLine final : public CElementObject
-{
-private:
- CQuest_HeaderLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_HeaderLine(const CQuest_HeaderLine& rhs);
- virtual ~CQuest_HeaderLine() = 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_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
-public:
- static CQuest_HeaderLine* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Client/Public/Quest_Info.h b/Jusin154_Team3D/Client/Public/Quest_Info.h
index 33f64e160..c80b80d3b 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Info.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Info.h
@@ -39,6 +39,7 @@ class CQuest_Info final : public CElementObject
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CInfoInstance* m_pInfoInstance = { nullptr };
_wstring m_pQuest_Info;
diff --git a/Jusin154_Team3D/Client/Public/Quest_Info_Header.h b/Jusin154_Team3D/Client/Public/Quest_Info_Header.h
index 924b7f72b..c2d336332 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Info_Header.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Info_Header.h
@@ -38,10 +38,10 @@ class CQuest_Info_Header final : public CElementObject
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CInfoInstance* m_pInfoInstance = { nullptr };
_int m_iColor = true;
_int m_iQuest_Index{};
-
public:
static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Quest_Panel.h b/Jusin154_Team3D/Client/Public/Quest_Panel.h
index 219ff8e25..49a8daac2 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Panel.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Panel.h
@@ -32,20 +32,29 @@ class CQuest_Panel final : public CPanelObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+private:
+ void Set_Status();
+ void Slot_Hover(_int Index);
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
- CGameObject* m_pQuest_Border = { nullptr };
- CGameObject* m_pQuest_Header = { nullptr };
- CGameObject* m_pQuest_HeaderLine = { nullptr };
- CGameObject* m_pQuest_List = { nullptr };
+ class CQuest_Data* m_pQuest_Date = { nullptr };
+
+ CGameObject* m_pQuest_Data = { nullptr };
+
CGameObject* m_pQuest_Info = { nullptr };
- CGameObject* m_pQuest_Info_Header= { nullptr };
+ CGameObject* m_pQuest_Info_Header = { nullptr };
CGameObject* m_pQuest_Info_Line = { nullptr };
CGameObject* m_pQuest_Entry_Line = { nullptr };
+ CGameObject* m_pQuest_Slot = { nullptr };
+ CGameObject* m_pQuest_Status1 = { nullptr };
+ CGameObject* m_pQuest_Status2 = { nullptr };
+ CGameObject* m_pQuest_Status3 = { nullptr };
+ _bool m_bClick[3] = { false };
public:
static CQuest_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Quest_List.h b/Jusin154_Team3D/Client/Public/Quest_Slot.h
similarity index 62%
rename from Jusin154_Team3D/Client/Public/Quest_List.h
rename to Jusin154_Team3D/Client/Public/Quest_Slot.h
index a2c8264a0..55992e9cc 100644
--- a/Jusin154_Team3D/Client/Public/Quest_List.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Slot.h
@@ -11,12 +11,12 @@ NS_END
NS_BEGIN(Client)
-class CQuest_List final : public CElementObject
+class CQuest_Slot final : public CElementObject
{
private:
- CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_List(const CQuest_List& rhs);
- virtual ~CQuest_List() = default;
+ CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CQuest_Slot(const CQuest_Slot& rhs);
+ virtual ~CQuest_Slot() = default;
public:
virtual void Priority_Update(_float fTimeDelta);
@@ -25,6 +25,10 @@ class CQuest_List final : public CElementObject
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
+ virtual void SizeUpX(_float fSizeX) override;
+ virtual void SizeUpY(_float fSizeY) override;
+ virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
+
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
@@ -35,21 +39,23 @@ class CQuest_List final : public CElementObject
void Hover();
public:
- void Set_Name(_wstring Name, _int ID);
+ void Set_QuestType(_int Index);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
CInfoInstance* m_pInfoInstance = { nullptr };
- _int m_iColor = { false };
- _wstring m_pFontSize;
- _wstring m_pQuest_Name;
- _int m_pQuest_ID{};
+ _float m_fOffSetX{};
+ _float m_fOffSetY{};
+ _uint m_iCols{};
+ _int m_iColor{};
+ _int m_iQuestIndex{};
+ _int m_iQuestCount{};
public:
- static CQuest_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Public/Quest_Status.h b/Jusin154_Team3D/Client/Public/Quest_Status.h
index 8b695e022..4e01c29e8 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Status.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Status.h
@@ -33,7 +33,7 @@ class CQuest_Status final : public CElementObject
public:
void Compute_UI(_int Index);
- void Set_Status(_int Index, _float m_PosY, _wstring Text);
+ void Set_Status(_int Index, _float PosX, _float m_PosY, _wstring Name);
void Set_Click(_bool bClick);
diff --git a/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h b/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h
deleted file mode 100644
index aae0f7b37..000000000
--- a/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#pragma once
-
-#include "Client_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Engine)
-class CTexture;
-class CShader;
-class CVIBuffer_Rect;
-NS_END
-
-NS_BEGIN(Client)
-
-class CQuest_Status_Panel final : public CPanelObject
-{
-private:
- CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Status_Panel(const CQuest_Status_Panel& rhs);
- virtual ~CQuest_Status_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- void Set_Status();
- void Slot_Hover(_int Index);
-
-private:
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- CGameObject* m_pQuest_Status1 = { nullptr };
- CGameObject* m_pQuest_Status2 = { nullptr };
- CGameObject* m_pQuest_Status3 = { nullptr };
-
- _bool m_bClick[3] = { false };
-
-public:
- static CQuest_Status_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
-#ifdef _DEBUG
- void Describe_Entity() override;
-#endif // _DEBUG
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Quest/QuestData.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Quest/QuestData.xml
index 5ae2d3c4d..c6b599976 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Quest/QuestData.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Quest/QuestData.xml
@@ -1,8 +1,80 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
index be76ce6ef..06c4d8874 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
index 39b9795ae..7de7861b6 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
@@ -18,7 +18,9 @@ float g_fFar;
float g_fTime;
float4 g_UV;
-
+float2 g_fOrigin_Size;
+float2 g_fCurrent_Size;
+float4 g_fNine_Slice;
struct VS_IN
{
float3 vPosition : POSITION;
@@ -435,6 +437,67 @@ PS_OUT PS_Spell_Lock(PS_IN In)
return Out;
}
+PS_OUT PS_Quest_Slot(PS_IN In)
+{
+ PS_OUT Out;
+
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float4 color = float4(1.f, 1.f, 1.f, 1.f);
+
+ float2 uv = In.vTexcoord;
+ float2 CurrentPixelPosition = uv * g_fCurrent_Size;
+ float OriginLeft = g_fNine_Slice.x;
+ float OriginRight = g_fNine_Slice.y;
+ float OriginTop = g_fNine_Slice.z;
+ float OriginBottom = g_fNine_Slice.w;
+
+ float CurrentLeft = OriginLeft;
+ float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
+ float CurrentTop = OriginTop;
+ float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
+
+ float2 Finaluv = In.vTexcoord;
+
+ if (CurrentPixelPosition.x < CurrentLeft)
+ {
+ Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
+ }
+ else if (CurrentPixelPosition.x > CurrentRight)
+ {
+ float dist = CurrentPixelPosition.x - CurrentRight;
+ Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
+ Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
+ }
+
+ if (CurrentPixelPosition.y < CurrentTop)
+ {
+ Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
+ }
+ else if (CurrentPixelPosition.y > CurrentBottom)
+ {
+ float dist = CurrentPixelPosition.y - CurrentBottom;
+ Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
+ Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
+ }
+
+ float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv);
+
+ color = tex1;
+
+ color.a *= Alpha;
+ Out.vColor = color;
+
+ return Out;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -568,4 +631,15 @@ technique11 PosTexTechnique11
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_Spell_Lock();
}
+
+ pass Quest_Slot
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Quest_Slot();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 46952b7dd..ed7bf8cef 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -177,30 +177,25 @@ call Update_Shaders.bat
-
-
-
+
-
-
-
+
-
+
-
@@ -400,30 +395,25 @@ call Update_Shaders.bat
-
-
-
+
-
-
-
+
-
+
-
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 9f087cbae..da3bf4584 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -586,18 +586,6 @@
{cf0e6cef-f688-481a-8e7e-478038907ca8}
-
- {0a514079-ba47-4973-8472-07a80f1390cc}
-
-
- {104ae31b-3c6a-4acb-9886-abace9859c6e}
-
-
- {2af37b38-5cbe-4701-8681-638dfe78a9ce}
-
-
- {0dfdc08d-b662-45f1-a1ea-1ca474010600}
-
{971fb38a-f92c-4eea-99d3-287704800ba5}
@@ -607,24 +595,21 @@
{a5e3c859-7e28-47b3-8b2e-3be3348bb7ee}
-
- {2347d77a-ac72-4b3e-bf5f-434ca410e544}
-
-
- {a0cb1a30-7aab-4722-a0c3-fb75cc8986a7}
-
-
- {c6fd65c0-d447-49b7-88f8-a7b12c21e6a2}
-
-
- {300bca91-ce47-43bb-8848-c1632a714bf3}
-
-
- {18181fd1-eb00-4d29-a2aa-071428fe4ba6}
-
{daeac33b-8465-457b-ba3f-18738f7a0d32}
+
+ {18181fd1-eb00-4d29-a2aa-071428fe4ba6}
+
+
+ {64947266-fbe6-49ca-aa4d-bb58a5a3aff5}
+
+
+ {f4b89bbe-d67d-4314-9843-5daf515e7ee7}
+
+
+ {a2d06f57-c74f-4604-91b4-884bf6586584}
+
@@ -1209,18 +1194,6 @@
50.UI\Quest_Canvas\Quest_Panel
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Border
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Header
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_HeaderLine
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_List
-
50.UI\Quest_Canvas\Quest_Panel\Quest_Info
@@ -1230,24 +1203,21 @@
50.UI\Quest_Canvas\Quest_Panel\Quest_Info_Line
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
-
-
- 50.UI\Quest_Canvas\Quest_Status_Panel
-
-
- 50.UI\Quest_Canvas\Completed_Panel
-
-
- 50.UI\Quest_Canvas\InProgress_Panel
-
- 50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Status
50.UI\GamePlay_Canvas\Interaction_Panel
+
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Slot
+
+
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
+
+
+ 50.UI\QuestInstance
+
@@ -1834,18 +1804,6 @@
50.UI\Quest_Canvas\Quest_Panel
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Border
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Header
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_HeaderLine
-
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_List
-
50.UI\Quest_Canvas\Quest_Panel\Quest_Info
@@ -1855,24 +1813,21 @@
50.UI\Quest_Canvas\Quest_Panel\Quest_Info_Line
-
- 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
-
-
- 50.UI\Quest_Canvas\Quest_Status_Panel
-
-
- 50.UI\Quest_Canvas\Completed_Panel
-
-
- 50.UI\Quest_Canvas\InProgress_Panel
-
- 50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Status
50.UI\GamePlay_Canvas\Interaction_Panel
+
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Slot
+
+
+ 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line
+
+
+ 50.UI\QuestInstance
+
diff --git a/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp b/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp
deleted file mode 100644
index 415817f61..000000000
--- a/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-#include "pch.h"
-#include "Completed_Panel.h"
-#include "GameInstance.h"
-
-CCompleted_Panel::CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CCompleted_Panel::CCompleted_Panel(const CCompleted_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CCompleted_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
- Desc.fSizeY = g_iWinSizeY;
-
- if (FAILED(__super::Initialize(&Desc)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Components(pArg)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(false);
- ElementAllVisible(true);
- return S_OK;
-}
-
-void CCompleted_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CCompleted_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- __super::Update(fTimeDelta);
-}
-
-void CCompleted_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-
-HRESULT CCompleted_Panel::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CCompleted_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CCompleted_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CCompleted_Panel::Ready_Element(void* pArg)
-{
- return S_OK;
-}
-
-CCompleted_Panel* CCompleted_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CCompleted_Panel* pInstance = new CCompleted_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CCompleted_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CCompleted_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CCompleted_Panel* pInstance = new CCompleted_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CCompleted_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CCompleted_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CCompleted_Panel::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp b/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp
deleted file mode 100644
index bdaf86615..000000000
--- a/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-#include "pch.h"
-#include "InProgress_Panel.h"
-#include "GameInstance.h"
-
-CInProgress_Panel::CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CInProgress_Panel::CInProgress_Panel(const CInProgress_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CInProgress_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
- Desc.fSizeY = g_iWinSizeY;
-
- if (FAILED(__super::Initialize(&Desc)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Components(pArg)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(false);
- ElementAllVisible(true);
- return S_OK;
-}
-
-void CInProgress_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CInProgress_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- __super::Update(fTimeDelta);
-}
-
-void CInProgress_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CInProgress_Panel::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CInProgress_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CInProgress_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CInProgress_Panel::Ready_Element(void* pArg)
-{
- return S_OK;
-}
-
-CInProgress_Panel* CInProgress_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CInProgress_Panel* pInstance = new CInProgress_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CInProgress_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CInProgress_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CInProgress_Panel* pInstance = new CInProgress_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CInProgress_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CInProgress_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CInProgress_Panel::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 75e162fc2..061ae69cc 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -102,20 +102,14 @@
#include "Quest_Canvas.h"
#include "Quest_Panel.h"
-#include "Quest_Border.h"
-#include "Quest_Header.h"
-#include "Quest_HeaderLine.h"
-#include "Quest_List.h"
#include "Quest_Info.h"
#include "Quest_Info_Header.h"
#include "Quest_Info_Line.h"
#include "Quest_Entry_Line.h"
-
-#include "Quest_Status_Panel.h"
#include "Quest_Status.h"
+#include "Quest_Slot.h"
-#include "Completed_Panel.h"
-#include "InProgress_Panel.h"
+#include "QuestInstance.h"
#include "IMGUIUI.h"
@@ -919,6 +913,15 @@ HRESULT CLoader::Loading_For_UI()
return E_FAIL;
}
+ CVIBuffer_UI_Instance::UI_INSTANCE_DESC Quest_Slot_Desc{};
+
+ Quest_Slot_Desc.iNum = 10;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Quest_Slot"),
+ CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Quest_Slot_Desc)))) {
+ return E_FAIL;
+ }
+
m_strMessage = TEXT("Shader Loading..");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIINSTANCE,
@@ -1147,22 +1150,6 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Border::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Header::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_HeaderLine::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_List::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Info::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
@@ -1179,22 +1166,15 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
-
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status_Panel::Create(m_pDevice, m_pContext))))
- {
- return E_FAIL;
- }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
-
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCompleted_Panel::Create(m_pDevice, m_pContext))))
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Slot::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
-
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInProgress_Panel::Create(m_pDevice, m_pContext))))
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuestInstance::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Editor/Private/QuestInstance.cpp b/Jusin154_Team3D/Editor/Private/QuestInstance.cpp
new file mode 100644
index 000000000..7a3eb40e6
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/QuestInstance.cpp
@@ -0,0 +1,68 @@
+#include "pch.h"
+#include "QuestInstance.h"
+
+CQuestInstance::CQuestInstance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CQuest(pDevice, pContext)
+{
+}
+
+CQuestInstance::CQuestInstance(const CQuestInstance& rhs)
+ :CQuest(rhs)
+{
+}
+
+
+HRESULT CQuestInstance::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CQuestInstance::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CQuestInstance::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+CQuestInstance* CQuestInstance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CQuestInstance* pInstance = new CQuestInstance(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CQuestInstance");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CQuestInstance::Clone(void* pArg, CGameObject* pOwner)
+{
+ CQuestInstance* pInstance = new CQuestInstance(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Header");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CQuestInstance::Free()
+{
+ __super::Free();
+}
+
+void CQuestInstance::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Border.cpp b/Jusin154_Team3D/Editor/Private/Quest_Border.cpp
deleted file mode 100644
index e48047b5c..000000000
--- a/Jusin154_Team3D/Editor/Private/Quest_Border.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-#include "pch.h"
-#include "Quest_Border.h"
-#include "GameInstance.h"
-#include "Quest_Data.h"
-
-CQuest_Border::CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_Border::CQuest_Border(const CQuest_Border& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CQuest_Border::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Border::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 150.f;
- Desc.fSizeX = 192.f;
- Desc.fSizeY = 192.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f);
- m_fSortZ = 0.02f;
- m_fFontX = -10.f;
- m_fFontY = -50.f;
- SizeUpX(500.f);
- SizeUpY(500.f);
- Visible(true);
- static_cast(m_pOwner)->Add_Function(TEXT("QUEST_DATA"), [this](void* p) {this->Set_Quest_Data(reinterpret_cast(p)); });
- return S_OK;
-}
-
-void CQuest_Border::Set_Quest_Data(CQuest_Data* Data)
-{
- m_pQuest_Data = Data;
-
- m_iCount = m_pQuest_Data->Get_Count();
-}
-
-void CQuest_Border::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Border::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- m_fAlpha += fTimeDelta * m_fAlphaTime;
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_bHover = true;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- {
- m_fAlpha -= fTimeDelta * m_fAlphaTime;
- m_bHover = false;
- }
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
- m_fTime += fTimeDelta * m_fTimeMult;
-
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Border::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Border::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("전 체")) - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("전 체"), _float2((m_fFontX - m_fX) - OffSet, m_fFontY + m_fY));
-
- for (_int i = 0; i < m_iCount; ++i)
- {
- m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pQuest_Data->Get_Quest(i).pQuestName.c_str(), _float2((-210 - m_fX), 100 + m_fY));
-
- }
- return S_OK;
-}
-
-_vector CQuest_Border::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Border::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_Border::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_LighthouseGoalBorder_4k"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_Border* CQuest_Border::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Border* pInstance = new CQuest_Border(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Border");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Border::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Border* pInstance = new CQuest_Border(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Border");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Border::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CQuest_Border::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp
index f9345a65d..50c73e7c2 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp
@@ -3,10 +3,6 @@
#include "Quest_Canvas.h"
#include "GameInstance.h"
#include "Quest_Panel.h"
-#include "Quest_Status_Panel.h"
-#include "Completed_Panel.h"
-#include "InProgress_Panel.h"
-#include "Quest_Data.h"
CQuest_Canvas::CQuest_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CCanvasObject(pDevice, pContext)
@@ -27,8 +23,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = 960.f;
- Desc.fY = 540.f;
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
Desc.fSizeX = g_iWinSizeX;
Desc.fSizeY = g_iWinSizeY;
@@ -44,14 +40,7 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
{
return E_FAIL;
}
- m_fAlpha = 1.f;
- m_fOwnerAlpha = 1.f;
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.05f;
Visible(false);
- m_iIndex = -1;
- Add_Function(TEXT("QuestPanelUpdate"), [this](void* p) {this->Update_Panel(*reinterpret_cast<_int*>(p)); });
- Function_Callback(TEXT("QUESTPANELDATA"), m_pQuest_Data);
return S_OK;
}
@@ -76,19 +65,6 @@ void CQuest_Canvas::Late_Update(_float fTimeDelta)
HRESULT CQuest_Canvas::Render()
{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
return S_OK;
}
@@ -99,39 +75,6 @@ _vector CQuest_Canvas::Get_WorldPostion()
HRESULT CQuest_Canvas::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
-
- }
return S_OK;
}
@@ -141,49 +84,18 @@ HRESULT CQuest_Canvas::Ready_Components(void* pArg)
{
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Quest_Widget"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
return S_OK;
}
HRESULT CQuest_Canvas::Ready_Panel(void* pArg)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Data))))
- {
- return E_FAIL;
- }
-
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel))))
{
return E_FAIL;
}
Add_Panel(TEXT("Quest_Panel"), m_pQuest_Panel);
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pCompleted_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("Completed_Panel"), m_pCompleted_Panel);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pInProgress_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("InProgress_Panel"), m_pInProgress_Panel);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Status_Panel))))
- {
- return E_FAIL;
- }
- Add_Panel(TEXT("Quest_Status_Panel"), m_pQuest_Status_Panel);
-
return S_OK;
}
@@ -191,33 +103,6 @@ void CQuest_Canvas::Clear_Penel()
{
}
-void CQuest_Canvas::Update_Panel(_int Index)
-{
- if (m_iIndex == Index)
- return;
-
- m_iIndex = Index;
- for (_int i = 0; i < 3; ++i)
- {
- if (i == Index)
- {
- m_bClick[i] = true;
- }
- else
- {
- m_bClick[i] = false;
- }
- }
- static_cast(m_pQuest_Panel)->Visible(m_bClick[0]);
- static_cast(m_pCompleted_Panel)->Visible(m_bClick[1]);
- static_cast(m_pInProgress_Panel)->Visible(m_bClick[2]);
-}
-
-CQuest_Data* CQuest_Canvas::Get_Data()
-{
- return static_cast(m_pQuest_Data);
-}
-
CQuest_Canvas* CQuest_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CQuest_Canvas* pInstance = new CQuest_Canvas(pDevice, pContext);
@@ -248,8 +133,6 @@ void CQuest_Canvas::Free()
{
__super::Free();
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
index fb98fa97b..87145ea6f 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
@@ -3,6 +3,7 @@
#include "GameObject.h"
#include "UIObject.h"
#include "tinyxml2.h"
+#include "QuestInstance.h"
CQuest_Data::CQuest_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CGameObject(pDevice, pContext)
@@ -53,8 +54,9 @@ HRESULT CQuest_Data::Initialize(void* pArg)
while (pObjective)
{
OBJECTIVEINFO obj{};
-
- pObjective->QueryIntAttribute("Objective", &obj.iObjectType);
+ _int Clear = 0;
+ pObjective->QueryIntAttribute("Objective", &Clear);
+ obj.bClear = Clear != 0;
pObjective->QueryIntAttribute("TargetID", &obj.iTargetID);
pObjective->QueryIntAttribute("RequiredCount", &obj.iRequiredCount);
pObjective->QueryIntAttribute("CurrentCount", &obj.iCurrentCount);
@@ -87,6 +89,8 @@ HRESULT CQuest_Data::Initialize(void* pArg)
pQuest = pQuest->NextSiblingElement("Quest");
}
+ Set_AcceptQuest(0);
+
return S_OK;
}
@@ -96,6 +100,8 @@ void CQuest_Data::Priority_Update(_float fTimeDelta)
void CQuest_Data::Update(_float fTimeDelta)
{
+ if (m_pGameInstance->Key_Down(DIK_0))
+ Update_AcceptQuest(0);
}
void CQuest_Data::Late_Update(_float fTimeDelta)
@@ -117,9 +123,83 @@ CQuest_Data::QUESTINFO CQuest_Data::Get_Quest(_int QuestID)
return QuestInfos[QuestID];
}
-_int CQuest_Data::Get_Count()
+const vector& CQuest_Data::Get_AllQuest() const
{
- return m_iQuest_Count;
+ return CQuest_Data::QuestInfos;
+}
+
+const vector& CQuest_Data::Get_ClearQuest() const
+{
+ return CQuest_Data::m_QuestEndInfos;
+}
+
+const vector& CQuest_Data::Get_AcceptQuest() const
+{
+ return CQuest_Data::m_QuestAcceptedInfos;
+}
+
+_int CQuest_Data::Get_Count(_int Index)
+{
+ switch (Index)
+ {
+ case 0:
+ return m_iQuest_Count;
+
+ case 1:
+ return m_iAcceptQeustCount;
+
+ case 2:
+ return m_iClearQeustCount;
+
+ default:
+ return -1;
+ }
+}
+
+HRESULT CQuest_Data::Set_AcceptQuest(_int Index)
+{
+ if (QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::ACCEPTED) || QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::CLEARED))
+ return S_OK;
+ QuestInfos[Index].iAcceptState = ENUM_CLASS(QUESTSTATE::ACCEPTED);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer
+ (g_iStaticLevel, NEXT_LEVEL, LAYER_UI, &QuestInfos[Index], this, reinterpret_cast (&m_pQuestInstance))))
+ {
+ return E_FAIL;
+ }
+
+ m_QuestAcceptedInfoObject.push_back(m_pQuestInstance);
+ m_QuestAcceptedInfos.push_back(QuestInfos[Index]);
+ m_iAcceptQeustCount++;
+ return S_OK;
+}
+
+void CQuest_Data::Set_ClearQuest(_int Index)
+{
+ if (QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::NONE) || QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::CLEARED))
+ return;
+
+ QuestInfos[Index].iAcceptState = ENUM_CLASS(QUESTSTATE::CLEARED);
+ m_QuestEndInfos.push_back(QuestInfos[Index]);
+ m_iClearQeustCount++;
+ if (m_iAcceptQeustCount >= 0)
+ m_iAcceptQeustCount--;
+}
+
+void CQuest_Data::Update_AcceptQuest(_int MonsterID)
+{
+ m_QuestAcceptedInfoObject.erase(remove_if(m_QuestAcceptedInfoObject.begin(), m_QuestAcceptedInfoObject.end(),
+ [MonsterID, this](auto& it) {
+ CQuestInstance* instance = static_cast(it);
+ if (static_cast(it)->Update_Objective(MonsterID) == true)
+ {
+ Set_ClearQuest(static_cast(it)->Get_QuestID());
+ return true;
+ }
+ return false;
+ }),
+ m_QuestAcceptedInfoObject.end()
+ );
}
HRESULT CQuest_Data::Bind_ShaderResources()
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp b/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp
index cbe5d0cd6..3e15e889c 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp
@@ -214,11 +214,9 @@ void CQuest_Entry_Line::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Entry_Line* CQuest_Entry_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Header.cpp b/Jusin154_Team3D/Editor/Private/Quest_Header.cpp
deleted file mode 100644
index 088a148d3..000000000
--- a/Jusin154_Team3D/Editor/Private/Quest_Header.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-#include "pch.h"
-#include "Quest_Header.h"
-#include "GameInstance.h"
-
-CQuest_Header::CQuest_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_Header::CQuest_Header(const CQuest_Header& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CQuest_Header::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Header::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 352.f;
- Desc.fSizeX = 128.f;
- Desc.fSizeY = 32.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- m_vNine_Slice = _float4(0.f, 128.f, 0.f, 32.f);
- m_fSortZ = 0.02f;
- m_fFontX = 780.f;
- m_fFontY = 520.f;
- SizeUpX(600.f);
- SizeUpY(80.f);
- Visible(true);
- return S_OK;
-}
-
-void CQuest_Header::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Header::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
-
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- m_fAlpha += fTimeDelta * m_fAlphaTime;
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_bHover = true;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- {
- m_fAlpha -= fTimeDelta * m_fAlphaTime;
- m_bHover = false;
- }
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
- m_fTime += fTimeDelta * m_fTimeMult;
-
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Header::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Header::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- _float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기") - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
- return S_OK;
-}
-
-_vector CQuest_Header::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Header::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_Header::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_LighthouseHeaderBack"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_Header* CQuest_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Header* pInstance = new CQuest_Header(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Header");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Header::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Header* pInstance = new CQuest_Header(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Header");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Header::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CQuest_Header::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp b/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp
deleted file mode 100644
index 85dc3be3a..000000000
--- a/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-#include "pch.h"
-#include "Quest_HeaderLine.h"
-#include "GameInstance.h"
-
-CQuest_HeaderLine::CQuest_HeaderLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CQuest_HeaderLine::CQuest_HeaderLine(const CQuest_HeaderLine& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CQuest_HeaderLine::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_HeaderLine::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -475.f;
- Desc.fY = 310.f;
- Desc.fSizeX = 480.f;
- Desc.fSizeY = 10.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_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- Visible(false);
- return S_OK;
-}
-
-void CQuest_HeaderLine::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_HeaderLine::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bFadeIn == true)
- {
- if (m_fAlpha <= 1.f)
- {
- m_fAlpha += fTimeDelta * m_fAlphaTime;
- }
-
- if (m_fAlpha >= 1.f)
- {
- m_bFadeIn = false;
- m_fAlpha = 1.f;
- }
- }
-
- if (m_bFadeOut == true)
- {
- if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
-
- if (m_fAlpha <= 0.f)
- {
- m_bFadeOut = false;
- m_fAlpha = 0.f;
- }
- }
-
- m_fTime += fTimeDelta * m_fTimeMult;
- __super::Update(fTimeDelta);
-}
-
-void CQuest_HeaderLine::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_HeaderLine::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
- return E_FAIL;
- }
- if (FAILED(m_pVIBufferCom->Render())) {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-_vector CQuest_HeaderLine::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_HeaderLine::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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-HRESULT CQuest_HeaderLine::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_TutorialDividerBottom_middle"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
- {
- return E_FAIL;
- }
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-CQuest_HeaderLine* CQuest_HeaderLine::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_HeaderLine* pInstance = new CQuest_HeaderLine(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_HeaderLine");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_HeaderLine::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_HeaderLine* pInstance = new CQuest_HeaderLine(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_HeaderLine");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_HeaderLine::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pDiffuse_TextureCom);
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CQuest_HeaderLine::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info.cpp
index 5bbe2a894..371cb2b05 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Info.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Info.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Quest_Info.h"
#include "GameInstance.h"
+#include "Quest_Panel.h"
CQuest_Info::CQuest_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -45,7 +46,7 @@ HRESULT CQuest_Info::Initialize(void* pArg)
SizeUpX(960);
SizeUpY(m_fOriginPerviewSize);
m_fSortZ = 0.02f;
- m_fFontX = 740.f;
+ m_fFontX = 530.f;
m_fFontY = 500.f;
m_iPerQuestIndex = -1;
Visible(false);
@@ -107,7 +108,7 @@ void CQuest_Info::Late_Update(_float fTimeDelta)
return;
}
if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -126,7 +127,7 @@ HRESULT CQuest_Info::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
-
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), static_cast(m_pOwner)->Get_Quest(m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
@@ -213,18 +214,16 @@ HRESULT CQuest_Info::Ready_Components(void* pArg)
return S_OK;
}
-
+
void CQuest_Info::Set_Hover(_int Index)
{
m_iQuest_Index = Index;
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Info* CQuest_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp
index f32ff64a3..dd7e8cf60 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Quest_Info_Header.h"
#include "GameInstance.h"
+#include "Quest_Panel.h"
CQuest_Info_Header::CQuest_Info_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -41,7 +42,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(0.f, 128.f, 0.f, 32.f);
m_fSortZ = 0.02f;
- m_fFontX = 740.f;
+ m_fFontX = 925.f;
m_fFontY = 520.f;
m_iColor = 2;
SizeUpX(1105.f);
@@ -51,19 +52,6 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg)
return S_OK;
}
-void CQuest_Info_Header::Set_Hover(_int Index)
-{
- m_iQuest_Index = Index;
- if (m_iQuest_Index == -1)
- {
- Visible(false);
- }
- else
- {
- Visible(true);
- }
-}
-
void CQuest_Info_Header::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -120,7 +108,7 @@ void CQuest_Info_Header::Late_Update(_float fTimeDelta)
return;
}
if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -139,9 +127,9 @@ HRESULT CQuest_Info_Header::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
-
- _float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기") - 22) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("마을의 평화를 위해서 노력하기"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+
+ _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), static_cast(m_pOwner)->Get_Quest(m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), static_cast(m_pOwner)->Get_Quest(m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
@@ -225,6 +213,17 @@ HRESULT CQuest_Info_Header::Ready_Components(void* pArg)
return S_OK;
}
+void CQuest_Info_Header::Set_Hover(_int Index)
+{
+ m_iQuest_Index = Index;
+ if (m_iQuest_Index == -1)
+ {
+ Visible(false);
+ return;
+ }
+ Visible(true);
+}
+
CQuest_Info_Header* CQuest_Info_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CQuest_Info_Header* pInstance = new CQuest_Info_Header(pDevice, pContext);
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp
index 5d5073416..2529a61a0 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp
@@ -3,18 +3,18 @@
#include "GameInstance.h"
CQuest_Info_Line::CQuest_Info_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
+ :CElementObject(pDevice, pContext)
{
}
CQuest_Info_Line::CQuest_Info_Line(const CQuest_Info_Line& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs)
{
}
HRESULT CQuest_Info_Line::Initialize_Prototype()
{
- return S_OK;
+ return S_OK;
}
HRESULT CQuest_Info_Line::Initialize(void* pArg)
@@ -99,7 +99,7 @@ void CQuest_Info_Line::Late_Update(_float fTimeDelta)
return;
}
if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -208,11 +208,9 @@ void CQuest_Info_Line::Set_Hover(_int Index)
if (m_iQuest_Index == -1)
{
Visible(false);
+ return;
}
- else
- {
- Visible(true);
- }
+ Visible(true);
}
CQuest_Info_Line* CQuest_Info_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp b/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp
index 49175ab4a..2a6fc6e9b 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp
@@ -1,15 +1,13 @@
#include "pch.h"
#include "Quest_Panel.h"
#include "GameInstance.h"
-#include "Quest_Border.h"
-#include "Quest_Header.h"
-#include "Quest_HeaderLine.h"
-#include "Quest_List.h"
#include "Quest_Info.h"
#include "Quest_Info_Header.h"
#include "Quest_Info_Line.h"
#include "Quest_Entry_Line.h"
#include "Quest_Data.h"
+#include "Quest_Slot.h"
+#include "Quest_Status.h"
CQuest_Panel::CQuest_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -30,9 +28,9 @@ HRESULT CQuest_Panel::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = 0.f;
- Desc.fY = 0.f;
- Desc.fSizeX = 1575.f;
+ Desc.fX = 960.f;
+ Desc.fY = -540.f;
+ Desc.fSizeX = g_iWinSizeX;
Desc.fSizeY = g_iWinSizeY;
if (FAILED(__super::Initialize(&Desc)))
@@ -53,22 +51,11 @@ HRESULT CQuest_Panel::Initialize(void* pArg)
m_fDelayTime = 1.f;
Visible(true);
ElementAllVisible(true);
- static_cast(m_pOwner)->Add_Function(TEXT("QUESTPANELDATA"), [this](void* p) {this->Set_Quest_Data(reinterpret_cast(p)); });
+ Set_Status();
+ Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
return S_OK;
}
-void CQuest_Panel::Set_Quest_Count(_int Index)
-{
- m_iQuest_Count = Index;
-}
-
-void CQuest_Panel::Set_Quest_Data(CQuest_Data* Data)
-{
- m_pQuest_Date = Data;
- Function_Callback(TEXT("QUEST_DATA"), m_pQuest_Date);
- static_cast(m_pQuest_List)->Set_Name(static_cast(m_pQuest_Date)->Get_Quest(0).pQuestName, 0);
-}
-
void CQuest_Panel::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -102,6 +89,19 @@ void CQuest_Panel::Late_Update(_float fTimeDelta)
HRESULT CQuest_Panel::Render()
{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
return S_OK;
}
@@ -112,39 +112,71 @@ _vector CQuest_Panel::Get_WorldPostion()
HRESULT CQuest_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_pDiffuse_TextureCom->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_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
HRESULT CQuest_Panel::Ready_Components(void* pArg)
{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Quest_Widget"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
return S_OK;
}
HRESULT CQuest_Panel::Ready_Element(void* pArg)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Border))))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Data))))
{
return E_FAIL;
}
- Add_Element(TEXT("Quest_Border"), m_pQuest_Border);
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Header))))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot))))
{
return E_FAIL;
}
- Add_Element(TEXT("Quest_Header"), m_pQuest_Header);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_HeaderLine))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_HeaderLine"), m_pQuest_HeaderLine);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_List))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_List"), m_pQuest_List);
+ Add_Element(TEXT("Quest_Slot"), m_pQuest_Slot);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info))))
{
@@ -170,9 +202,73 @@ HRESULT CQuest_Panel::Ready_Element(void* pArg)
}
Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3);
+
return S_OK;
}
+_int CQuest_Panel::Set_Quest_Count(_int Index)
+{
+ return static_cast(m_pQuest_Data)->Get_Count(Index);
+}
+
+CQuest_Data::QUESTINFO CQuest_Panel::Get_Quest(_int QuestID)
+{
+ return static_cast(m_pQuest_Data)->Get_Quest(QuestID);
+}
+
+void CQuest_Panel::Set_Status()
+{
+ static_cast(m_pQuest_Status1)->Set_Status(0, -860.f, 400.f, TEXT("전 체"));
+ static_cast(m_pQuest_Status2)->Set_Status(1, -860.f, 220.f, TEXT("진행중"));
+ static_cast(m_pQuest_Status3)->Set_Status(2, -860.f, 40.f, TEXT("완 료"));
+ static_cast(m_pQuest_Status1)->Set_Click(true);
+ m_bClick[0] = true;
+ m_bClick[1] = false;
+ m_bClick[2] = false;
+}
+
+void CQuest_Panel::Slot_Hover(_int Index)
+{
+ _int iIndex{};
+ if (m_bClick[Index] == true)
+ return;
+
+ for (_int i = 0; i < 3; ++i)
+ {
+ if (i == Index)
+ {
+ m_bClick[i] = true;
+ iIndex = i;
+ }
+ else
+ {
+ m_bClick[i] = false;
+ }
+ }
+ static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]);
+ static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]);
+ static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]);
+
+ static_cast(m_pQuest_Slot)->Set_QuestType(iIndex);
+}
+
CQuest_Panel* CQuest_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CQuest_Panel* pInstance = new CQuest_Panel(pDevice, pContext);
@@ -203,6 +299,8 @@ void CQuest_Panel::Free()
{
__super::Free();
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_List.cpp b/Jusin154_Team3D/Editor/Private/Quest_Slot.cpp
similarity index 51%
rename from Jusin154_Team3D/Editor/Private/Quest_List.cpp
rename to Jusin154_Team3D/Editor/Private/Quest_Slot.cpp
index dcffa1d0b..fb6999cd5 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_List.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Slot.cpp
@@ -1,30 +1,32 @@
#include "pch.h"
-#include "Quest_List.h"
+#include "Quest_Slot.h"
#include "GameInstance.h"
+#include "Quest_Panel.h"
-CQuest_List::CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CQuest_Slot::CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
-CQuest_List::CQuest_List(const CQuest_List& rhs)
+CQuest_Slot::CQuest_Slot(const CQuest_Slot& rhs)
:CElementObject(rhs)
{
}
-HRESULT CQuest_List::Initialize_Prototype()
+HRESULT CQuest_Slot::Initialize_Prototype()
{
return S_OK;
}
-HRESULT CQuest_List::Initialize(void* pArg)
+HRESULT CQuest_Slot::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = -475.f;
- Desc.fY = -150.f;
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
Desc.fSizeX = 256.f;
Desc.fSizeY = 64.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)))
@@ -36,19 +38,26 @@ HRESULT CQuest_List::Initialize(void* pArg)
return E_FAIL;
}
- m_fTimeMult = 3.f;
m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
+ m_fTimeMult = 3.f;
m_vNine_Slice = _float4(70.f, 186.f, 0.f, 64.f);
- m_fFontX = 770.f;
- m_fFontY = 520.f;
+ m_fAlphaTime = 1.f;
+ m_fFontX = 300.f;
+ m_fFontY = 330.f;
+ m_fOffSetX = 0.f;
+ m_fOffSetY = 85;
+ m_iCols = 1;
SizeUpX(495.f);
SizeUpY(80.f);
+ m_pVIBufferCom->Set_Cloned(true);
+ m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols);
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+ m_iQuestCount = static_cast(m_pOwner)->Set_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
Visible(true);
return S_OK;
}
-void CQuest_List::Priority_Update(_float fTimeDelta)
+void CQuest_Slot::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
@@ -57,18 +66,17 @@ void CQuest_List::Priority_Update(_float fTimeDelta)
__super::Priority_Update(fTimeDelta);
}
-void CQuest_List::Update(_float fTimeDelta)
+void CQuest_Slot::Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
+
if (m_bFadeIn == true)
{
if (m_fAlpha <= 1.f)
- {
m_fAlpha += fTimeDelta * m_fAlphaTime;
- }
if (m_fAlpha >= 1.f)
{
@@ -80,7 +88,7 @@ void CQuest_List::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ m_fAlpha -= fTimeDelta;
if (m_fAlpha <= 0.f)
{
@@ -88,71 +96,87 @@ void CQuest_List::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
-
Hover();
- if (m_bHover == true)
- {
- m_fSizeX = 505.f;
- m_fSizeY = 90.f;
- m_fFontX = 765.f;
- m_fFontY = 520.f;
- m_pFontSize = TEXT("Font_size21");
- m_pQuest_ID = 0;
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID);
- }
- else
- {
- m_fSizeX = 495.f;
- m_fSizeY = 80.f;
- m_fFontX = 770.f;
- m_fFontY = 520.f;
- m_pFontSize = TEXT("Font_size20");
- m_pQuest_ID = -1;
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID);
- }
+
+ static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_iQuestIndex);
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
-void CQuest_List::Late_Update(_float fTimeDelta)
+void CQuest_Slot::Late_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
- if (m_bVisible) {
+ if (m_bVisible)
+ {
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
- __super::Late_Update(fTimeDelta);
}
+ __super::Late_Update(fTimeDelta);
}
-HRESULT CQuest_List::Render()
+HRESULT CQuest_Slot::Render()
{
- if (FAILED(Bind_ShaderResources())) {
+ if (FAILED(Bind_ShaderResources()))
+ {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::QUEST_SLOT))))
+ {
return E_FAIL;
}
- if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
return E_FAIL;
}
- if (FAILED(m_pVIBufferCom->Render())) {
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
return E_FAIL;
}
- m_pGameInstance->Render_Text(m_pFontSize, m_pQuest_Name.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
-
+ for (_int i = 0; i < m_iQuestCount; ++i)
+ {
+ m_fFontY = 190 + i * 85.f;
+ if (i == m_iQuestIndex)
+ {
+ m_pGameInstance->Render_Text(TEXT("Font_size30"), static_cast(m_pOwner)->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY));
+ }
+ else
+ {
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), static_cast(m_pOwner)->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
+ }
+ }
return S_OK;
}
-_vector CQuest_List::Get_WorldPostion()
+_vector CQuest_Slot::Get_WorldPostion()
{
return m_pTransformCom->Get_State(STATE::POSITION);
}
-HRESULT CQuest_List::Bind_ShaderResources()
+void CQuest_Slot::SizeUpX(_float fSizeX)
+{
+ m_fSizeX = fSizeX;
+ m_pVIBufferCom->Set_SizeX(m_fSizeX);
+}
+
+void CQuest_Slot::SizeUpY(_float fSizeY)
+{
+ m_fSizeY = fSizeY;
+ m_pVIBufferCom->Set_SizeY(m_fSizeY);
+}
+
+void CQuest_Slot::SizeUpdate(_float fSizeX, _float fSizeY)
+{
+ m_fSizeX = fSizeX;
+ m_fSizeY = fSizeY;
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+}
+
+HRESULT CQuest_Slot::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
{
@@ -189,7 +213,7 @@ HRESULT CQuest_List::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
{
return E_FAIL;
- }
+ }
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
{
return E_FAIL;
@@ -202,16 +226,12 @@ HRESULT CQuest_List::Bind_ShaderResources()
{
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Bind_RawValue("g_iColor", &m_iColor, sizeof(_int))))
- {
- return E_FAIL;
- }
return S_OK;
}
-HRESULT CQuest_List::Ready_Components(void* pArg)
+HRESULT CQuest_Slot::Ready_Components(void* pArg)
{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Quest_Slot"), (CComponent**)&m_pVIBufferCom, nullptr)))
{
return E_FAIL;
}
@@ -219,7 +239,7 @@ HRESULT CQuest_List::Ready_Components(void* pArg)
{
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
{
return E_FAIL;
}
@@ -227,19 +247,18 @@ HRESULT CQuest_List::Ready_Components(void* pArg)
return S_OK;
}
-void CQuest_List::Hover()
+void CQuest_Slot::Hover()
{
POINT ptMouse{};
GetCursorPos(&ptMouse);
ScreenToClient(g_hWnd, &ptMouse);
- _float2 fMouse{};
+ _float2 fMouse;
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
- POINT pt{};
- pt.x = _long(fMouse.x);
- pt.y = _long(fMouse.y);
- if (PtInRect(&m_pRect, pt))
+ m_iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
+
+ if (m_iQuestIndex != -1)
{
m_bHover = true;
}
@@ -249,39 +268,57 @@ void CQuest_List::Hover()
}
}
-void CQuest_List::Set_Name(_wstring Name, _int ID)
+void CQuest_Slot::Set_QuestType(_int Index)
{
- m_pQuest_Name = Name;
- m_pQuest_ID = ID;
+ switch (Index)
+ {
+ case 0:
+ m_iQuestCount = static_cast(m_pOwner)->Set_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
+ m_pVIBufferCom->Set_Draw(-1);
+ break;
+
+ case 1:
+ m_iQuestCount = static_cast(m_pOwner)->Set_Quest_Count(ENUM_CLASS(QUESTSTATE::ACCEPTED));
+ m_pVIBufferCom->Set_Draw(m_iQuestCount);
+ break;
+
+ case 2:
+ m_iQuestCount = static_cast(m_pOwner)->Set_Quest_Count(ENUM_CLASS(QUESTSTATE::CLEARED));
+ m_pVIBufferCom->Set_Draw(m_iQuestCount);
+ break;
+
+ default:
+ break;
+ }
}
-CQuest_List* CQuest_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
- CQuest_List* pInstance = new CQuest_List(pDevice, pContext);
+ CQuest_Slot* pInstance = new CQuest_Slot(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
- MSG_BOX("Failed to Created : CQuest_List");
+ MSG_BOX("Failed to Created : CQuest_Slot");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-CGameObject* CQuest_List::Clone(void* pArg, CGameObject* pOwner)
+CGameObject* CQuest_Slot::Clone(void* pArg, CGameObject* pOwner)
{
- CQuest_List* pInstance = new CQuest_List(*this);
+ CQuest_Slot* pInstance = new CQuest_Slot(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
- MSG_BOX("Failed to Cloned : CSpell_Header");
+ MSG_BOX("Failed to Cloned : CQuest_Slot");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-void CQuest_List::Free()
+void CQuest_Slot::Free()
{
__super::Free();
@@ -290,6 +327,7 @@ void CQuest_List::Free()
SAFE_RELEASE(m_pVIBufferCom);
}
-void CQuest_List::Describe_Entity()
+
+void CQuest_Slot::Describe_Entity()
{
}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Status.cpp b/Jusin154_Team3D/Editor/Private/Quest_Status.cpp
index b53d8ac09..05047ea1b 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Status.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Status.cpp
@@ -42,8 +42,8 @@ HRESULT CQuest_Status::Initialize(void* pArg)
m_fAlphaTime = 1.f;
Compute_UI(0);
m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f };
- m_fFontX = 80.f;
- m_fFontY = 480.f;
+ m_fFontX = -780.f;
+ m_fFontY = 610.f;
Visible(true);
return S_OK;
}
@@ -274,11 +274,12 @@ void CQuest_Status::Compute_UI(_int Index)
m_vUV = UV;
}
-void CQuest_Status::Set_Status(_int Index, _float m_fPosY, _wstring Name)
+void CQuest_Status::Set_Status(_int Index, _float PosX, _float PosY, _wstring Name)
{
m_iIndex = Index;
Compute_UI(Index);
- MoveY(m_fPosY);
+ MoveX(PosX);
+ MoveY(PosY);
m_pName = Name;
}
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp b/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp
deleted file mode 100644
index 66d10aad6..000000000
--- a/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-#include "pch.h"
-#include "Quest_Status_Panel.h"
-#include "GameInstance.h"
-#include "Quest_Status.h"
-
-CQuest_Status_Panel::CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CPanelObject(pDevice, pContext)
-{
-}
-
-CQuest_Status_Panel::CQuest_Status_Panel(const CQuest_Status_Panel& rhs)
- :CPanelObject(rhs)
-{
-}
-
-HRESULT CQuest_Status_Panel::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Initialize(void* pArg)
-{
-
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = -860.f;
- Desc.fY = 120.f;
- Desc.fSizeX = 175.f;
- Desc.fSizeY = 680.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;
- }
- if (FAILED(Ready_Element(pArg)))
- {
- return E_FAIL;
- }
-
- m_fCanvasAlpha = 1.f;
- m_fSortZ = 0.04f;
- Visible(true);
- Set_Status();
- Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
- return S_OK;
-}
-
-void CQuest_Status_Panel::Set_Status()
-{
- static_cast(m_pQuest_Status1)->Set_Status(0, 180.f, TEXT("전 체"));
- static_cast(m_pQuest_Status2)->Set_Status(1, 0.f, TEXT("진행중"));
- static_cast(m_pQuest_Status3)->Set_Status(2, -180.f, TEXT("완 료"));
- static_cast(m_pQuest_Status1)->Set_Click(true);
- m_bClick[0] = true;
- m_bClick[1] = false;
- m_bClick[2] = false;
-}
-
-void CQuest_Status_Panel::Slot_Hover(_int Index)
-{
- for (_int i = 0; i < 3; ++i)
- {
- if (i == Index)
- {
- m_bClick[i] = true;
- }
- else
- {
- m_bClick[i] = false;
- }
- }
- static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]);
- static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]);
- static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]);
- static_cast(m_pOwner)->Function_Callback(TEXT("QuestPanelUpdate"), &Index);
-}
-
-void CQuest_Status_Panel::Priority_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Priority_Update(fTimeDelta);
-}
-
-void CQuest_Status_Panel::Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- __super::Update(fTimeDelta);
-}
-
-void CQuest_Status_Panel::Late_Update(_float fTimeDelta)
-{
- if (!__super::Chack_Visible())
- {
- return;
- }
- if (m_bVisible) {
- __super::Late_Update(fTimeDelta);
- }
-}
-
-HRESULT CQuest_Status_Panel::Render()
-{
- return S_OK;
-}
-
-_vector CQuest_Status_Panel::Get_WorldPostion()
-{
- return m_pTransformCom->Get_State(STATE::POSITION);
-}
-
-HRESULT CQuest_Status_Panel::Bind_ShaderResources()
-{
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Ready_Components(void* pArg)
-{
- if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
- {
- return E_FAIL;
- }
-
- return S_OK;
-}
-
-HRESULT CQuest_Status_Panel::Ready_Element(void* pArg)
-{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2);
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3))))
- {
- return E_FAIL;
- }
- Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3);
-
- return S_OK;
-}
-
-CQuest_Status_Panel* CQuest_Status_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CQuest_Status_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CQuest_Status_Panel::Clone(void* pArg, CGameObject* pOwner)
-{
- CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CQuest_Status_Panel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CQuest_Status_Panel::Free()
-{
- __super::Free();
-
- SAFE_RELEASE(m_pVIBufferCom);
-}
-
-void CQuest_Status_Panel::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Public/Completed_Panel.h b/Jusin154_Team3D/Editor/Public/Completed_Panel.h
deleted file mode 100644
index 2a12d6e8b..000000000
--- a/Jusin154_Team3D/Editor/Public/Completed_Panel.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Engine)
-class CGameObject;
-NS_END
-
-NS_BEGIN(Editor)
-
-class CCompleted_Panel final : public CPanelObject
-{
-private:
- CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CCompleted_Panel(const CCompleted_Panel& rhs);
- virtual ~CCompleted_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
-public:
- static CCompleted_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
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 20b5c352d..5ad97231d 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -36,9 +36,10 @@ namespace Editor
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
ENEMY_DETECTION, INTERACTION_OBJECT, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX ,END };
- enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK,END };
-
+ enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
+ enum class QUESTTYPE { MAIN, SUB, END };
+ enum class QUESTSTATE { NONE, ACCEPTED, CLEARED };
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
enum class SKILL_TYPE {
ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
diff --git a/Jusin154_Team3D/Editor/Public/InProgress_Panel.h b/Jusin154_Team3D/Editor/Public/InProgress_Panel.h
deleted file mode 100644
index 4f33d5bb4..000000000
--- a/Jusin154_Team3D/Editor/Public/InProgress_Panel.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Engine)
-class CGameObject;
-NS_END
-
-NS_BEGIN(Editor)
-
-class CInProgress_Panel final : public CPanelObject
-{
-private:
- CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CInProgress_Panel(const CInProgress_Panel& rhs);
- virtual ~CInProgress_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
-public:
- static CInProgress_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
diff --git a/Jusin154_Team3D/Editor/Public/QuestInstance.h b/Jusin154_Team3D/Editor/Public/QuestInstance.h
new file mode 100644
index 000000000..aa7ce049b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/QuestInstance.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Quest.h"
+
+NS_BEGIN(Editor)
+
+class CQuestInstance final : public CQuest
+{
+private:
+ CQuestInstance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CQuestInstance(const CQuestInstance& rhs);
+ virtual ~CQuestInstance() = default;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ static CQuestInstance* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Border.h b/Jusin154_Team3D/Editor/Public/Quest_Border.h
deleted file mode 100644
index 27539843f..000000000
--- a/Jusin154_Team3D/Editor/Public/Quest_Border.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Editor)
-
-class CQuest_Border final : public CElementObject
-{
-private:
- CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Border(const CQuest_Border& rhs);
- virtual ~CQuest_Border() = 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;
-
-public:
- void Set_Quest_Data(class CQuest_Data* Data);
-
-private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- class CQuest_Data* m_pQuest_Data = { nullptr };
-
- _int m_iColor = { false };
- _int m_iCount = { false };
-
-public:
- static CQuest_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
- void Describe_Entity() override;
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Canvas.h b/Jusin154_Team3D/Editor/Public/Quest_Canvas.h
index 55794cafb..2c2d52b56 100644
--- a/Jusin154_Team3D/Editor/Public/Quest_Canvas.h
+++ b/Jusin154_Team3D/Editor/Public/Quest_Canvas.h
@@ -32,20 +32,10 @@ class CQuest_Canvas final : public CCanvasObject
public:
void Clear_Penel();
- void Update_Panel(_int Index);
-
- class CQuest_Data* Get_Data();
private:
- CTexture* m_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
CGameObject* m_pQuest_Panel = { nullptr };
- CGameObject* m_pInProgress_Panel = { nullptr };
- CGameObject* m_pCompleted_Panel = { nullptr };
- CGameObject* m_pQuest_Status_Panel = { nullptr };
- CGameObject* m_pQuest_Data = { nullptr };
_bool m_bClick[3] = { false };
_int m_iIndex{};
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Data.h b/Jusin154_Team3D/Editor/Public/Quest_Data.h
index 1ebd5b944..38af6a160 100644
--- a/Jusin154_Team3D/Editor/Public/Quest_Data.h
+++ b/Jusin154_Team3D/Editor/Public/Quest_Data.h
@@ -13,10 +13,10 @@ class CQuest_Data final : public CGameObject
public:
typedef struct tagObjectiveInfo
{
- _int iObjectType{};
- _int iTargetID{};
- _int iRequiredCount{};
- _int iCurrentCount{};
+ _bool bClear{};
+ _int iTargetID{};
+ _int iRequiredCount{};
+ _int iCurrentCount{};
}OBJECTIVEINFO;
typedef struct tagRewardsInfo
{
@@ -31,6 +31,7 @@ class CQuest_Data final : public CGameObject
_wstring pQuestInfo;
vector ObjectiveInfo;
vector RewardsInfo;
+ _int iAcceptState;
}QUESTINFO;
private:
CQuest_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -46,7 +47,14 @@ class CQuest_Data final : public CGameObject
public:
QUESTINFO Get_Quest(_int QuestID);
- _int Get_Count();
+ _int Get_Count(_int Index);
+ const vector& Get_AllQuest() const;
+ const vector& Get_ClearQuest() const;
+ const vector& Get_AcceptQuest() const;
+ HRESULT Set_AcceptQuest(_int index);
+ void Set_ClearQuest(_int Index);
+ void Update_AcceptQuest(_int MonsterIndex = -1);
+
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
@@ -55,17 +63,25 @@ class CQuest_Data final : public CGameObject
public:
//const SPELLINFO& Get_Info(_uint SpellID) const;
-
+
private:
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CGameObject* m_pQuestInstance = { nullptr };
+
QUESTINFO QuestInfo = {};
OBJECTIVEINFO ObjectiveInfo = {};
REWARDSINFO RewardsInfo = {};
vector QuestInfos;
+ vector m_QuestNoneInfos;
+ vector m_QuestAcceptedInfoObject;
+ vector m_QuestAcceptedInfos;
+ vector m_QuestEndInfos;
_int m_iQuest_Count{};
+ _int m_iClearQeustCount{};
+ _int m_iAcceptQeustCount{};
_bool m_bClear[1] = { false };
public:
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Header.h b/Jusin154_Team3D/Editor/Public/Quest_Header.h
deleted file mode 100644
index 7b7e416d1..000000000
--- a/Jusin154_Team3D/Editor/Public/Quest_Header.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Editor)
-
-class CQuest_Header final : public CElementObject
-{
-private:
- CQuest_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Header(const CQuest_Header& rhs);
- virtual ~CQuest_Header() = 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_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- _int m_iColor = true;
-
-public:
- static CQuest_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
- void Describe_Entity() override;
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h b/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h
deleted file mode 100644
index efc8eaa92..000000000
--- a/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "ElementObject.h"
-
-NS_BEGIN(Editor)
-
-class CQuest_HeaderLine final : public CElementObject
-{
-private:
- CQuest_HeaderLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_HeaderLine(const CQuest_HeaderLine& rhs);
- virtual ~CQuest_HeaderLine() = 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_pDiffuse_TextureCom = { nullptr };
- CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- _int m_iQuest_Index{};
-public:
- static CQuest_HeaderLine* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
- virtual void Free() override;
- void Describe_Entity() override;
-};
-
-NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Panel.h b/Jusin154_Team3D/Editor/Public/Quest_Panel.h
index a741edfdc..b55a1be7d 100644
--- a/Jusin154_Team3D/Editor/Public/Quest_Panel.h
+++ b/Jusin154_Team3D/Editor/Public/Quest_Panel.h
@@ -3,6 +3,7 @@
#include "Editor_Define.h"
#include "PanelObject.h"
+#include "Quest_Data.h"
NS_BEGIN(Engine)
class CGameObject;
@@ -32,24 +33,33 @@ class CQuest_Panel final : public CPanelObject
virtual HRESULT Initialize(void* pArg) override;
public:
- void Set_Quest_Count(_int Index);
- void Set_Quest_Data(class CQuest_Data* Data);
+ _int Set_Quest_Count(_int Index);
+ CQuest_Data::QUESTINFO Get_Quest(_int QuestID);
private:
+ void Set_Status();
+ void Slot_Hover(_int Index);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
class CQuest_Data* m_pQuest_Date = { nullptr };
- CGameObject* m_pQuest_Border = { nullptr };
- CGameObject* m_pQuest_Header = { nullptr };
- CGameObject* m_pQuest_HeaderLine = { nullptr };
- CGameObject* m_pQuest_List = { nullptr };
+ CGameObject* m_pQuest_Data = { nullptr };
+
CGameObject* m_pQuest_Info = { nullptr };
CGameObject* m_pQuest_Info_Header= { nullptr };
CGameObject* m_pQuest_Info_Line = { nullptr };
CGameObject* m_pQuest_Entry_Line = { nullptr };
+ CGameObject* m_pQuest_Slot = { nullptr };
+ CGameObject* m_pQuest_Status1 = { nullptr };
+ CGameObject* m_pQuest_Status2 = { nullptr };
+ CGameObject* m_pQuest_Status3 = { nullptr };
_int m_iQuest_Count{};
+ _bool m_bClick[3] = { false };
public:
static CQuest_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Quest_List.h b/Jusin154_Team3D/Editor/Public/Quest_Slot.h
similarity index 58%
rename from Jusin154_Team3D/Editor/Public/Quest_List.h
rename to Jusin154_Team3D/Editor/Public/Quest_Slot.h
index 1a738110a..cec7112bd 100644
--- a/Jusin154_Team3D/Editor/Public/Quest_List.h
+++ b/Jusin154_Team3D/Editor/Public/Quest_Slot.h
@@ -5,12 +5,12 @@
NS_BEGIN(Editor)
-class CQuest_List final : public CElementObject
+class CQuest_Slot final : public CElementObject
{
private:
- CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_List(const CQuest_List& rhs);
- virtual ~CQuest_List() = default;
+ CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CQuest_Slot(const CQuest_Slot& rhs);
+ virtual ~CQuest_Slot() = default;
public:
virtual void Priority_Update(_float fTimeDelta);
@@ -19,6 +19,10 @@ class CQuest_List final : public CElementObject
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
+ virtual void SizeUpX(_float fSizeX) override;
+ virtual void SizeUpY(_float fSizeY) override;
+ virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
+
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
@@ -29,21 +33,23 @@ class CQuest_List final : public CElementObject
void Hover();
public:
- void Set_Name(_wstring Name, _int ID);
+ void Set_QuestType(_int Index);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
- _int m_iColor = { false };
- _wstring m_pFontSize;
- _wstring m_pQuest_Name;
- _int m_pQuest_ID{};
+ _float m_fOffSetX{};
+ _float m_fOffSetY{};
+ _uint m_iCols{};
+ _int m_iColor{};
+ _int m_iQuestIndex{};
+ _int m_iQuestCount{};
public:
- static CQuest_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CQuest_Slot* 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/Quest_Status.h b/Jusin154_Team3D/Editor/Public/Quest_Status.h
index b67a76c29..7e89e8a37 100644
--- a/Jusin154_Team3D/Editor/Public/Quest_Status.h
+++ b/Jusin154_Team3D/Editor/Public/Quest_Status.h
@@ -27,7 +27,7 @@ class CQuest_Status final : public CElementObject
public:
void Compute_UI(_int Index);
- void Set_Status(_int Index, _float m_PosY, _wstring Name);
+ void Set_Status(_int Index, _float PosX, _float m_PosY, _wstring Name);
void Set_Click(_bool bClick);
diff --git a/Jusin154_Team3D/Editor/Public/Quest_Status_Panel.h b/Jusin154_Team3D/Editor/Public/Quest_Status_Panel.h
deleted file mode 100644
index 811480c34..000000000
--- a/Jusin154_Team3D/Editor/Public/Quest_Status_Panel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "PanelObject.h"
-
-NS_BEGIN(Editor)
-
-class CQuest_Status_Panel final : public CPanelObject
-{
-private:
- CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CQuest_Status_Panel(const CQuest_Status_Panel& rhs);
- virtual ~CQuest_Status_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 Ready_Element(void* pArg) override;
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
-
-private:
- void Set_Status();
- void Slot_Hover(_int Index);
-
-private:
- CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
- CGameObject* m_pQuest_Status1 = { nullptr };
- CGameObject* m_pQuest_Status2 = { nullptr };
- CGameObject* m_pQuest_Status3 = { nullptr };
-
- _bool m_bClick[3] = { false };
-
-public:
- static CQuest_Status_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
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
index 589c53be1..6ab3eea6a 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
@@ -212,6 +212,7 @@ call Update_Lib.bat
+
@@ -434,6 +435,7 @@ call Update_Lib.bat
+
true
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
index fc94737c2..994a3c6f9 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
@@ -304,6 +304,9 @@
{b31a93a4-8bba-4e94-8008-bbb9b458a55e}
+
+ {5e5c6c23-470f-4e7a-93e0-303e5171f4fd}
+
@@ -582,6 +585,9 @@
02.Element\02.Component\12.Stat\Event
+
+ 02.Element\01.GameObject\51.Quest
+
@@ -1226,6 +1232,9 @@
02.Element\02.Component\12.Stat\Event
+
+ 02.Element\01.GameObject\51.Quest
+
diff --git a/Jusin154_Team3D/Engine/Private/Quest.cpp b/Jusin154_Team3D/Engine/Private/Quest.cpp
new file mode 100644
index 000000000..c181f5443
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/Quest.cpp
@@ -0,0 +1,65 @@
+#include "pch.h"
+#include "Quest.h"
+
+CQuest::CQuest(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CGameObject{ pDevice, pContext }
+{
+}
+
+CQuest::CQuest(const CQuest& rhs)
+ : CGameObject(rhs)
+{
+}
+
+HRESULT CQuest::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CQuest::Initialize(void* pArg)
+{
+ QUESTINFO* Info = static_cast(pArg);
+ m_iQuestID = Info->iQuestID;
+ m_ObjectiveInfo = Info->ObjectiveInfo;
+
+ return S_OK;
+}
+
+_bool CQuest::Update_Objective(_int MonsterID)
+{
+ for (_int i = 0; i < m_ObjectiveInfo.size(); ++i)
+ {
+ auto& it = m_ObjectiveInfo[i];
+
+ if (it.bClear == true)
+ continue;
+
+ if (it.iTargetID != MonsterID)
+ continue;
+
+ ++it.iCurrentCount;
+
+ if (it.iCurrentCount >= it.iRequiredCount)
+ it.bClear = true;
+
+ break;
+ }
+
+ for (_int i = 0; i < m_ObjectiveInfo.size(); ++i)
+ {
+ if (m_ObjectiveInfo[i].bClear == false)
+ return false;
+ }
+
+ return true;
+}
+
+_int CQuest::Get_QuestID()
+{
+ return m_iQuestID;
+}
+
+void CQuest::Free()
+{
+ __super::Free();
+}
diff --git a/Jusin154_Team3D/Engine/Private/Stat.cpp b/Jusin154_Team3D/Engine/Private/Stat.cpp
index 13264d8ea..9f96ac871 100644
--- a/Jusin154_Team3D/Engine/Private/Stat.cpp
+++ b/Jusin154_Team3D/Engine/Private/Stat.cpp
@@ -18,6 +18,7 @@ HRESULT CStat::Initialize_Prototype(tinyxml2::XMLNode* pChild)
{
auto pElement = pChild->ToElement();
m_UnitInfo.pUnit_Name = CMyTools::ToWstring(pElement->Attribute("Name"));
+ pElement->QueryIntAttribute("OBJECTID", &m_UnitInfo.iObjectID);
pElement->QueryFloatAttribute("HP", &m_UnitInfo.fCurrentHp);
pElement->QueryFloatAttribute("MAXHP", &m_UnitInfo.fMaxHp);
pElement->QueryFloatAttribute("TARGETHP", &m_UnitInfo.fTargetHp);
diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp
index 347b6dacf..abfb41447 100644
--- a/Jusin154_Team3D/Engine/Private/UIObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp
@@ -502,6 +502,11 @@ const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index)
return SPELLINFO();
}
+const CUIObject::QUESTINFO CUIObject::Get_QuestInfo(_int Index)
+{
+ return QUESTINFO();
+}
+
void CUIObject::Set_FontX(_float fFontX)
{
m_fFontX = fFontX;
diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Instance.cpp
index c81c54a10..52ed650cd 100644
--- a/Jusin154_Team3D/Engine/Private/VIBuffer_Instance.cpp
+++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Instance.cpp
@@ -14,6 +14,7 @@ CVIBuffer_Instance::CVIBuffer_Instance(const CVIBuffer_Instance& Prototype)
, m_iInstanceStride{ Prototype.m_iInstanceStride }
, m_iNumInstance{ Prototype.m_iNumInstance }
, m_iNumIndexPerInstance{ Prototype.m_iNumIndexPerInstance }
+ , m_iCopyCount{ Prototype.m_iCopyCount }
{
Safe_AddRef(m_pVBInstance);
}
diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
index b99dbdb0d..9fcd697a4 100644
--- a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
+++ b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
@@ -97,7 +97,7 @@ HRESULT CVIBuffer_UI_Instance::Initialize_Prototype(const INSTANCE_DESC* pInstan
#pragma region INSTANCE_BUFFER
const UI_INSTANCE_DESC* pDesc = static_cast(pInstanceDesc);
- m_iNumInstance = pDesc->iNum;
+ m_iNumInstance = m_iCopyCount = pDesc->iNum;
m_iInstanceStride = sizeof(VTX_INSTANCE_UI);
m_iNumIndexPerInstance = 6;
@@ -370,6 +370,11 @@ void CVIBuffer_UI_Instance::Set_Equip_Index(_uint iIndex)
m_pContext->Unmap(m_pVBInstance, 0);
}
+void CVIBuffer_UI_Instance::Set_Draw(_int iCount)
+{
+ m_iNumInstance = (iCount == -1) ? m_iCopyCount : iCount;
+}
+
CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc)
{
CVIBuffer_UI_Instance* pInstance = new CVIBuffer_UI_Instance(pDevice, pContext);
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
index 4ccadc932..a066a9021 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
@@ -49,7 +49,6 @@ enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPO
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR,
END };
-enum class QUESTTYPE {MAIN, SUB, END};
enum class TEXTURE_MOUNT_SLOT0 { NOT_DEFINED, METALLIC, SPECULAR, HEIGHT, END };
enum class TEXTURE_MOUNT_SLOT1 { NOT_DEFINED, ROUGHNESS, END };
enum class TEXTURE_MOUNT_SLOT2 { NOT_DEFINED, OCCLUSION, ALPHA, Amount_Scatter, END };
diff --git a/Jusin154_Team3D/Engine/Public/Quest.h b/Jusin154_Team3D/Engine/Public/Quest.h
new file mode 100644
index 000000000..734c234ee
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/Quest.h
@@ -0,0 +1,55 @@
+#pragma once
+
+#include "GameObject.h"
+
+NS_BEGIN(Engine)
+
+class ENGINE_DLL CQuest abstract : public CGameObject
+{
+public:
+ typedef struct tagObjectiveInfo
+ {
+ _bool bClear{};
+ _int iTargetID{};
+ _int iRequiredCount{};
+ _int iCurrentCount{};
+ }OBJECTIVEINFO;
+
+ typedef struct tagRewardsInfo
+ {
+ _int iRewardType{};
+ _int iRewardID{};
+ }REWARDSINFO;
+
+ typedef struct tagQuestInfo
+ {
+ _int iQuestID{};
+ _int iType{};
+ _wstring pQuestName;
+ _wstring pQuestInfo;
+ vector ObjectiveInfo;
+ vector RewardsInfo;
+ _int iAcceptState;
+ }QUESTINFO;
+protected:
+ CQuest(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CQuest(const CQuest& rhs);
+ virtual ~CQuest() = default;
+
+protected:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ virtual _bool Update_Objective(_int MonsterID);
+ virtual _int Get_QuestID();
+
+protected:
+ vector m_ObjectiveInfo;
+ _int m_iQuestID{};
+
+public:
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/Stat.h b/Jusin154_Team3D/Engine/Public/Stat.h
index 5ac87b92e..6901608b1 100644
--- a/Jusin154_Team3D/Engine/Public/Stat.h
+++ b/Jusin154_Team3D/Engine/Public/Stat.h
@@ -9,6 +9,7 @@ class ENGINE_DLL CStat final : public CComponent
typedef struct tagUnitInfo
{
_wstring pUnit_Name;
+ _int iObjectID{};
_float fCurrentHp{};
_float fMaxHp{};
_float fTargetHp{};
diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h
index c411d326f..8f823ba89 100644
--- a/Jusin154_Team3D/Engine/Public/UIObject.h
+++ b/Jusin154_Team3D/Engine/Public/UIObject.h
@@ -36,6 +36,32 @@ typedef struct tagSpellInfo
_float fPreview{};
_float fVidio{};
}SPELLINFO;
+
+typedef struct tagObjectiveInfo
+{
+ _int iObjectType{};
+ _int iTargetID{};
+ _int iRequiredCount{};
+ _int iCurrentCount{};
+}OBJECTIVEINFO;
+
+typedef struct tagRewardsInfo
+{
+ _int iRewardType{};
+ _int iRewardID{};
+}REWARDSINFO;
+
+typedef struct tagQuestInfo
+{
+ _int iQuestID{};
+ _int iType{};
+ _wstring pQuestName;
+ _wstring pQuestInfo;
+ vector ObjectiveInfo;
+ vector RewardsInfo;
+ _int iAcceptState;
+}QUESTINFO;
+
typedef struct SlotHover
{
_int iSlotID{};
@@ -140,6 +166,7 @@ typedef struct SlotHover
virtual _bool Get_Hover();
virtual const SPELLINFO Get_Info(_int Index);
+ virtual const QUESTINFO Get_QuestInfo(_int Index);
virtual void Set_FontX(_float fFontX);
virtual void Set_FontY(_float fFontY);
diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_Instance.h
index 37006a479..2cfc30c5f 100644
--- a/Jusin154_Team3D/Engine/Public/VIBuffer_Instance.h
+++ b/Jusin154_Team3D/Engine/Public/VIBuffer_Instance.h
@@ -32,6 +32,7 @@ class ENGINE_DLL CVIBuffer_Instance abstract : public CVIBuffer
D3D11_SUBRESOURCE_DATA m_InstanceInitialDesc = {};
_uint m_iInstanceStride = {};
_uint m_iNumInstance = {};
+ _uint m_iCopyCount{};
_uint m_iNumIndexPerInstance = {};
public:
virtual void Free() override;
diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
index 257759566..fe5e72dc6 100644
--- a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
+++ b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
@@ -38,6 +38,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
_int Set_Mouse_Hover(_float2 fMousePos);
void Set_Hover_Index(_uint iIndex);
void Set_Equip_Index(_uint iIndex);
+ void Set_Draw(_int iCount = -1);
private:
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };