Merge branch 'Develope' into Effect11_25_Follow

This commit is contained in:
GiJungSUk
2025-11-25 22:02:25 +09:00
95 changed files with 2354 additions and 132 deletions
+43 -4
View File
@@ -107,8 +107,9 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha
_bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
{
if (!m_bPlayAnim)
if (!m_bPlayAnim){
return false;
}
if (-1 == m_iCurrentAnimIndex // 정지 혹은 시작을 안시켜준 애님
|| m_iCurrentAnimIndex >= (_int)m_iNumAnimations) // 애님 인덱스 초과됨
{
@@ -120,7 +121,7 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
if (m_iPreAnimIndex != m_iCurrentAnimIndex && m_iPreAnimIndex != 0)
{
m_fBlendTime += fTimeDelta;
_float fRatio = m_fBlendTime / m_fBlendDuration;
_float fRatio = (m_fBlendTime / m_fBlendDuration);
fRatio = min(fRatio, 1.f);
m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount);
@@ -154,8 +155,9 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop,_float fAmount)
{
if (m_iCurrentAnimIndex == iIndex)
if (m_iCurrentAnimIndex == iIndex){
return;
}
if (iIndex >= 0 && iIndex < m_iNumAnimations)
{
m_iCurrentAnimIndex = iIndex;
@@ -164,8 +166,9 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop,_float fAmount)
m_Animations[m_iCurrentAnimIndex]->ResetRootMotion();
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
}
else
else {
m_iCurrentAnimIndex = -1;
}
}
const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName) const
@@ -914,6 +917,7 @@ HRESULT CModel::Create_ParentVB()
return S_OK;
}
#ifdef _DEBUG
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
{
m_eType = eType;
@@ -967,6 +971,41 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _
return S_OK;
}
#endif // _DEBUG
#ifndef _DEBUG
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
{
m_eType = eType;
LoadData(pModelFilePath);
m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath);
LoadAdditionalAnimations(pModelFilePath);
XMStoreFloat4x4(&m_PreTransformMatrix, PreTransformMatrix);
Ready_Bones(m_pSaveModel->Nodes, 0, -1);
if (FAILED(Ready_Meshes())) {
return E_FAIL;
}
if (FAILED(Ready_Materials(pModelFilePath))) {
return E_FAIL;
}
if (FAILED(Ready_Animations(m_Bones))) {
return E_FAIL;
}
return S_OK;
}
#endif
void CModel::LoadAdditionalAnimations(const char* ModelFilePath)
{
filesystem::path fullPath(ModelFilePath);