[Modify]병합
This commit is contained in:
@@ -45,5 +45,9 @@
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
|
||||
|
||||
# lfs
|
||||
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
*.png binary
|
||||
@@ -62,7 +62,10 @@ void CBroom::Update(_float fTimeDelta)
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CBroom::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -16,8 +16,9 @@ void CBuildingContainer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CBuildingContainer::Update(_float fTimeDelta)
|
||||
@@ -26,17 +27,20 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
||||
|
||||
m_fCamDepth = XMVectorGetX(XMVector3Length(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat3(&m_vExtentWorldPosition)));
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pOcclusionQueryCom->isDraw())
|
||||
if (m_pOcclusionQueryCom->isDraw()){
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||
}
|
||||
@@ -196,8 +200,9 @@ void CBuildingContainer::Free()
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pOcclusionQueryCom);
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
for (auto& pCollision : m_ColiisonPartObjects){
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -69,26 +69,16 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY);
|
||||
}
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
/*m_vPosLerpTimer.x += fTimeDelta;
|
||||
m_vPosLerpTimer.x += fTimeDelta;
|
||||
if (m_vPosLerpTimer.x > m_vPosLerpTimer.y) {
|
||||
m_vPosLerpTimer.x = 0.f;
|
||||
Start_LerpShoulderPos();
|
||||
}
|
||||
_vector vShoulderPos = XMVectorLerp(XMLoadFloat4(&m_StartPos), XMLoadFloat4(&m_DestPos), (m_vPosLerpTimer.x / m_vPosLerpTimer.y));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos);*/
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
_vector vShoulderPos = Get_WorldPostion();
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos);
|
||||
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
|
||||
//_vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq));
|
||||
_vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq));
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Shader.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CCamera(pDevice, pContext)
|
||||
@@ -56,6 +59,15 @@ void CCamera_Debug::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Pressing(DIK_TAB)) {
|
||||
Set_InitialPos();
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) {
|
||||
if (m_pGameInstance->Key_Up(DIK_SCROLL)) {
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER);
|
||||
if (nullptr != pLayer) {
|
||||
CPlayer* pPlayer = pLayer->Get_Object<CPlayer>();
|
||||
pPlayer->Get_Component<CCharacter_Controller>()->Set_Position(Get_WorldPostion());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Angle
|
||||
|
||||
@@ -27,16 +27,18 @@ HRESULT CEffectPool::Initialize_Prototype()
|
||||
|
||||
HRESULT CEffectPool::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
if (FAILED(Ready_Effect())) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -46,8 +48,6 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
@@ -64,8 +64,6 @@ void CEffectPool::Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
@@ -78,7 +76,6 @@ void CEffectPool::Update(_float fTimeDelta)
|
||||
|
||||
void CEffectPool::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
@@ -102,7 +99,9 @@ HRESULT CEffectPool::Render()
|
||||
|
||||
HRESULT CEffectPool::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
if (FAILED(__super::Ready_Components(nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -113,9 +112,7 @@ HRESULT CEffectPool::Bind_ShaderResources()
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
@@ -170,8 +167,9 @@ HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPr
|
||||
{
|
||||
CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel);
|
||||
|
||||
if (pEffect_Container == nullptr)
|
||||
if (pEffect_Container == nullptr) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container);
|
||||
|
||||
|
||||
@@ -90,7 +90,10 @@ void CGoblin::Update(_float fTimeDelta)
|
||||
m_pRigidBody->ConvertToCCT(*m_pCharacter_Controller);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CGoblin::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -44,10 +44,12 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Reday_Layer_EffectPool())) { //플레이어보다 먼저 생성해야함!
|
||||
//플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(Reday_Layer_EffectPool())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_Item(TEXT("Layer_Item")))) { // 이것도 플레이어보다 먼저 생성해야함!
|
||||
// 이것도 플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(Ready_Layer_Item(LAYER_ITEM))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
|
||||
@@ -119,9 +121,9 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
|
||||
/* Map Containters */
|
||||
/* 테스트용 맵 */
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
// CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
/* 전체 맵 */
|
||||
// CInfoInstance::GetInstance()->Load_MapObjects("Map1124");
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
|
||||
|
||||
|
||||
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
|
||||
@@ -129,14 +131,16 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
/* InstanceProp Oak_Tree*/
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* BearBerry */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -196,21 +200,19 @@ HRESULT CLevel_GamePlay::Ready_Markers()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroom))){
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_pBroom)))
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, nullptr, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -235,15 +237,15 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
for (_uint i = 0; i < 2; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//for (_uint i = 0; i < 2; ++i)
|
||||
//{
|
||||
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -251,10 +253,10 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
HRESULT CLevel_GamePlay::Reday_Layer_EffectPool()
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
//플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, LAYER_EFFECTPOOL))) {
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +213,250 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
#pragma region MAP_MODELS
|
||||
vector<future<vector<FOLDER_LOAD*>*>> jobMapModels;
|
||||
|
||||
{
|
||||
{ /* Terrain */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
|
||||
{ /* Ollivanders*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
|
||||
{ /* Gatehouse*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
|
||||
{ /* TScrolls */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* 3BroomStick*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
{ /* BLDG_QuidditchShop */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_HogsheadInn */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Honeydukes */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_OwlPost */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_TeaShop */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Zonkos */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_DB_GR */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Potions */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Salon */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* Hengist_Tree */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN A*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN B*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN C*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN E*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN F*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN G*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN H*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* GEN J*/
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region UI
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
@@ -708,6 +952,29 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIINSTANCE,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl"),
|
||||
VTX_POSTEX_INSTANCE_UI::Elements, VTX_POSTEX_INSTANCE_UI::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_PARTICLE::Elements, VTX_MODEL_INSTANCE_PARTICLE::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_MODEL::Elements, VTX_MODEL_INSTANCE_MODEL::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_VTXPOS,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl"),
|
||||
VTXPOS::Elements, VTXPOS::iNumElements)))) {
|
||||
@@ -821,31 +1088,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIINSTANCE,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl"),
|
||||
VTX_POSTEX_INSTANCE_UI::Elements, VTX_POSTEX_INSTANCE_UI::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_PARTICLE::Elements, VTX_MODEL_INSTANCE_PARTICLE::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_MODEL::Elements, VTX_MODEL_INSTANCE_MODEL::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// Heavy Wall
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
@@ -863,8 +1105,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.vAutoDamping = { 100.f, 100.f };
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -897,9 +1137,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Wand_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
@@ -959,11 +1196,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
|
||||
@@ -1566,8 +1798,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CFSM>(g_iStaticLevel, CFSM::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
/* For.Prototype_GameObject_Camera_Gaze */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Gaze>(g_iStaticLevel, CCamera_Gaze::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -1613,6 +1843,31 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
#pragma region RECEIVE_THREAD
|
||||
{ // MapModels
|
||||
_uint iIndex = 0;
|
||||
for (auto& JobMapModels : jobMapModels)
|
||||
{
|
||||
vector<FOLDER_LOAD*>* pOut = JobMapModels.get();
|
||||
for (_uint i = 0; i < pOut->size(); ++i) {
|
||||
FOLDER_LOAD* pContents = (*pOut)[i];
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint j = 0; j < pContents->pRigidBodyTags.size(); ++j) {
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[j], pContents->LoadedRigidBody[j]))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
Safe_Delete(pContents);
|
||||
}
|
||||
iIndex++;
|
||||
Safe_Delete(pOut);
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
@@ -1690,18 +1945,18 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<FOLDER_LOAD*>** OutContents)
|
||||
vector<FOLDER_LOAD*>* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag)
|
||||
{
|
||||
if (FAILED(CoInitializeEx(nullptr, 0))) {
|
||||
return;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!filesystem::exists(pDirectoryPath)) {
|
||||
MSG_BOX(" 경로 이상해 ");
|
||||
return;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
*OutContents = new vector<FOLDER_LOAD*>;
|
||||
vector<FOLDER_LOAD*>* pOut = new vector<FOLDER_LOAD*>;
|
||||
for (const auto& file : filesystem::directory_iterator(pDirectoryPath))
|
||||
{
|
||||
if (file.is_directory()) { continue; }
|
||||
@@ -1716,7 +1971,7 @@ void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContex
|
||||
_wstring wstrFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
|
||||
|
||||
CModel* pModel = CModel::Create(pDevice, pContext, MODEL::ENVIROMENT, szFilePath);
|
||||
|
||||
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
|
||||
{
|
||||
@@ -1739,21 +1994,22 @@ void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContex
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.f;
|
||||
}
|
||||
|
||||
pContents->pRigidBodyTags.emplace_back(CMyTools::ToWstring(pModel->Get_MeshName(i) + to_string(i)).c_str());
|
||||
pContents->LoadedRigidBody.emplace_back(CRigidBody_Static::Create(pDevice, pContext, Desc));
|
||||
}
|
||||
}
|
||||
(*OutContents)->emplace_back(pContents);
|
||||
(*pOut).emplace_back(pContents);
|
||||
}
|
||||
(*OutContents)->shrink_to_fit();
|
||||
(*pOut).shrink_to_fit();
|
||||
|
||||
CoUninitialize();
|
||||
return;
|
||||
return pOut;
|
||||
}
|
||||
|
||||
future<void> CLoader::Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<FOLDER_LOAD*>** OutContents)
|
||||
future<vector<FOLDER_LOAD*>*> CLoader::Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag)
|
||||
{
|
||||
return m_pGameInstance->EnqueueJob(&Deferred_FolderLoad_Main, m_pDevice, m_pContext, pDirectoryPath, pFileExt, bUseTag, OutContents);
|
||||
return m_pGameInstance->EnqueueJob(&Deferred_FolderLoad_Main, m_pDevice, m_pContext, pDirectoryPath, pFileExt, bUseTag);
|
||||
}
|
||||
|
||||
pair<_wstring, CModel*>* APIENTRY Deferred_ModelLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const _char* pDirectoryPath, const _tchar* pPrototypeTag, _fmatrix PreTransform)
|
||||
|
||||
@@ -55,14 +55,17 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
|
||||
{
|
||||
Load_StreetContainer(Container, &pContainerObject);
|
||||
}
|
||||
else
|
||||
else {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_MapRenderObjects(Container, pContainerObject)))
|
||||
if (FAILED(Load_MapRenderObjects(Container, pContainerObject))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_MapCollisionObjects(Container, pContainerObject)))
|
||||
if (FAILED(Load_MapCollisionObjects(Container, pContainerObject))){
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
|
||||
@@ -51,13 +51,15 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[iIndex]);
|
||||
}
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
if (FAILED(Ready_Components())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
@@ -80,23 +82,37 @@ HRESULT CMapObject_Collision::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components();
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[iIndexLOD],
|
||||
reinterpret_cast<CComponent**>(&pModel)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
|
||||
// _uint iMeshes = pModel->Get_NumMeshes();
|
||||
// for (_uint iIndex = 0; iIndex < iMeshes; ++iIndex) {
|
||||
// _wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex);
|
||||
// CRigidBody_Static* pRigidBody = { nullptr };
|
||||
// CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
// Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
// Desc.pMeshName = wstrName.c_str();
|
||||
// if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, wstrName, (CComponent**)&pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// m_RigidBodies[iIndexLOD].push_back(pRigidBody);
|
||||
// }
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))){
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -151,9 +167,15 @@ void CMapObject_Collision::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
Safe_Release(pModel);
|
||||
m_pModelComs.clear();
|
||||
for (auto& pModel : m_pModelComs){
|
||||
SAFE_RELEASE(pModel);
|
||||
} m_pModelComs.clear();
|
||||
|
||||
for (_uint i = 0; i < m_RigidBodies.size(); ++i) {
|
||||
for (_uint j = 0; j < m_RigidBodies[i].size(); ++j) {
|
||||
SAFE_RELEASE(m_RigidBodies[i][j]);
|
||||
}
|
||||
} m_RigidBodies.clear();
|
||||
|
||||
m_ModelPrototypeTags.clear();
|
||||
m_ModelPathIndices.clear();
|
||||
|
||||
@@ -60,11 +60,11 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
Load_KeyFrame();
|
||||
#endif // _DEBUG
|
||||
|
||||
m_pBroom = static_cast<CBroom*>(pArg);
|
||||
SAFE_ADDREF(m_pBroom);
|
||||
m_pBroom = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_ITEM)->Get_Object<CBroom>();
|
||||
m_pBroomModel = m_pBroom->Get_Component<CModel>();
|
||||
SAFE_ADDREF(m_pBroomModel);
|
||||
m_pBroomTransform = m_pBroom->Get_Component<CTransform>();
|
||||
SAFE_ADDREF(m_pBroom);
|
||||
SAFE_ADDREF(m_pBroomModel);
|
||||
SAFE_ADDREF(m_pBroomTransform);
|
||||
|
||||
Add_FSM();
|
||||
@@ -289,7 +289,7 @@ HRESULT CPlayer::Ready_Components()
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Playable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 22.5f;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -16,24 +16,27 @@ void CStreetContainer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CStreetContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CStreetContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Render()
|
||||
@@ -109,8 +112,9 @@ void CStreetContainer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
for (auto& pCollision : m_ColiisonPartObjects){
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -93,7 +93,10 @@ void CTroll::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CTroll::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Client {
|
||||
#define LAYER_DOT TEXT("Layer_Dot")
|
||||
#define LAYER_CELL TEXT("Layer_Cell")
|
||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||
#define LAYER_ITEM TEXT("Layer_Item")
|
||||
#define LAYER_EFFECTPOOL TEXT("Layer_EffectPool")
|
||||
#define LAYER_LIGHT TEXT("Layer_Light")
|
||||
|
||||
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
|
||||
|
||||
@@ -40,7 +40,7 @@ class CLoader final : public CBase
|
||||
|
||||
private:
|
||||
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function<HRESULT(_wstring, const _char*)> AddPrototypeEvent);
|
||||
future<void> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<FOLDER_LOAD*>** OutContents);
|
||||
future<vector<FOLDER_LOAD*>*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
|
||||
future<pair<_wstring, CModel*>*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag);
|
||||
public:
|
||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||
|
||||
@@ -23,6 +23,7 @@ class CMapObject_Collision final : public CMapPartObject // 충돌용 Mesh
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<vector<CRigidBody_Static*>> m_RigidBodies;
|
||||
vector<CModel*> m_pModelComs;
|
||||
|
||||
_uint m_iLodIndex = {};
|
||||
|
||||
@@ -269,7 +269,6 @@ call Update_Lib.bat
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Key_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Layer.cpp" />
|
||||
<ClCompile Include="..\Private\LerpAnim.cpp" />
|
||||
<ClCompile Include="..\Private\Level.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Light.cpp" />
|
||||
@@ -522,7 +521,6 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_truetype.h" />
|
||||
<ClInclude Include="..\Public\Key_Manager.h" />
|
||||
<ClInclude Include="..\Public\Layer.h" />
|
||||
<ClInclude Include="..\Public\LerpAnim.h" />
|
||||
<ClInclude Include="..\Public\Level.h" />
|
||||
<ClInclude Include="..\Public\Level_Manager.h" />
|
||||
<ClInclude Include="..\Public\Light.h" />
|
||||
|
||||
@@ -178,9 +178,6 @@
|
||||
<Filter Include="02.Element\02.Component\06.Model\Animation\Channel">
|
||||
<UniqueIdentifier>{3625aad6-89b2-490e-bd9c-3cff284605e4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model\LerpAnim">
|
||||
<UniqueIdentifier>{92ec7ae6-14ee-455c-a3ad-378e46f3b1f0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Cube">
|
||||
<UniqueIdentifier>{be0d499e-e4cf-4dde-92a0-a0904e713045}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -462,9 +459,6 @@
|
||||
<ClCompile Include="..\Private\Channel.cpp">
|
||||
<Filter>02.Element\02.Component\06.Model\Animation\Channel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\LerpAnim.cpp">
|
||||
<Filter>02.Element\02.Component\06.Model\LerpAnim</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\VIBuffer_Cube.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cube</Filter>
|
||||
</ClCompile>
|
||||
@@ -1094,9 +1088,6 @@
|
||||
<ClInclude Include="..\Public\Channel.h">
|
||||
<Filter>02.Element\02.Component\06.Model\Animation\Channel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\LerpAnim.h">
|
||||
<Filter>02.Element\02.Component\06.Model\LerpAnim</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\VIBuffer_Cube.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cube</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -29,9 +29,7 @@ CAnimation::CAnimation(const CAnimation& rhs)
|
||||
, m_fTempTrack{rhs.m_fTempTrack }
|
||||
{
|
||||
memcpy_s(m_TickPerSeconds, sizeof(_float) * 2, rhs.m_TickPerSeconds, sizeof(_float) * 2);
|
||||
|
||||
strcpy_s(m_szName, sizeof(m_szName), rhs.m_szName);
|
||||
|
||||
|
||||
for (auto& pChannel : m_Channels) {
|
||||
SAFE_ADDREF(pChannel);
|
||||
}
|
||||
@@ -359,7 +357,6 @@ void CAnimation::CreateGPUData(ID3D11Device* pDevice)
|
||||
HRESULT CAnimation::Initialize(const vector<CBone*>& Bones, const aiAnimation* pAIAnimation)
|
||||
{
|
||||
m_strName = pAIAnimation->mName.data;
|
||||
strcpy_s(m_szName, pAIAnimation->mName.data);
|
||||
size_t pos = m_strName.find_last_of('|');
|
||||
if (0 > pos) {
|
||||
pos = 0;
|
||||
@@ -368,6 +365,7 @@ HRESULT CAnimation::Initialize(const vector<CBone*>& Bones, const aiAnimation* p
|
||||
pos++;
|
||||
}
|
||||
m_strName = m_strName.substr(pos);
|
||||
m_strName.shrink_to_fit();
|
||||
|
||||
m_fDuration = (_float)pAIAnimation->mDuration;
|
||||
m_TickPerSeconds[0] = (_float)pAIAnimation->mTicksPerSecond;
|
||||
@@ -406,8 +404,8 @@ CAnimation* CAnimation::Create(const vector<CBone*>& Bones, const aiAnimation* p
|
||||
HRESULT CAnimation::Initialize(const vector<CBone*>& Bones, const CModel* pModel, SaveAnimation* pSaveAnimation)
|
||||
{
|
||||
m_pSaveAnim = pSaveAnimation;
|
||||
|
||||
strcpy_s(m_szName, pSaveAnimation->AnimName.c_str());
|
||||
m_strName = pSaveAnimation->AnimName;
|
||||
m_strName.shrink_to_fit();
|
||||
m_fDuration = pSaveAnimation->mDuration;
|
||||
m_fTickPerSecond = pSaveAnimation->mTicksPerSecond;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ CBone::CBone()
|
||||
CBone::CBone(const CBone& other):
|
||||
CBase()
|
||||
{
|
||||
memcpy_s(m_szName, sizeof(_char) * MAX_PATH, other.m_szName, sizeof(_char) * MAX_PATH);
|
||||
m_strName = other.m_strName;
|
||||
m_TransformationMatrix = other.m_TransformationMatrix;
|
||||
m_CombinedTransformationMatrix = other.m_CombinedTransformationMatrix;
|
||||
m_iParentBoneIndex = other.m_iParentBoneIndex;
|
||||
@@ -55,11 +55,10 @@ _float3 CBone::Get_LocalPosition()
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT CBone::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
string strName = m_szName;
|
||||
strName.shrink_to_fit();
|
||||
DWORD iLength = (DWORD)strName.length();
|
||||
m_strName.shrink_to_fit();
|
||||
DWORD iLength = (DWORD)m_strName.length();
|
||||
WriteFile(hFile, &iLength, sizeof(_uint), &dwByte, nullptr);
|
||||
WriteFile(hFile, strName.data(), iLength, &dwByte, nullptr);
|
||||
WriteFile(hFile, m_strName.data(), iLength, &dwByte, nullptr);
|
||||
WriteFile(hFile, &m_iParentBoneIndex, sizeof(_int), &dwByte, nullptr);
|
||||
WriteFile(hFile, &m_TransformationMatrix, sizeof(_float4x4), &dwByte, nullptr);
|
||||
WriteFile(hFile, &m_matInitial, sizeof(_float4x4), &dwByte, nullptr);
|
||||
@@ -82,8 +81,8 @@ CBone* CBone::Create(const aiNode* pAINode, _int iParentIndex)
|
||||
|
||||
HRESULT CBone::Initialize(const aiNode* pAINode, _int iParentIndex)
|
||||
{
|
||||
strcpy_s(m_szName, pAINode->mName.data);
|
||||
|
||||
m_strName = pAINode->mName.data;
|
||||
m_strName.shrink_to_fit();
|
||||
m_iParentBoneIndex = iParentIndex;
|
||||
|
||||
memcpy(&m_TransformationMatrix, &pAINode->mTransformation, sizeof(_float4x4));
|
||||
@@ -114,7 +113,8 @@ HRESULT CBone::Initialize(HANDLE hFile, DWORD& dwByte)
|
||||
if (!ReadFile(hFile, &iLength, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, m_szName, iLength, &dwByte, nullptr)) {
|
||||
m_strName.resize(iLength);
|
||||
if (!ReadFile(hFile, m_strName.data(), iLength, &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &m_iParentBoneIndex, sizeof(_int), &dwByte, nullptr)) {
|
||||
@@ -134,8 +134,7 @@ HRESULT CBone::Initialize(HANDLE hFile, DWORD& dwByte)
|
||||
|
||||
HRESULT CBone::Initialize(const SaveNode& _SaveNode, _int iParentIndex)
|
||||
{
|
||||
strcpy_s(m_szName, _SaveNode.NodeName.c_str());
|
||||
|
||||
m_strName = _SaveNode.NodeName;
|
||||
m_iParentBoneIndex = iParentIndex;
|
||||
|
||||
memcpy(&m_TransformationMatrix, &_SaveNode.Transformation, sizeof(_float4x4));
|
||||
|
||||
@@ -11,9 +11,9 @@ CChannel::CChannel()
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT CChannel::Initialize(const vector<CBone*>& Bones, const aiNodeAnim* pAIChannel)
|
||||
{
|
||||
strcpy_s(m_szName, pAIChannel->mNodeName.data);
|
||||
|
||||
m_iBoneIndex = CModel::Get_BoneIndex(m_szName, Bones);
|
||||
m_strName = pAIChannel->mNodeName.data;
|
||||
m_strName.shrink_to_fit();
|
||||
m_iBoneIndex = CModel::Get_BoneIndex(m_strName.c_str(), Bones);
|
||||
if (-1 == m_iBoneIndex) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -102,8 +102,8 @@ CHANNEL_DESC CChannel::Fill_GPU_ChannelDesc()
|
||||
HRESULT CChannel::Initialize(const vector<CBone*>& Bones, _uint iIndex)
|
||||
{
|
||||
m_iBoneIndex = iIndex;
|
||||
memcpy_s(m_szName, sizeof(_char) * MAX_PATH, Bones[iIndex]->Get_Name(), sizeof(_char) * MAX_PATH);
|
||||
|
||||
m_strName = Bones[iIndex]->Get_Name();
|
||||
m_strName.shrink_to_fit();
|
||||
m_iNumKeyFrames = 2;
|
||||
m_KeyFrames.resize(m_iNumKeyFrames);
|
||||
|
||||
@@ -191,9 +191,9 @@ void CChannel::Set_Frame(_uint iIndex, KEYFRAME& kf)
|
||||
|
||||
HRESULT CChannel::Initialize(const CModel* pModel, SaveChannel* pSaveChannel)
|
||||
{
|
||||
strcpy_s(m_szName, pSaveChannel->ChannelName.c_str());
|
||||
|
||||
m_iBoneIndex = pModel->Get_BoneIndex(m_szName);
|
||||
m_strName = pSaveChannel->ChannelName;
|
||||
m_strName.shrink_to_fit();
|
||||
m_iBoneIndex = pModel->Get_BoneIndex(m_strName.c_str());
|
||||
m_PreTransformMatrix = pModel->Get_PreTransformMatrix();
|
||||
|
||||
m_iNumKeyFrames = max(pSaveChannel->ScalingKeyCount, pSaveChannel->RotationKeyCount);
|
||||
|
||||
@@ -212,18 +212,21 @@ _bool CCharacter_Controller::UpdateGroundByCast(_float fTimeDelta)
|
||||
case PXOBJECT::FLOOR:
|
||||
case PXOBJECT::ROAD:
|
||||
{ // 임계값 이상이면 지면에 서서히 붙임
|
||||
_float fYHitPos = hit.position.y;
|
||||
_float fYFoot = (_float)m_pController->getFootPosition().y;
|
||||
_float fDiff = (fYHitPos - fYFoot);
|
||||
if (fDiff > m_vAccHeight.w) {
|
||||
_vector vMomentum = m_pTransform->Get_CurrentMomentum();
|
||||
_float fYCurrentMomentum = XMVectorGetY(vMomentum);
|
||||
fYCurrentMomentum = fDiff * 0.3f;
|
||||
m_pTransform->Set_CurrentMomentum(XMVectorSetY(vMomentum, fYCurrentMomentum));
|
||||
}
|
||||
else {
|
||||
m_iIsOnGround = iCoyote_Counter;
|
||||
}
|
||||
m_iIsOnGround = iCoyote_Counter;
|
||||
|
||||
|
||||
//_float fYHitPos = hit.position.y;
|
||||
//_float fYFoot = (_float)m_pController->getFootPosition().y;
|
||||
//_float fDiff = (fYHitPos - fYFoot);
|
||||
//if (fDiff > m_vAccHeight.w) {
|
||||
// _vector vMomentum = m_pTransform->Get_CurrentMomentum();
|
||||
// _float fYCurrentMomentum = XMVectorGetY(vMomentum);
|
||||
// fYCurrentMomentum = fDiff * 0.3f;
|
||||
// m_pTransform->Set_CurrentMomentum(XMVectorSetY(vMomentum, fYCurrentMomentum));
|
||||
//}
|
||||
//else {
|
||||
// m_iIsOnGround = iCoyote_Counter;
|
||||
//}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -324,7 +327,7 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
Desc.reportCallback = pDesc->pCallback_HitReport;
|
||||
Desc.behaviorCallback = pDesc->pCallback_Behavior;
|
||||
Desc.slopeLimit = cosf(XMConvertToRadians(m_fWalkableSlopeDegree));
|
||||
Desc.nonWalkableMode = PSX::PxControllerNonWalkableMode::ePREVENT_CLIMBING;
|
||||
Desc.nonWalkableMode = PSX::PxControllerNonWalkableMode::ePREVENT_CLIMBING_AND_FORCE_SLIDING;
|
||||
Desc.material = m_pGameInstance->Create_Material(&pDesc->fMaterial);
|
||||
m_pController = m_pGameInstance->Add_BoxController(Desc);
|
||||
m_pController->setUserData(&m_tagData);
|
||||
@@ -340,7 +343,7 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
Desc.reportCallback = pDesc->pCallback_HitReport;
|
||||
Desc.behaviorCallback = pDesc->pCallback_Behavior;
|
||||
Desc.slopeLimit = cosf(XMConvertToRadians(m_fWalkableSlopeDegree));
|
||||
Desc.nonWalkableMode = PSX::PxControllerNonWalkableMode::ePREVENT_CLIMBING;
|
||||
Desc.nonWalkableMode = PSX::PxControllerNonWalkableMode::ePREVENT_CLIMBING_AND_FORCE_SLIDING;
|
||||
Desc.material = m_pGameInstance->Create_Material(&pDesc->fMaterial);
|
||||
m_pController = m_pGameInstance->Add_CapsuleController(Desc);
|
||||
m_pController->setUserData(&m_tagData);
|
||||
|
||||
@@ -49,7 +49,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
}
|
||||
}
|
||||
}
|
||||
m_pThreadHolder = CThreadHolder::Create(4);
|
||||
m_pThreadHolder = CThreadHolder::Create( 12 );
|
||||
if (nullptr == m_pThreadHolder) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -647,15 +647,19 @@ void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
{
|
||||
lock_guard<mutex> lock(m_mtxLoadModelLock);
|
||||
m_sModelMap[filePath] = sModel;
|
||||
}
|
||||
|
||||
SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
{
|
||||
m_mtxLoadModelLock.lock();
|
||||
auto iter = m_sModelMap.find(filePath);
|
||||
m_mtxLoadModelLock.unlock();
|
||||
return &iter->second;
|
||||
lock_guard<mutex> lock(m_mtxLoadModelLock);
|
||||
map<const _char*, SaveModel>::iterator iter = m_sModelMap.find(filePath);
|
||||
if (iter == m_sModelMap.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
SaveModel* pOut = &iter->second;
|
||||
return pOut;
|
||||
}
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
@@ -727,16 +731,16 @@ HRESULT CGameInstance::SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleM
|
||||
{
|
||||
return m_pPhysX_Manager->SaveTriMeshes(pPath, TriMeshes);
|
||||
}
|
||||
void CGameInstance::Add_Editor_Plane(PhsXUserData& PlaneData)
|
||||
{
|
||||
m_pPhysX_Manager->Add_Editor_Plane(PlaneData);
|
||||
}
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
HRESULT CGameInstance::LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes)
|
||||
{
|
||||
return m_pPhysX_Manager->LoadTriMeshes(pPath, TriMeshes);
|
||||
}
|
||||
void CGameInstance::Add_Editor_Plane(PhsXUserData& PlaneData)
|
||||
{
|
||||
m_pPhysX_Manager->Add_Editor_Plane(PlaneData);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region FOG
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "LerpAnim.h"
|
||||
#include "Channel.h"
|
||||
#include "Bone.h"
|
||||
|
||||
CLerpAnim::CLerpAnim()
|
||||
{
|
||||
}
|
||||
|
||||
_bool CLerpAnim::Update_TransformationMatrices(const vector<CBone*>& Bones, _float fTimeDelta)
|
||||
{
|
||||
m_fCurrentTrackPosition += m_fTickPerSecond * fTimeDelta;
|
||||
|
||||
if (m_fCurrentTrackPosition >= m_fDuration) {
|
||||
m_fCurrentTrackPosition = m_fDuration;
|
||||
m_bLerping = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*_uint iIndex = {};
|
||||
for (auto& pChannel : m_Channels) {
|
||||
if (true == m_Movable[iIndex]) {
|
||||
pChannel->Update_TransformationMatirx(Bones, m_fCurrentTrackPosition, &m_CurrentKeyFrameIndices[iIndex]);
|
||||
}
|
||||
iIndex++;
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
|
||||
HRESULT CLerpAnim::Initialize(_uint iNumBone, _float fTickPerSecond, const vector<CBone*>& Bones)
|
||||
{
|
||||
m_iNumChannels = iNumBone;
|
||||
m_fTickPerSecond = fTickPerSecond;
|
||||
m_CurrentKeyFrameIndices.resize(m_iNumChannels);
|
||||
m_Movable.resize(m_iNumChannels);
|
||||
m_InitialFrames.resize(m_iNumChannels);
|
||||
m_Channels.reserve(m_iNumChannels);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CLerpAnim::Begin(const vector<class CBone*>& Bones, vector<LERPDESC>& StartFrames, vector<LERPDESC>& EndFrames, _float fDuration, _uint iRootBoneIndex)
|
||||
{
|
||||
{ // 초기화
|
||||
|
||||
//KEYFRAME kf = { // 항등행렬의 키프레임
|
||||
// { 1.f, 1.f, 1.f },
|
||||
// { 0.f, 0.f, 0.f, 1.f },
|
||||
// { 0.f, 0.f, 0.f},
|
||||
// m_fDuration };
|
||||
m_bLerping = true;
|
||||
m_fDuration = fDuration;
|
||||
m_fCurrentTrackPosition = 0.f;
|
||||
for (_uint i = 0; i < m_iNumChannels; ++i) {
|
||||
m_Channels[i]->Set_Frame(1, m_InitialFrames[i]); // 끝프레임을 초기 값으로 채우기
|
||||
}
|
||||
fill(m_CurrentKeyFrameIndices.begin(), m_CurrentKeyFrameIndices.end(), 0);
|
||||
fill(m_Movable.begin(), m_Movable.end(), false);
|
||||
}
|
||||
{ // 실제 값 채우기
|
||||
for (LERPDESC& Desc : EndFrames) // 끝프레임을 실제 값으로 채우기
|
||||
{
|
||||
_int iIndex = Desc.iSlot;
|
||||
Desc.tagKeyFrame.fTrackPosition = m_fDuration;
|
||||
m_Channels[iIndex]->Set_Frame(1, Desc.tagKeyFrame);
|
||||
}
|
||||
for (_uint i = 0; i < StartFrames.size(); ++i) { // 시작 프레임을 현재 본 상태 키프레임으로 채우기
|
||||
_int iIndex = StartFrames[i].iSlot;
|
||||
m_Movable[iIndex] = true;
|
||||
m_Channels[iIndex]->Set_Frame(0, StartFrames[i].tagKeyFrame);
|
||||
}
|
||||
//m_Movable[iRootBoneIndex] = false;
|
||||
}
|
||||
}
|
||||
CLerpAnim* CLerpAnim::Create(_uint iNumBone, _float fTickPerSecond, const vector<CBone*>& Bones)
|
||||
{
|
||||
CLerpAnim* pInstance = new CLerpAnim;
|
||||
if (FAILED(pInstance->Initialize(iNumBone, fTickPerSecond, Bones))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLerpAnim::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pChannel : m_Channels) {
|
||||
SAFE_RELEASE(pChannel);
|
||||
}
|
||||
m_Channels.clear();
|
||||
|
||||
m_CurrentKeyFrameIndices.clear();
|
||||
}
|
||||
;
|
||||
@@ -57,7 +57,8 @@ HRESULT CMesh::Render_Indexed(_uint IndexCount, _uint StartIndexLocation, _uint
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT CMesh::Initialize_Prototype(MODEL eType, vector<class CBone*>& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix)
|
||||
{
|
||||
strcpy_s(m_szName, pAIMesh->mName.data);
|
||||
m_strName = pAIMesh->mName.data;
|
||||
m_strName.shrink_to_fit();
|
||||
|
||||
m_iMaterialIndex = pAIMesh->mMaterialIndex;
|
||||
m_iNumVertexBuffers = 1;
|
||||
@@ -151,7 +152,8 @@ HRESULT CMesh::Render_Instance(_uint iNumInstance)
|
||||
|
||||
HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix)
|
||||
{
|
||||
strcpy_s(m_szName, _SaveMesh->MeshName.c_str());
|
||||
m_strName = _SaveMesh->MeshName;
|
||||
m_strName.shrink_to_fit();
|
||||
|
||||
m_iMaterialIndex = _SaveMesh->MaterialIndex;
|
||||
m_iNumVertexBuffers = 1;
|
||||
@@ -317,7 +319,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(const CModel* pModel, SaveMesh* _Save
|
||||
for (_uint i = 0; i < m_iNumBones; i++)
|
||||
{
|
||||
SaveBone _SaveBone = _SaveMesh->Bones[i];
|
||||
strcpy_s(m_szName, _SaveBone.BoneName.c_str());
|
||||
m_strName = _SaveBone.BoneName;
|
||||
|
||||
memcpy(&OffsetMatrix, &_SaveBone.OffsetMatrix, sizeof(_float4x4));
|
||||
|
||||
@@ -361,7 +363,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(const CModel* pModel, SaveMesh* _Save
|
||||
{
|
||||
m_iNumBones = 1;
|
||||
|
||||
m_BoneIndices.push_back(pModel->Get_BoneIndex(m_szName));
|
||||
m_BoneIndices.push_back(pModel->Get_BoneIndex(m_strName.c_str()));
|
||||
|
||||
m_offsetMatrices.push_back(OffsetMatrix);
|
||||
}
|
||||
@@ -554,7 +556,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const ai
|
||||
}
|
||||
if (0 == m_iNumBones) {
|
||||
m_iNumBones = 1;
|
||||
m_BoneIndices.push_back(CModel::Get_BoneIndex(m_szName, Bones));
|
||||
m_BoneIndices.push_back(CModel::Get_BoneIndex(m_strName.c_str(), Bones));
|
||||
m_offsetMatrices.push_back(OffSetMatrix);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "Mesh.h"
|
||||
#include "Material.h"
|
||||
#include "Animation.h"
|
||||
#include "LerpAnim.h"
|
||||
#include "GameObject.h"
|
||||
#include "Transform.h"
|
||||
#include "ComputeShader.h"
|
||||
@@ -24,7 +23,6 @@ CModel::CModel(const CModel& rhs)
|
||||
m_Materials(rhs.m_Materials),
|
||||
m_iNumMaterials(rhs.m_iNumMaterials),
|
||||
m_iNumAnimations(rhs.m_iNumAnimations),
|
||||
m_pLerpAnim(rhs.m_pLerpAnim),
|
||||
m_fRadius(rhs.m_fRadius),
|
||||
m_vRadiusOffset(rhs.m_vRadiusOffset)
|
||||
{
|
||||
@@ -525,7 +523,7 @@ void CModel::Set_CurrentTrackPosition(_float TrackPosition)
|
||||
|
||||
const _char* CModel::Get_AnimList(_uint iIndex)
|
||||
{
|
||||
return m_Animations[iIndex]->Get_SZName();
|
||||
return m_Animations[iIndex]->Get_Name().c_str();
|
||||
}
|
||||
|
||||
_float CModel::Get_CurrentTrackPosition()
|
||||
@@ -882,7 +880,7 @@ _bool CModel::SaveAssimpModel(const _char* filename)
|
||||
|
||||
for (size_t i = 0; i < m_Materials.size(); i++)
|
||||
{
|
||||
modelData.Materials.push_back(m_Materials[i]->Get_SaveMaterial());
|
||||
modelData.Materials.emplace_back(m_Materials[i]->Get_SaveMaterial());
|
||||
}
|
||||
|
||||
std::vector<SaveNode> allNodes;
|
||||
@@ -1372,6 +1370,9 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _
|
||||
}
|
||||
|
||||
m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath);
|
||||
if (nullptr == m_pSaveModel) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
LoadAdditionalAnimations(pModelFilePath);
|
||||
|
||||
@@ -1390,6 +1391,11 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _
|
||||
if (FAILED(Ready_Animations(m_Bones))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//#ifdef 기무리
|
||||
// if (MODEL::ENVIROMENT == eType) {
|
||||
// Save_PhysXTriMeshes(pModelFilePath);
|
||||
// }
|
||||
//#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -1562,13 +1568,13 @@ _bool CModel::LoadData(const _char* filename)
|
||||
NewModel.Materials.clear();
|
||||
for (_uint i = 0; i < NewModel.MaterialCount; i++)
|
||||
{
|
||||
SaveMaterial mat;
|
||||
SaveMaterial pMAt;
|
||||
|
||||
for (_uint k = 0; k < AI_TEXTURE_TYPE_MAX; k++)
|
||||
{
|
||||
_uint MaterialCount = 0;
|
||||
fread(&MaterialCount, sizeof(_uint), 1, fp);
|
||||
mat.Path[k].resize(MaterialCount);
|
||||
pMAt.Path[k].resize(MaterialCount);
|
||||
for (_uint j = 0; j < MaterialCount; j++)
|
||||
{
|
||||
_uint len = 0;
|
||||
@@ -1576,11 +1582,11 @@ _bool CModel::LoadData(const _char* filename)
|
||||
std::string temp;
|
||||
temp.resize(len);
|
||||
fread(&temp[0], sizeof(_char), len, fp);
|
||||
mat.Path[k][j] = temp;
|
||||
pMAt.Path[k][j] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
NewModel.Materials.push_back(mat);
|
||||
NewModel.Materials.push_back(pMAt);
|
||||
}
|
||||
|
||||
if (MODEL::ENVIROMENT == m_eType)
|
||||
@@ -1838,6 +1844,7 @@ void CModel::Free()
|
||||
SAFE_RELEASE(m_pConstantBuffer);
|
||||
SAFE_RELEASE(m_pParentBuffer);
|
||||
SAFE_RELEASE(m_pLocalPosBuffer);
|
||||
|
||||
for (auto& pAnimation : m_Animations) {
|
||||
SAFE_RELEASE(pAnimation);
|
||||
}
|
||||
@@ -1857,7 +1864,6 @@ void CModel::Free()
|
||||
m_Bones.clear();
|
||||
|
||||
SAFE_RELEASE(m_pTransform);
|
||||
SAFE_RELEASE(m_pLerpAnim);
|
||||
|
||||
m_SaveModel.clear();
|
||||
|
||||
@@ -1888,7 +1894,7 @@ void CModel::Describe_Entity()
|
||||
for (_uint i = 0; i < m_iNumAnimations; ++i) {
|
||||
|
||||
name.clear();
|
||||
name.append(m_Animations[i]->Get_SZName());
|
||||
name.append(m_Animations[i]->Get_Name().c_str());
|
||||
|
||||
size_t pos = name.find_last_of('|');
|
||||
if (0 > pos) { pos = 0; }
|
||||
|
||||
@@ -477,18 +477,26 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
if (FAILED(Connect_DebugServer())) {
|
||||
//ASSERT_NURI(false);
|
||||
//ASSERT_JINWOO(false);
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
{ // 씬 세팅
|
||||
m_ToleranceScale.length = 1.f; // 1 meter
|
||||
m_ToleranceScale.speed = GRAVITY; //
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true, m_pPvd);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
m_pCookingParam = new PSX::PxCookingParams(m_pPhysics->getTolerancesScale());
|
||||
m_pCookingParam->meshPreprocessParams |= PSX::PxMeshPreprocessingFlag::eWELD_VERTICES;
|
||||
@@ -565,6 +573,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CPhysX_Manager::Connect_DebugServer()
|
||||
{
|
||||
@@ -587,6 +596,8 @@ HRESULT CPhysX_Manager::Connect_DebugServer()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
CPhysX_Manager* CPhysX_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CPhysX_Manager* pInstance = new CPhysX_Manager(pDevice, pContext);
|
||||
@@ -640,12 +651,15 @@ void CPhysX_Manager::Free()
|
||||
if (nullptr != m_pPhysics) {
|
||||
m_pPhysics->release(); m_pPhysics = nullptr;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
if (nullptr != m_pPvd) {
|
||||
m_pPvd->disconnect();
|
||||
m_pPvd->release(); m_pPvd = nullptr;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
if (nullptr != m_pTransport) {
|
||||
m_pTransport->release(); m_pTransport = nullptr;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ CRigidBody_Static::CRigidBody_Static(ID3D11Device* pDevice, ID3D11DeviceContext*
|
||||
|
||||
CRigidBody_Static::CRigidBody_Static(const CRigidBody_Static& rhs) :
|
||||
CRigidBody(rhs),
|
||||
m_pMeshName(rhs.m_pMeshName)
|
||||
m_wstrMeshName(rhs.m_wstrMeshName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ HRESULT CRigidBody_Static::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
RIGIDBODY_STATIC_DESC* pDesc = static_cast<RIGIDBODY_STATIC_DESC*>(pArg);
|
||||
m_pMeshName = pDesc->pMeshName;
|
||||
m_wstrMeshName = pDesc->pMeshName;
|
||||
m_tagData.pOwner = m_pOwner;
|
||||
XMStoreFloat4x4(&m_tagData.BeforeMatrix, m_pTransform->Get_XMWorldMatrix());
|
||||
m_tagData.pBody = this;
|
||||
|
||||
@@ -181,8 +181,10 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
//XMStoreFloat3(&m_pVertices[0].vPosition, vLow);
|
||||
//XMStoreFloat3(&m_pVertices[1].vPosition, vHigh);
|
||||
|
||||
@@ -31,7 +31,6 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
vector<LERPDESC> Get_StartFrameInformations() { return m_StartKeyFrames; }
|
||||
const _string& Get_Name() const { return m_strName; }
|
||||
|
||||
const _char* Get_SZName() const { return m_szName; }
|
||||
void Set_CurrentTrackPosition(_float TrackPosition) { m_fCurrentTrackPosition = TrackPosition; }
|
||||
_float Get_CurrentTrackPosition() { return m_fCurrentTrackPosition; }
|
||||
_float Get_CurrentTrackProgressRatio() { return m_fTempTrack / m_fDurationSeconds;}
|
||||
@@ -68,14 +67,13 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
|
||||
private:
|
||||
SaveAnimation* m_pSaveAnim = { nullptr };
|
||||
_char m_szName[MAX_PATH] = {};
|
||||
_float m_fTickPerSecond = {};
|
||||
_float m_fAnimSpeed = {1.f};
|
||||
|
||||
_bool m_bPause = { FALSE }; // 애님퍼즈 인덱스
|
||||
_string m_strName = {}; // 애님 이름
|
||||
_float m_fCurrentTrackPosition = {}; // 현재 트랙 위치
|
||||
_float m_fDuration = {}; // 트랙의 전체 길이
|
||||
_bool m_bPause = { FALSE }; // 애님퍼즈 인덱스
|
||||
_float m_TickPerSeconds[2] = { 0.f, 0.f }; // 초당 트랙 이동 거리
|
||||
_uint m_iNumChannels = {}; // 영향을 받는 본의 수
|
||||
_float m_fTempTrack = {};
|
||||
|
||||
@@ -21,21 +21,21 @@ class ENGINE_DLL CBone final : public CBase
|
||||
return XMStoreFloat4x4(&m_CombinedTransformationMatrix, newMatrix);
|
||||
}
|
||||
_bool Compare_Name(const _char* pBoneName) const {
|
||||
return !strcmp(pBoneName, m_szName);
|
||||
return !strcmp(pBoneName, m_strName.c_str());
|
||||
}
|
||||
void Get_KeyFrame(KEYFRAME& kf, _bool bIsCurrentFrame); // 현재 본의 로컬매트릭스를 캡쳐해서 키프레임으로 성분 분해하여 올려보낸다.
|
||||
const _char* Get_Name() const { return m_szName; }
|
||||
const _char* Get_Name() const { return m_strName.c_str(); }
|
||||
_float3 Get_LocalPosition();
|
||||
void Update_CombinedTransformationMatrix(const vector<CBone*>& Bones, _fmatrix PreTransformMatrix);
|
||||
void Set_TransformationMatrix(_fmatrix TransformationMatrix); // 애니메이션에서 현재 로컬 매트릭스를 변경할 때 사용된다
|
||||
_float4x4 Get_TransformationMatrix() { return m_TransformationMatrix; }
|
||||
_int Get_ParentBoneIndex() { return m_iParentBoneIndex; }
|
||||
private:
|
||||
_char m_szName[MAX_PATH] = {}; // 본의 이름
|
||||
_string m_strName = {};
|
||||
_float4x4 m_TransformationMatrix = {}; // 본의 현재 로컬 매트릭스
|
||||
_float4x4 m_CombinedTransformationMatrix = {}; // 본의 루트노드로부터 상대적인 복합매트릭스 ( 부모노드는 PreTranformMatrix와 월드좌표로부터 상대적임 )
|
||||
_int m_iParentBoneIndex = { -1 }; // 부모본의 인덱스 ( 모델에 있는 본벡터의 인덱스 ) ( 부모는 인덱스 -1 고정 )
|
||||
_float4x4 m_matInitial = {};
|
||||
_int m_iParentBoneIndex = { -1 }; // 부모본의 인덱스 ( 모델에 있는 본벡터의 인덱스 ) ( 부모는 인덱스 -1 고정 )
|
||||
private:
|
||||
HRESULT Initialize(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
|
||||
@@ -32,9 +32,9 @@ class ENGINE_DLL CChannel : public CBase
|
||||
KEYFRAME* Get_Frame(_uint iIndex);
|
||||
void Set_Frame(_uint iIndex, KEYFRAME& kf);
|
||||
_bool Compare_Name(const _char* pChannelname) const {
|
||||
return !strcmp(pChannelname, m_szName);
|
||||
return !strcmp(pChannelname, m_strName.c_str());
|
||||
}
|
||||
_char* Get_Name() { return m_szName; }
|
||||
const _char* Get_Name() { return m_strName.c_str(); }
|
||||
private:
|
||||
// 바이너리
|
||||
HRESULT Initialize(const class CModel* pModel, SaveChannel* pSaveChannel);
|
||||
@@ -51,23 +51,21 @@ class ENGINE_DLL CChannel : public CBase
|
||||
|
||||
|
||||
private:
|
||||
_char m_szName[MAX_PATH] = {}; // 영향을 받을 본의 이름
|
||||
_string m_strName = {};
|
||||
_int m_iBoneIndex = { -1 }; // 본 벡터에서 본의 인덱스
|
||||
_uint m_iNumKeyFrames = {}; // Animation의 m_fDuration동안 이 본이 취해야할 키프레임의 갯수
|
||||
_float4x4 m_PreTransformMatrix = {};
|
||||
vector<KEYFRAME> m_KeyFrames; // 키프레임 벡터
|
||||
_float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
|
||||
_float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
|
||||
_matrix m_BoneTransformationMatrix = {};
|
||||
_bool m_bInitialRootPos = { false };
|
||||
_bool m_bInitialRootRotSaved = {false};
|
||||
_float4 m_vInitialRootRot = {};
|
||||
|
||||
_bool m_IsUpper = false;
|
||||
_int m_ilayerIndex = 0;
|
||||
_float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
|
||||
_float4 m_vInitialRootRot = {};
|
||||
_matrix m_BoneTransformationMatrix = {};
|
||||
LOCALPOS_DESC LocalPos = {};
|
||||
|
||||
vector<KEYFRAME_DESC> m_KeyFrameDesc;
|
||||
_bool m_bInitialRootPos = { false };
|
||||
_bool m_bInitialRootRotSaved = { false };
|
||||
_bool m_IsUpper = false;
|
||||
public:
|
||||
// 바이너리
|
||||
static CChannel* Create(const class CModel* pModel, SaveChannel* pSaveChannel);
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CLerpAnim : public CBase
|
||||
{
|
||||
private:
|
||||
CLerpAnim();
|
||||
virtual ~CLerpAnim() = default;
|
||||
public:
|
||||
_bool IsLerping() { return m_bLerping; }
|
||||
_bool Update_TransformationMatrices(const vector<class CBone*>& Bones, _float fTimeDelta);
|
||||
HRESULT Initialize(_uint iNumBone, _float fTickPerSecond, const vector<class CBone*>& Bones);
|
||||
void Begin(const vector<class CBone*>& Bones, vector<LERPDESC>& StartFrames, vector<LERPDESC>& EndFrames, _float fDuration, _uint iRootBoneIndex);
|
||||
|
||||
private:
|
||||
_float m_fCurrentTrackPosition = {}; // 현재 트랙 위치
|
||||
_float m_fTickPerSecond = {}; // 초당 트랙 이동 거리
|
||||
_uint m_iNumChannels = {}; // 영향을 받는 본의 수
|
||||
|
||||
vector<class CChannel*> m_Channels; // 이 애니메이션이 영향을 준 사전 계산된 본의 배열
|
||||
vector<KEYFRAME> m_InitialFrames; // 초기 프레임
|
||||
vector<_uint> m_CurrentKeyFrameIndices; // 각 본이 현재 애니메이션에서 취해야할 키프레임 왼쪽 인덱스
|
||||
vector<_bool> m_Movable; // 각 본이 럴프 도중 업데이트를 받아야할지 말아야할지 스위치
|
||||
_bool m_bLerping = { false }; // 럴프 확인 부울
|
||||
_float m_fDuration = { 0.25f }; // 럴프 주기
|
||||
|
||||
public:
|
||||
static CLerpAnim* Create(_uint iNumBone, _float fTickPerSecond, const vector<class CBone*>& Bones);
|
||||
virtual void Free() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -16,7 +16,7 @@ class ENGINE_DLL CMesh final : public CVIBuffer
|
||||
return m_iMaterialIndex;
|
||||
}
|
||||
|
||||
const _char* Get_Name() const { return m_szName; }
|
||||
const _char* Get_Name() const { return m_strName.c_str(); }
|
||||
HRESULT Bind_BoneMatrices(const vector<class CBone*>& Bones, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Bind_BoneMatrices(_float4x4* pCombinedMatrices, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Render_Indexed(_uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
|
||||
@@ -44,11 +44,8 @@ class ENGINE_DLL CMesh final : public CVIBuffer
|
||||
HRESULT Ready_VertexBuffer_For_NonAnim(SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix);
|
||||
HRESULT Ready_VertexBuffer_For_Anim(const class CModel* pModel, SaveMesh* _SaveMesh);
|
||||
|
||||
|
||||
|
||||
//
|
||||
private:
|
||||
_char m_szName[MAX_PATH] = {};
|
||||
_string m_strName = { };
|
||||
_uint m_iMaterialIndex = {};
|
||||
_uint m_iNumBones = { };
|
||||
_uint m_iStartIndex = {};
|
||||
|
||||
@@ -102,22 +102,16 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
|
||||
private:
|
||||
#ifdef EDITOR_PROJECT
|
||||
const aiScene* m_pAIScene = { nullptr };
|
||||
Assimp::Importer m_Importer;
|
||||
#endif
|
||||
|
||||
private:
|
||||
MODEL m_eType = {}; // 모델의 타입
|
||||
|
||||
_float4x4 m_PreTransformMatrix = {}; // 사전에 루트본에 곱해줄 매트릭스
|
||||
|
||||
_uint m_iNumMeshes = {}; // 메쉬의 갯수
|
||||
vector<class CMesh*> m_Meshes; // 메쉬의 벡터
|
||||
_uint m_iNumPhysXMeshes = {}; // 피직스 메쉬의 갯수
|
||||
vector<PSX::PxTriangleMesh*> m_TriMeshes = {}; // 피직스 메쉬의 갯수
|
||||
|
||||
_uint m_iNumPhysXMeshes = {}; // 피직스 메쉬의 갯수
|
||||
_uint m_iNumMeshes = {}; // 메쉬의 갯수
|
||||
_uint m_iNumMaterials = {}; // 머테리얼의 갯수
|
||||
_float m_fAmount = { 1.f };
|
||||
vector<class CMaterial*> m_Materials; // 머테리얼의 벡터
|
||||
|
||||
vector<class CBone*> m_Bones; // 본의 벡터, 정렬순서는 루트본부터 트리의 마지막 노드까지
|
||||
@@ -128,33 +122,27 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_bool m_bIsFinishedAnim = { false }; // 대상 애니메이션이 끝났는지
|
||||
_bool m_bIsFinishedLerp = { false }; // 럴프 애니메이션이 끝났는지
|
||||
_bool m_bPlayAnim = { true };
|
||||
_float m_fAmount = { 1.f };
|
||||
|
||||
_int m_iPreAnimIndex = { -1 };
|
||||
_float m_fBlendTime = { 0.f };
|
||||
_float m_fBlendDuration = { 0.3f };
|
||||
|
||||
_float m_fRadius = { 0.f }; // 컬링용 Radius
|
||||
_float3 m_vRadiusOffset = {}; // 컬링용 Radius Offset
|
||||
_float m_fSecondBlendTime = {};
|
||||
_float m_fSecondBlendDuration = { 0.3f };
|
||||
_float m_fSecondRatio = {};
|
||||
|
||||
vector<class CAnimation*> m_Animations; // 애니메이션의 벡터,
|
||||
|
||||
class CLerpAnim* m_pLerpAnim = { nullptr }; // 럴프전용 애니메이션
|
||||
|
||||
_int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
|
||||
_matrix m_PrevAnimationMatrix = XMMatrixIdentity(); // 루트본의 이전 위치
|
||||
_matrix m_DeltaAnimationMatrix = {}; // 루트본의 델타애니메이션
|
||||
class CTransform* m_pTransform = { nullptr }; // 모델 대상의 트랜스폼
|
||||
|
||||
_float m_fRatio = {};
|
||||
_int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1,-1,-1 };
|
||||
_int m_iCurrSecondAnimIndex = { -1 };
|
||||
_bool m_bIsSecondFinishedAnim = { false };
|
||||
_bool m_bIsSecondLoop = { false };
|
||||
_int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1,-1,-1 };
|
||||
vector<vector<_uint>> m_BoneMask;
|
||||
_float m_fSecondBlendTime = {};
|
||||
_float m_fSecondBlendDuration = {0.3f};
|
||||
_float m_fSecondRatio = {};
|
||||
|
||||
|
||||
|
||||
// 바이너리
|
||||
@@ -163,19 +151,29 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
//
|
||||
|
||||
vector<_float4x4> m_BoneMatrix;
|
||||
_bool m_bRatio = { false };
|
||||
|
||||
_float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
|
||||
_float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
|
||||
_matrix m_BoneTransformationMatrix = {};
|
||||
_bool m_bInitialRootPos = { false };
|
||||
_bool m_bInitialRootRotSaved = { false };
|
||||
_float4 m_vInitialRootRot = {};
|
||||
|
||||
_float m_fRadius = { 0.f }; // 컬링용 Radius
|
||||
_int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
|
||||
_vector m_vector[3];
|
||||
_bool m_bLoopRestarted = false;
|
||||
|
||||
vector<_uint> m_iBoneMask;
|
||||
_bool m_bInitialRootPos = { false };
|
||||
_bool m_bInitialRootRotSaved = { false };
|
||||
_bool m_bLoopRestarted = false;
|
||||
_bool m_bIsSecondFinishedAnim = { false };
|
||||
_bool m_bIsSecondLoop = { false };
|
||||
_bool m_bRatio = { false };
|
||||
|
||||
private:
|
||||
#ifdef EDITOR_PROJECT
|
||||
const aiScene* m_pAIScene = { nullptr };
|
||||
Assimp::Importer m_Importer;
|
||||
#endif
|
||||
|
||||
|
||||
#pragma region Compute
|
||||
@@ -226,7 +224,8 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
//
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
|
||||
|
||||
virtual void Free(); public:
|
||||
virtual void Free();
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -14,7 +14,6 @@ class CPhysX_Manager final : public CBase
|
||||
private:
|
||||
CPhysX_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual ~CPhysX_Manager() = default;
|
||||
|
||||
#pragma region RIGID_BODY
|
||||
|
||||
public:
|
||||
@@ -102,7 +101,10 @@ class CPhysX_Manager final : public CBase
|
||||
_uint m_iNumLevel = {};
|
||||
private:
|
||||
HRESULT Initialize();
|
||||
#ifdef _DEBUG
|
||||
HRESULT Connect_DebugServer();
|
||||
#endif // _DEBUG
|
||||
|
||||
void Update_Kinematic();
|
||||
void Update_Dynamic_ActiveActors();
|
||||
//void Update_Dynamic_AllActors();
|
||||
|
||||
@@ -26,11 +26,11 @@ class ENGINE_DLL CRigidBody_Static : public CRigidBody
|
||||
|
||||
public:
|
||||
PSX::PxRigidStatic* Get_Actor() override { return m_pRigidBody; }
|
||||
const _tchar* Get_PxMeshKey() const { return m_pMeshName; }
|
||||
const _tchar* Get_PxMeshKey() const { return m_wstrMeshName.c_str(); }
|
||||
|
||||
private:
|
||||
PSX::PxRigidStatic* m_pRigidBody = { nullptr }; // 실제 시뮬레이션을 도는 본체
|
||||
const _tchar* m_pMeshName = { nullptr }; // 짝꿍 스태틱 메시의 triangleMesh 키
|
||||
_wstring m_wstrMeshName = { }; // 짝꿍 스태틱 메시의 triangleMesh 키
|
||||
|
||||
private:
|
||||
HRESULT Initialize_Prototype(RIGIDBODY_STATIC_PROTOTYPEDESC& Desc);
|
||||
|
||||
Reference in New Issue
Block a user