[fix]
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -151,6 +151,7 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Body.h" />
|
||||
<ClInclude Include="..\public\Active_Icon.h" />
|
||||
<ClInclude Include="..\Public\DummyObject.h" />
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h" />
|
||||
<ClInclude Include="..\Public\DebugCamera.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXBox.h" />
|
||||
@@ -207,6 +208,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Body.cpp" />
|
||||
<ClCompile Include="..\private\Active_Icon.cpp" />
|
||||
<ClCompile Include="..\Private\DummyObject.cpp" />
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp" />
|
||||
<ClCompile Include="..\Private\DebugCamera.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXBox.cpp" />
|
||||
|
||||
@@ -324,6 +324,9 @@
|
||||
<ClInclude Include="..\Public\LoadingWidget.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DummyObject.h">
|
||||
<Filter>02.GameObjects\Dummys\DummyObject</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -478,6 +481,9 @@
|
||||
<ClCompile Include="..\Private\LoadingWidget.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DummyObject.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DummyObject</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -87,7 +87,7 @@ HRESULT CBody::Render()
|
||||
HRESULT CBody::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanBody_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
#include "pch.h"
|
||||
#include "DummyObject.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
|
||||
CDummyObject::CDummyObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDummyObject::CDummyObject(const CDummyObject& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummyObject::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyObject::Initialize(void* pArg)
|
||||
{
|
||||
OBJECT_DESC* pDesc = static_cast<OBJECT_DESC*>(pArg);
|
||||
|
||||
m_strModelPrototypeTag = pDesc->pModelPrototypeTag;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummyObject::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummyObject::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CDummyObject::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CDummyObject::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyObject::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyObject::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummyObject* CDummyObject::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummyObject* pInstance = new CDummyObject(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummyObject");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummyObject::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummyObject* pInstance = new CDummyObject(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummyObject");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CDummyObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Release(m_pShaderCom);
|
||||
Safe_Release(m_pModelCom);
|
||||
}
|
||||
|
||||
void CDummyObject::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -85,7 +85,7 @@ HRESULT CHair::Render()
|
||||
HRESULT CHair::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanHair_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ HRESULT CHead::Render()
|
||||
HRESULT CHead::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanHead_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "DebugCamera.h"
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "Monster.h"
|
||||
#include "DummyObject.h"
|
||||
|
||||
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -58,74 +58,46 @@ HRESULT CLevel_ObjectViewer::Render()
|
||||
|
||||
void CLevel_ObjectViewer::Add_Object()
|
||||
{
|
||||
GUI::Begin("Add Object");
|
||||
GUI::Begin("Add PartObject");
|
||||
|
||||
if (GUI::BeginTabBar("ObjectTabs"))
|
||||
{
|
||||
Add_Creature();
|
||||
|
||||
Add_Human();
|
||||
|
||||
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Add_Creature()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Creatures"))
|
||||
{
|
||||
if (GUI::Button("Add Monster"))
|
||||
{
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
CMonster::OBJECT_DESC Desc = {};
|
||||
Desc.pModelPrototypeTag = TEXT("Prototype_Component_Troll_Model");
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMonster>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Monster"), &Desc, nullptr, &pTempObject)))
|
||||
return;
|
||||
m_Objects.push_back(pTempObject);
|
||||
}
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Add_Human()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Human"))
|
||||
if (GUI::BeginTabItem("Body"))
|
||||
{
|
||||
if (GUI::CollapsingHeader("Body"))
|
||||
{
|
||||
if (GUI::Button("Add Body"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRootModelPart>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Root"), nullptr, nullptr, &m_HumanRoot)))
|
||||
return;
|
||||
Category_PartsModelList("Human/Body", "Body");
|
||||
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBody>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Body"), nullptr, m_HumanRoot, &pTempObject)))
|
||||
return;
|
||||
m_Objects.push_back(pTempObject);
|
||||
}
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
|
||||
if (GUI::BeginTabItem("Head"))
|
||||
{
|
||||
_bool bDisabled = (m_HumanRoot == nullptr);
|
||||
if (bDisabled) ImGui::BeginDisabled();
|
||||
if (GUI::CollapsingHeader("Head"))
|
||||
{
|
||||
if (GUI::Button("Add Head"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHead>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Head"), nullptr, m_HumanRoot)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (GUI::CollapsingHeader("Hair"))
|
||||
{
|
||||
if (GUI::Button("Add Hair"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHair>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Hair"), nullptr, m_HumanRoot)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (bDisabled) ImGui::EndDisabled();
|
||||
if (bDisabled) GUI::BeginDisabled();
|
||||
|
||||
Category_PartsModelList("Human/Head", "Head");
|
||||
|
||||
if (bDisabled) GUI::EndDisabled();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
|
||||
if (GUI::BeginTabItem("Hair"))
|
||||
{
|
||||
_bool bDisabled = (m_HumanRoot == nullptr);
|
||||
if (bDisabled) GUI::BeginDisabled();
|
||||
|
||||
Category_PartsModelList("Human/Hair", "Hair");
|
||||
|
||||
if (bDisabled) GUI::EndDisabled();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
@@ -133,25 +105,100 @@ void CLevel_ObjectViewer::Add_Human()
|
||||
void CLevel_ObjectViewer::Show_ModelFilePath()
|
||||
{
|
||||
GUI::Begin("Model_List");
|
||||
if(GUI::BeginTabBar("Model_List"))
|
||||
if (GUI::BeginTabBar("Model_List"))
|
||||
{
|
||||
if (GUI::BeginTabItem("Model"))
|
||||
{
|
||||
if (m_pGameInstance->BinaryModelFilePathCount() > 0)
|
||||
{
|
||||
for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++)
|
||||
{
|
||||
if (GUI::Button(m_pGameInstance->Load_BinaryModelFilePath(i)))
|
||||
{
|
||||
Category_ModelList("Monster");
|
||||
|
||||
Category_ModelList("Human");
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Category_ModelList(const _char* Category)
|
||||
{
|
||||
if (GUI::BeginTabItem(Category))
|
||||
{
|
||||
if (m_pGameInstance->BinaryModelFilePathCount() > 0)
|
||||
{
|
||||
for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++)
|
||||
{
|
||||
const _char* szCategory = m_pGameInstance->Load_BinaryModelFilePath(i);
|
||||
|
||||
if (strstr(szCategory, Category))
|
||||
{
|
||||
if (GUI::Button(szCategory))
|
||||
{
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
|
||||
CDummyObject::OBJECT_DESC Desc = {};
|
||||
|
||||
Desc.pModelPrototypeTag = Save_ModelName(szCategory);
|
||||
|
||||
Save_LayerName(Category);
|
||||
|
||||
if (m_Objects.size() > 0)
|
||||
{
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, m_wszPreLayer)->Clear_Layer();
|
||||
m_Objects.pop_back();
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummyObject>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, m_wszLayer, &Desc, nullptr, &pTempObject)))
|
||||
return;
|
||||
|
||||
wcscpy_s(m_wszPreLayer, m_wszLayer);
|
||||
|
||||
m_Objects.push_back(pTempObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Category_PartsModelList(const _char* Category, const _char* Layer)
|
||||
{
|
||||
for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++)
|
||||
{
|
||||
const _char* szCategory = m_pGameInstance->Load_BinaryModelFilePath(i);
|
||||
|
||||
if (strstr(szCategory, Category))
|
||||
{
|
||||
if (GUI::Button(szCategory))
|
||||
{
|
||||
if (strcmp("Body", Layer) == 0)
|
||||
{
|
||||
if (!m_HumanRoot)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRootModelPart>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Root"), nullptr, nullptr, &m_HumanRoot)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Save_LayerName(Layer);
|
||||
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
|
||||
CDummyObject::OBJECT_DESC Desc = {};
|
||||
|
||||
Desc.pModelPrototypeTag = Save_ModelName(szCategory);
|
||||
|
||||
if (m_PartsObjects.size() > 0)
|
||||
{
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, m_wszPreLayer)->Clear_Layer();
|
||||
m_PartsObjects.pop_back();
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBody>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, m_wszLayer, &Desc, m_HumanRoot, &pTempObject)))
|
||||
return;
|
||||
|
||||
m_PartsObjects.push_back(pTempObject);
|
||||
|
||||
wcscpy_s(m_wszPreLayer, m_wszLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Show_AnimList()
|
||||
@@ -171,6 +218,20 @@ void CLevel_ObjectViewer::Show_AnimList()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!m_PartsObjects.empty())
|
||||
{
|
||||
if (!m_PartsObjects[m_iObjectIndex]->isDead())
|
||||
{
|
||||
CModel* pModel = m_PartsObjects[m_iObjectIndex]->Get_Component<CModel>();
|
||||
for (_uint i = 0; i < pModel->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(pModel->Get_AnimList(i)))
|
||||
{
|
||||
pModel->Set_AnimationIndex(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -207,11 +268,68 @@ void CLevel_ObjectViewer::Object_Setting()
|
||||
}
|
||||
if (GUI::Button("Delete"))
|
||||
{
|
||||
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, m_wszPreLayer)->Clear_Layer();
|
||||
m_Objects.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
|
||||
GUI::Begin("PartsObject_Info");
|
||||
if (!m_PartsObjects.empty())
|
||||
{
|
||||
CModel* pModel = m_PartsObjects.front()->Get_Component<CModel>();
|
||||
|
||||
_float AnimTrack = pModel->Get_CurrentTrackPosition();
|
||||
GUI::DragFloat("AnimTrack", &AnimTrack);
|
||||
|
||||
_float AnimSpeed = pModel->Get_AnimSpeed();
|
||||
GUI::DragFloat("AnimSpeed", &AnimSpeed, 0.1f);
|
||||
pModel->Set_AnimSpeed(AnimSpeed);
|
||||
|
||||
_bool bPlayAnim = pModel->Get_PlayAnim();
|
||||
if (GUI::Checkbox("Play Anim", &bPlayAnim))
|
||||
{
|
||||
pModel->Set_PlayAnim(bPlayAnim);
|
||||
}
|
||||
if (GUI::Button("Delete"))
|
||||
{
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, m_wszPreLayer)->Clear_Layer();
|
||||
m_PartsObjects.clear();
|
||||
}
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Save_LayerName(const _char* Category)
|
||||
{
|
||||
_wstring szLayer = TEXT("Layer_");
|
||||
|
||||
_wchar szCategory[MAX_PATH];
|
||||
|
||||
wcscpy_s(m_wszLayer, szLayer.c_str());
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, Category, -1, szCategory, MAX_PATH);
|
||||
|
||||
wcscat_s(m_wszLayer, szCategory);
|
||||
}
|
||||
|
||||
_wchar* CLevel_ObjectViewer::Save_ModelName(const _char* Category)
|
||||
{
|
||||
_splitpath_s(Category, nullptr, 0, nullptr, 0, m_szName, MAX_PATH, nullptr, 0);
|
||||
|
||||
_wstring szDir = TEXT("Prototype_Component_");
|
||||
_wstring szDir2 = TEXT("_Model");
|
||||
|
||||
_wchar wszName[MAX_PATH] = { 0 };
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, m_szName, -1, wszName, MAX_PATH);
|
||||
|
||||
wcscpy_s(m_wszName, szDir.c_str());
|
||||
wcscat_s(m_wszName, wszName);
|
||||
wcscat_s(m_wszName, szDir2.c_str());
|
||||
|
||||
return m_wszName;
|
||||
}
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
@@ -226,7 +344,7 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||
CameraDesc.fMouseSensor = 0.1f;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDebugCamera>(g_iStaticLevel, NEXT_LEVEL,
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDebugCamera>(g_iStaticLevel, NEXT_LEVEL,
|
||||
strLayerTag, &CameraDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
#include "Body.h"
|
||||
#include "Hair.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "Monster.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "DummyObject.h"
|
||||
#include <filesystem>
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region UI
|
||||
@@ -27,11 +30,11 @@
|
||||
#include "Mission_Key.h"
|
||||
#include "Mission_KeyHold.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
#include "Active_Icon.h"
|
||||
|
||||
#include "MiniMap_Panel.h"
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
|
||||
#include "Loading_Panel.h"
|
||||
#include "LoadingWidget.h"
|
||||
@@ -123,18 +126,18 @@ HRESULT CLoader::Loading()
|
||||
case LEVEL::OBJECT:
|
||||
hr = Loading_For_ObjectViewer();
|
||||
break;
|
||||
//case LEVEL::COMBINED:
|
||||
// hr = Loading_For_CombinedViewer();
|
||||
// break;
|
||||
//case LEVEL::COMBINED:
|
||||
// hr = Loading_For_CombinedViewer();
|
||||
// break;
|
||||
case LEVEL::EFFECT:
|
||||
hr = Loading_For_Effect();
|
||||
break;
|
||||
case LEVEL::PHYSX:
|
||||
hr = Loading_For_PhysXLevel();
|
||||
break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// hr = Loading_For_Particle();
|
||||
// break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// hr = Loading_For_Particle();
|
||||
// break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
@@ -160,7 +163,7 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Dororong"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/DororongDoro.png"), 0)))){
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/DororongDoro.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -233,64 +236,73 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
m_strMessage = TEXT("Texture Loading..");
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Keyboard"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Keyboard/Keyboard_%d.png"), 10)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Loading", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LodingWidget1"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Loading/LoadingWidget.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Border"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Border.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Key"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Key.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Finishi_Rect"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Finishi_Rect.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Main"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Mission_Main.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Mission", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/ActiveMission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/Mission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/ActiveMission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon_"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/Mission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
@@ -369,7 +381,7 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("Loading Success!");
|
||||
|
||||
@@ -396,7 +408,7 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
@@ -405,7 +417,7 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Effect/Diffuse", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
@@ -432,7 +444,7 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -485,7 +497,7 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.tRigidDynamicDesc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.tRigidDynamicDesc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.tRigidDynamicDesc.ePxShapeFlag = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
|
||||
|
||||
m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody::Create(m_pDevice, m_pContext, Desc));
|
||||
}
|
||||
//{
|
||||
@@ -503,7 +515,7 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
|
||||
m_strMessage = TEXT("Prototype Loading..");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXBox>(g_iStaticLevel, CDummy_PhysXBox::Create(m_pDevice, m_pContext)))){
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXBox>(g_iStaticLevel, CDummy_PhysXBox::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -549,36 +561,44 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Body1_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body1/Body1.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHead_Model"),
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Body2_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body2/Body2.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Head_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHair_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Hair1_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair1/Hair1.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Hair2_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair2/Hair2.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Steve_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve.bin",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
@@ -601,8 +621,8 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CHair>(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Monster */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMonster>(g_iStaticLevel, CMonster::Create(m_pDevice, m_pContext))))
|
||||
/* For.Prototype_GameObject_DummyObject */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummyObject>(g_iStaticLevel, CDummyObject::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Dummy_Cube */
|
||||
@@ -660,7 +680,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Terrain */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
|
||||
CVIBuffer_Terrain::Create(m_pDevice, m_pContext, nullptr, 100, 100))))
|
||||
|
||||
@@ -20,6 +20,10 @@ HRESULT CModelParts::Initialize_Prototype()
|
||||
|
||||
HRESULT CModelParts::Initialize(void* pArg)
|
||||
{
|
||||
OBJECT_DESC* pDesc = static_cast<OBJECT_DESC*>(pArg);
|
||||
|
||||
m_strModelPrototypeTag = pDesc->pModelPrototypeTag;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
#include "ModelParts.h"
|
||||
|
||||
CRootModelPart::CRootModelPart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
: CContainerObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CRootModelPart::CRootModelPart(const CRootModelPart& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
: CContainerObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -126,4 +126,5 @@ void CRootModelPart::Free()
|
||||
|
||||
void CRootModelPart::Describe_Entity()
|
||||
{
|
||||
GUI::Text("HI");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CShader;
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDummyObject final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagObjectDesc
|
||||
{
|
||||
const _tchar* pModelPrototypeTag;
|
||||
}OBJECT_DESC;
|
||||
private:
|
||||
CDummyObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummyObject(const CDummyObject& Prototype);
|
||||
virtual ~CDummyObject() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
public:
|
||||
_wstring& Get_PrototypeTag() { return m_strModelPrototypeTag; }
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_wstring m_strModelPrototypeTag;
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CDummyObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -27,16 +27,26 @@ class CLevel_ObjectViewer final : public CLevel
|
||||
HRESULT Ready_Layer_Dummy(const _wstring& strLayerTag);
|
||||
|
||||
void Add_Object();
|
||||
void Add_Creature();
|
||||
void Add_Human();
|
||||
void Show_ModelFilePath();
|
||||
void Category_ModelList(const _char* Category);
|
||||
void Category_PartsModelList(const _char* Category, const _char* Layer);
|
||||
void Show_AnimList();
|
||||
void Show_ObjectList();
|
||||
void Object_Setting();
|
||||
void Save_LayerName(const _char* Category);
|
||||
_wchar* Save_ModelName(const _char* Category);
|
||||
|
||||
private:
|
||||
vector<CGameObject*> m_Objects;
|
||||
vector<CGameObject*> m_PartsObjects;
|
||||
CGameObject* m_HumanRoot = { nullptr };
|
||||
_int m_iObjectIndex = { 0 };
|
||||
_int m_iPartsObjectIndex = { 0 };
|
||||
_char m_szName[MAX_PATH];
|
||||
_wchar m_wszName[MAX_PATH];
|
||||
_wchar m_wszLayer[MAX_PATH];
|
||||
_wchar m_wszPreLayer[MAX_PATH];
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -12,6 +12,12 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CModelParts abstract : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagObjectDesc
|
||||
{
|
||||
const _tchar* pModelPrototypeTag;
|
||||
}OBJECT_DESC;
|
||||
|
||||
protected:
|
||||
CModelParts(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CModelParts(const CModelParts& Prototype);
|
||||
@@ -24,15 +30,18 @@ class CModelParts abstract : public CGameObject
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
_wstring& Get_PrototypeTag() { return m_strModelPrototypeTag; }
|
||||
|
||||
protected:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
_wstring m_strModelPrototypeTag;
|
||||
|
||||
protected:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "ContainerObject.h"
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CRootModelPart final : public CGameObject
|
||||
class CRootModelPart final : public CContainerObject
|
||||
{
|
||||
private:
|
||||
CRootModelPart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -30,7 +30,7 @@ class CRootModelPart final : public CGameObject
|
||||
private:
|
||||
CModel* m_pMainModel = { nullptr };
|
||||
vector<class CModelParts*> m_ModelParts = {};
|
||||
_uint m_iAnimIndex = {0};
|
||||
_uint m_iAnimIndex = { 0 };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
Reference in New Issue
Block a user