@@ -525,7 +525,6 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
|
||||
Color = tex1;
|
||||
|
||||
float2 reversuv = In.vTexcoord;
|
||||
|
||||
reversuv.x = 1.0f - Finaluv;
|
||||
@@ -537,7 +536,9 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
tex2.rgb = float3(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
tex2.rgb *= float3(112.f, 241.f, 31.f) / 255.f;
|
||||
float3 Green = float3(112.f, 241.f, 31.f) / 255.f;
|
||||
Green *= 1.2f;
|
||||
tex2.rgb *= Green;
|
||||
|
||||
if (all(Color.rgb >= float3(70.f / 255.f, 70.f / 255.f, 70.f / 255.f)))
|
||||
Color = tex2;
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;DirectXTKd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
|
||||
@@ -245,9 +245,6 @@
|
||||
<Filter Include="02.GameObjects\Environment\Plane">
|
||||
<UniqueIdentifier>{603938cc-e4fe-44d8-890b-784174a86161}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\Player">
|
||||
<UniqueIdentifier>{11250d84-e19c-4999-a5d6-d9f89123e7ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster">
|
||||
<UniqueIdentifier>{b72a9bb0-1b21-416b-bd0c-ba943cd7cc9d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -305,15 +302,6 @@
|
||||
<Filter Include="02.GameObjects\SkyBox">
|
||||
<UniqueIdentifier>{e83f88ec-c414-43b4-b437-52288cee431a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item">
|
||||
<UniqueIdentifier>{9cc88058-bda3-4ed0-9ec9-1968963fdda4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Broom">
|
||||
<UniqueIdentifier>{aac01a47-304a-4319-8bd8-fdd9020ddf18}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Wand">
|
||||
<UniqueIdentifier>{b719d948-fce3-4144-9d2c-edcab4cfceaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\PhysX">
|
||||
<UniqueIdentifier>{ddf8c8e6-ca51-42e0-b08f-13ae0fd9d842}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -389,6 +377,15 @@
|
||||
<Filter Include="02.GameObjects\Cameras\Camera_Gaze">
|
||||
<UniqueIdentifier>{470c4db5-b306-4fb8-8338-0a99ac77ac89}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item">
|
||||
<UniqueIdentifier>{9cc88058-bda3-4ed0-9ec9-1968963fdda4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Broom">
|
||||
<UniqueIdentifier>{aac01a47-304a-4319-8bd8-fdd9020ddf18}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Wand">
|
||||
<UniqueIdentifier>{b719d948-fce3-4144-9d2c-edcab4cfceaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
|
||||
@@ -66,6 +66,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
if (true == m_bMovable) {
|
||||
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY);
|
||||
}
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
@@ -216,10 +217,11 @@ void CCamPosition_Shoulder::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Cam_Shoulder");
|
||||
m_pTransformCom->Describe_Entity();
|
||||
GUI::Text("fMouseSensor : %.1f", &m_fMouseSensor);
|
||||
|
||||
GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
|
||||
GUI::SliderFloat("ShoulderDistance", &m_fShoulderDistance, 0.f, 10.f, "%.1f");
|
||||
GUI::SliderFloat("BackFrontRatio", &m_fBackFrontRatio, 0.01f, 0.99f, "%.2f");
|
||||
GUI::Text("Pitch Yaw : %f %f", &m_vAccDegreeXY.x, &m_vAccDegreeXY.y);
|
||||
GUI::Text("Pitch Yaw : %f %f", m_vAccDegreeXY.x, m_vAccDegreeXY.y);
|
||||
GUI::SliderFloat3("ShoulderPosRatio", (_float*)&m_vShoulderPosRatio, -2.f, 2.f, "%.1f");
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamera_Gaze::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Text("%d", m_iPriority);
|
||||
GUI::Text("CAM_GAZE_PRIORITY : %d", m_iPriority);
|
||||
if (false == m_bActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ void CDummy_PhysXPlayable::Update(_float fTimeDelta)
|
||||
m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor());
|
||||
}
|
||||
}
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Wand_Model"),
|
||||
|
||||
@@ -70,6 +70,16 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_BasicEffect = make_unique<BasicEffect>(m_pDevice);
|
||||
m_BasicEffect->SetVertexColorEnabled(true);
|
||||
m_BasicEffect->SetView(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW));
|
||||
m_BasicEffect->SetProjection(m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ));
|
||||
|
||||
m_Batch = make_unique<PrimitiveBatch<VertexPositionColor>>(m_pContext);
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -82,17 +92,18 @@ void CPlayer::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CPlayer::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem();
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
Describe_Entity();
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
TestKeyInput(fTimeDelta);
|
||||
}
|
||||
@@ -108,8 +119,9 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CPlayer::Render()
|
||||
{
|
||||
if (!m_bVisible)
|
||||
if (!m_bVisible){
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -137,11 +149,52 @@ HRESULT CPlayer::Render()
|
||||
#ifdef _DEBUG
|
||||
m_pCharacter_Controller->Render();
|
||||
//m_pRigidBody->Render();
|
||||
Render_CameraCoordinateSystem();
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
{
|
||||
m_Batch->Begin();
|
||||
|
||||
const _float fArrowLength = 2.0f;
|
||||
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
|
||||
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
GUI::Button("##0", { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), {100.f, 100.f}); GUI::SameLine();
|
||||
GUI::Button("##2", {100.f, 100.f});
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button("##4", { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { 100.f, 100.f });
|
||||
GUI::Button("##6", {100.f, 100.f}); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button("##8", {100.f, 100.f});
|
||||
|
||||
m_Batch->DrawLine( // W
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
|
||||
);
|
||||
m_Batch->DrawLine( // D
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
|
||||
);
|
||||
m_Batch->DrawLine( // PlayerLook
|
||||
VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * xmvLook, DirectX::Colors::HotPink)
|
||||
);
|
||||
|
||||
m_Batch->End();
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
@@ -245,6 +298,13 @@ HRESULT CPlayer::Bind_ShaderResources()
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
void CPlayer::Update_CameraCoordinateSystem()
|
||||
{
|
||||
_vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
|
||||
_vector xmvUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
XMStoreFloat3(&m_vCameraRightDir, XMVector3Normalize(XMVector3Cross(xmvUp, xmvCameraLook)));
|
||||
XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
|
||||
}
|
||||
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CPlayer* pInstance = new CPlayer(pDevice, pContext);
|
||||
|
||||
@@ -17,6 +17,7 @@ class CPlayer final : public CUnit
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
void Render_CameraCoordinateSystem();
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
|
||||
private:
|
||||
@@ -27,6 +28,9 @@ class CPlayer final : public CUnit
|
||||
_bool m_bSprintToggle = { false };
|
||||
_bool m_bWalkToggle = { false };
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
|
||||
|
||||
class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
|
||||
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
|
||||
@@ -42,6 +46,13 @@ class CPlayer final : public CUnit
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
void Update_CameraCoordinateSystem();
|
||||
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<BasicEffect> m_BasicEffect;
|
||||
unique_ptr<PrimitiveBatch<VertexPositionColor>> m_Batch;
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
public:
|
||||
static CPlayer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -556,4 +556,14 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SPOT();
|
||||
}
|
||||
|
||||
pass RefitPass // 6
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SPOT();
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -112,7 +112,7 @@ void CAlphaMap::Load_ToFile(const _char* pFilePath)
|
||||
if (FAILED(m_pContext->Map(m_pTexture2D, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource)))
|
||||
return;
|
||||
|
||||
MSG_BOX("Success to Load Binanry File");
|
||||
//MSG_BOX("Success to Load Binanry File");
|
||||
|
||||
memcpy(SubResource.pData, m_pPixels, sizeof(_float4) * m_iNumPixels);
|
||||
|
||||
|
||||
@@ -36,12 +36,15 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
||||
|
||||
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (m_bSelected)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
@@ -147,10 +150,8 @@ void CBuildingContainer::Describe_Entity()
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
if (nullptr != pTerrain)
|
||||
if (m_pGameInstance->isPicking(&m_vPosition))
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>()->Get_XMWorldMatrix(), &m_vPosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
if (true == m_bMovable) {
|
||||
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY);
|
||||
}
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
|
||||
@@ -41,7 +41,7 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamera_Gaze::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Text("%d", m_iPriority);
|
||||
GUI::Text("CAM_GAZE_PRIORITY : %d", m_iPriority);
|
||||
if (false == m_bActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ void CDummy_PhysXMonster::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_vStunTimer.x = 0.f;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ void CHair::Describe_Entity()
|
||||
if (!m_pModelCom )
|
||||
return;
|
||||
|
||||
/*for (_uint i = 0; i < dynamic_cast<CTexture*>(m_pTextureCom)->Get_Size(); i++)
|
||||
/*for (_uint i = 0; i < dynamic_cast<CTexture*>(m_pTextureCom)->Get_TextureDesc(); i++)
|
||||
{
|
||||
_char label[128];
|
||||
|
||||
@@ -187,7 +187,7 @@ void CHair::Describe_Entity()
|
||||
iTextureIndex = i;
|
||||
}
|
||||
|
||||
if (i % dynamic_cast<CTexture*>(m_pTextureCom)->Get_Size() != dynamic_cast<CTexture*>(m_pTextureCom)->Get_Size()-1)
|
||||
if (i % dynamic_cast<CTexture*>(m_pTextureCom)->Get_TextureDesc() != dynamic_cast<CTexture*>(m_pTextureCom)->Get_TextureDesc()-1)
|
||||
GUI::SameLine();
|
||||
}*/
|
||||
|
||||
|
||||
@@ -57,9 +57,18 @@ HRESULT CMapObject_LOD::Initialize(void* pArg)
|
||||
m_vRotation = pDesc->vRotation;
|
||||
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
_float3 vOffset = m_pModelComs[0]->Get_RadiusOffset();
|
||||
_matrix ColliderMatrix = XMMatrixTranslation(vOffset.x, vOffset.y, vOffset.z) * XMLoadFloat4x4(&m_CombinedWorldMatrix);
|
||||
XMStoreFloat4(&m_vExtentPosition, ColliderMatrix.r[3]);
|
||||
|
||||
|
||||
|
||||
|
||||
//m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
|
||||
@@ -78,18 +87,12 @@ void CMapObject_LOD::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CMapObject_LOD::Update(_float fTimeDelta)
|
||||
{
|
||||
//if (0 == m_iLodIndex)
|
||||
// m_bSelected = true;
|
||||
/*if (0 == m_iLodIndex)
|
||||
m_bSelected = true;*/
|
||||
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
//m_pTransformCom->Set_Scale(m_vScale);
|
||||
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
_float3 vOffset = m_pModelComs[0]->Get_RadiusOffset();
|
||||
_matrix ColliderMatrix = XMMatrixTranslation(vOffset.x, vOffset.y, vOffset.z) * XMLoadFloat4x4(&m_CombinedWorldMatrix);
|
||||
XMStoreFloat4(&m_vExtentPosition, ColliderMatrix.r[3]);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
|
||||
void CMapObject_LOD::Late_Update(_float fTimeDelta)
|
||||
@@ -102,6 +105,12 @@ void CMapObject_LOD::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
#endif
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
_float3 vOffset = m_pModelComs[0]->Get_RadiusOffset();
|
||||
_matrix ColliderMatrix = XMMatrixTranslation(vOffset.x, vOffset.y, vOffset.z) * XMLoadFloat4x4(&m_CombinedWorldMatrix);
|
||||
XMStoreFloat4(&m_vExtentPosition, ColliderMatrix.r[3]);
|
||||
|
||||
_float fRaius = m_pModelComs[0]->Get_Radius();
|
||||
if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(&m_vExtentPosition), fRaius)) {
|
||||
|
||||
|
||||
@@ -1348,7 +1348,7 @@ void CMapObject_Manager::Update_ContainerObject()
|
||||
|
||||
for (auto& pObject : (*pList))
|
||||
{
|
||||
if (GUI::Button((dynamic_cast<CMapContainer*>(pObject)->Get_Name().c_str())))
|
||||
if (GUI::Button((dynamic_cast<CMapContainer*>(pObject)->Get_Name() + to_string(iIndex)).c_str()))
|
||||
{
|
||||
m_iContainerObjectIndex = iIndex;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
|
||||
m_pAlphaMap->Load_ToFile("Hogsmeade_AlphaMap.bin");
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -63,7 +66,7 @@ void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
//}
|
||||
|
||||
|
||||
GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f);
|
||||
//GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f);
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
if (m_pGameInstance->isPicking(&m_vPickingPosition))
|
||||
@@ -82,23 +85,24 @@ void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region HEIGHT MAP
|
||||
//HRESULT hr = {};
|
||||
//if(GUI::Button("Save HeightMap"))
|
||||
// hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
//if(GUI::Button("Load HeightMap"))
|
||||
// hr = m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
#pragma endregion
|
||||
|
||||
|
||||
/*GUI::InputFloat("Height Ratio", &m_fHeightRatio);
|
||||
max(0.01f, m_fHeightRatio);
|
||||
*/
|
||||
//m_pVIBufferCom->Change_HeigthRatio(m_fHeightRatio);
|
||||
//GUI::DragFloat3("Picking", (_float*)(&m_vPickingPosition));
|
||||
_float4 vPos = {};
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
GUI::DragFloat3("Pos", (_float*)(&vPos));
|
||||
GUI::DragFloat3("Rota", (_float*)(&m_vRotation));
|
||||
//_float4 vPos = {};
|
||||
//_float3 vRotation = {};
|
||||
//XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
//GUI::DragFloat3("Pos", (_float*)(&vPos));
|
||||
//GUI::DragFloat3("Rota", (_float*)(&m_vRotation));
|
||||
|
||||
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
|
||||
|
||||
GUI::DragFloat("Culling Radius", &m_fCullingRadius, 0.01f, 0.01f, 2.f);
|
||||
//GUI::DragFloat("Culling Radius", &m_fCullingRadius, 0.01f, 0.01f, 2.f);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
@@ -107,7 +111,10 @@ void CTerrain::Update(_float fTimeDelta)
|
||||
{
|
||||
//m_pVIBufferCom->Culling(XMMatrixIdentity());
|
||||
|
||||
|
||||
if(m_pGameInstance->Key_Down(DIK_LSHIFT) && m_pGameInstance->Key_Down(DIK_W))
|
||||
{
|
||||
m_bWasWireFrame = !m_bWasWireFrame;
|
||||
}
|
||||
}
|
||||
|
||||
void CTerrain::Late_Update(_float fTimeDelta)
|
||||
@@ -122,9 +129,18 @@ HRESULT CTerrain::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
|
||||
if(m_bWasWireFrame)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::TERRAIN)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
|
||||
@@ -49,6 +49,7 @@ class CTerrain final : public CGameObject
|
||||
_float m_fMaskValue = {0.1f};
|
||||
|
||||
_float m_fUpValue = { 0.01f };
|
||||
_bool m_bWasWireFrame = { false };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
@@ -556,4 +556,14 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SPOT();
|
||||
}
|
||||
|
||||
pass RefitPass // 6
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SPOT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;$(USERNAME);_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;EDITOR_PROJECT;$(USERNAME);_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -148,7 +148,7 @@ call Update_Lib.bat
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;$(USERNAME);NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;$(USERNAME);NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -304,6 +304,7 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\Private\Timer_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\tinyxml2.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Transform.cpp" />
|
||||
<ClCompile Include="..\private\UIComponent.cpp" />
|
||||
@@ -568,31 +569,43 @@ call Update_Lib.bat
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_States.hlsli">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Constants.hlsli">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Defines.hlsli">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Functions.hlsli">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Structures.hlsli">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<None Include="..\Public\Assimp\color4.inl" />
|
||||
<None Include="..\Public\Assimp\config.h.in" />
|
||||
@@ -611,7 +624,10 @@ call Update_Lib.bat
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Mesh_Compute.hlsl" />
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Mesh_Compute.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_WeightBlend.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
@@ -625,10 +641,14 @@ call Update_Lib.bat
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Cell.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Deferred.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Particle_Compute.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
|
||||
@@ -400,10 +400,13 @@ void CAnimation::Free()
|
||||
}
|
||||
|
||||
}
|
||||
;
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CAnimation::Describe_Entity()
|
||||
{
|
||||
//if (GUI::CollapsingHeader(m_strName.c_str())) {
|
||||
//
|
||||
//}
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -66,6 +66,11 @@ HRESULT CCamera_Manager::IsBinded_Camera(const _wstring& wstrCameraKey)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_vector CCamera_Manager::Get_CameraLook()
|
||||
{
|
||||
return m_pCurrentMainCamera->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
}
|
||||
|
||||
void CCamera_Manager::Force_CamPosition(_fvector vPos)
|
||||
{
|
||||
if (nullptr == m_pCurrentMainCamera)
|
||||
|
||||
@@ -173,7 +173,7 @@ void CChannel::Update_TransformationMatirx(const vector<CBone*>& Bones, const LO
|
||||
_float3 vCurRootPos;
|
||||
XMStoreFloat3(&vCurRootPos, vTranslation);
|
||||
|
||||
XMMATRIX pre = XMLoadFloat4x4(&m_PreTransformMatrix);
|
||||
_matrix pre = XMLoadFloat4x4(&m_PreTransformMatrix);
|
||||
/*
|
||||
if (!m_bInitialRootPos)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ void CChannel::Update_TransformationMatirx(const vector<CBone*>& Bones, const LO
|
||||
_float dy = XMVectorGetY(vDeltaAdjusted);
|
||||
_float dz = XMVectorGetZ(vDeltaAdjusted);
|
||||
|
||||
_vector vDeltaWorld = vRight * dx + (-vUp * dz) + vLook * dy;
|
||||
_vector vDeltaWorld = vRight * dx + (vUp * dz) + (-vLook * dy);
|
||||
|
||||
vDeltaWorld *= 0.01f;
|
||||
|
||||
@@ -240,7 +240,7 @@ void CChannel::Update_TransformationMatirx(const vector<CBone*>& Bones, const LO
|
||||
|
||||
|
||||
if (angle > 0 )
|
||||
pTransform->TurnAngle(XMLoadFloat4(&axis), -angle);
|
||||
pTransform->TurnAngle(XMLoadFloat4(&axis), angle);
|
||||
}
|
||||
|
||||
XMStoreFloat4(&m_vPrevRootRot, qCur);
|
||||
|
||||
@@ -23,7 +23,7 @@ HRESULT CCharacter_Controller::Render()
|
||||
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x2fc48000, 1.f);
|
||||
_vector vColor = DirectX::Colors::GhostWhite;
|
||||
|
||||
switch (m_eBodyType)
|
||||
{
|
||||
@@ -160,14 +160,13 @@ void CCharacter_Controller::Move(_float fTimeDelta)
|
||||
PSX::PxControllerFilters pxFilter = {}; // 충돌 대상 필터
|
||||
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
||||
|
||||
if (true == m_bGravity) {
|
||||
m_pTransform->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
||||
}
|
||||
XMStoreFloat3((_float3*)&pxVecMomentum, m_pTransform->Get_CurrentMomentum());
|
||||
|
||||
m_eBeforeCollisionFlags = m_pController->move(pxVecMomentum, fMinimumDistant, fTimeDelta, pxFilter, pPxObstacles);
|
||||
|
||||
//PSX::PxUserControllerHitReport* pHitCallBack = { nullptr };
|
||||
//PSX::PxControllerShapeHit ShapeHit = {};
|
||||
//ShapeHit.
|
||||
//pHitCallBack->onShapeHit();
|
||||
}
|
||||
|
||||
void CCharacter_Controller::Set_Position(_fvector vNewPos)
|
||||
@@ -324,7 +323,7 @@ void CCharacter_Controller::Free()
|
||||
}
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CCharacter_Controller::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Character_Controller");
|
||||
@@ -381,3 +380,5 @@ void CCharacter_Controller::Describe_Entity()
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -165,7 +165,9 @@ void CCollider::Free()
|
||||
|
||||
SAFE_RELEASE(m_pBounding);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CCollider::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -101,6 +101,7 @@ void CFSM::Free()
|
||||
m_pStates = nullptr;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CFSM::Describe_Entity()
|
||||
{
|
||||
@@ -108,3 +109,4 @@ void CFSM::Describe_Entity()
|
||||
|
||||
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -199,6 +199,8 @@ void CGameInstance::BillBoard(CTransform* pTransform)
|
||||
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
|
||||
void CGameInstance::Save_ModelFilePath(const _char* FilePath)
|
||||
{
|
||||
@@ -228,6 +230,7 @@ size_t CGameInstance::ModelFilePathCount()
|
||||
return m_FilePaths.size();
|
||||
}
|
||||
|
||||
#endif // EDITOR_PROJECT
|
||||
void CGameInstance::Render_Begin(const _float4* pClearColor)
|
||||
{
|
||||
m_pGraphic_Device->Clear_BackBuffer_View(pClearColor);
|
||||
@@ -538,7 +541,11 @@ HRESULT CGameInstance::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Tex
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTarget(strTargetTag, pTexture2D);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Refit_RenderTarget(CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Refit_RenderTarget(pShader, wstrRenderTargetInput, wstrRenderTargetOutput);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
m_pRenderTarget_Manager->RenderTarget_Debuger();
|
||||
@@ -548,6 +555,7 @@ HRESULT CGameInstance::Render_RenderTarget_Debug(CShader* pShader, CVIBuffer_Rec
|
||||
{
|
||||
return m_pRenderTarget_Manager->Render_RenderTarget_Debug(pShader, pVIBuffer);
|
||||
}
|
||||
#endif // _DEBUG
|
||||
HRESULT CGameInstance::Clear_Cameras(_uint iLevel)
|
||||
{
|
||||
return m_pCamera_Manager->Clear_Cameras(iLevel);
|
||||
@@ -568,6 +576,10 @@ HRESULT CGameInstance::IsBinded_Camera(const _wstring& strCameraKey)
|
||||
{
|
||||
return m_pCamera_Manager->IsBinded_Camera(strCameraKey);
|
||||
}
|
||||
_vector CGameInstance::Get_CameraLook()
|
||||
{
|
||||
return m_pCamera_Manager->Get_CameraLook();
|
||||
}
|
||||
const _float* CGameInstance::Get_CurrentCameraFar()
|
||||
{
|
||||
return m_pCamera_Manager->Get_CurrentCameraFar();
|
||||
@@ -602,12 +614,20 @@ _bool CGameInstance::SaveAssimpModel(const _char* filename)
|
||||
auto iter = m_ModelMap.find(filename);
|
||||
return iter->second->SaveAssimpModel(filename);
|
||||
}
|
||||
#endif
|
||||
void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
{
|
||||
m_ModelMap[filePath] = pModel;
|
||||
}
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
{
|
||||
m_sModelMap[filePath] = sModel;
|
||||
}
|
||||
SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
{
|
||||
auto iter = m_sModelMap.find(filePath);
|
||||
return &iter->second;
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Create_Material(_float3* vMatInfo)
|
||||
@@ -660,6 +680,7 @@ void CGameInstance::Release_Actor(PSX::PxActor& Actor)
|
||||
{
|
||||
m_pPhysX_Manager->Detach_Actor(Actor);
|
||||
}
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT CGameInstance::ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix)
|
||||
{
|
||||
return m_pPhysX_Manager->ConvertToTriMeshes(Meshes, pxTriMeshes, WorldMatrix);
|
||||
@@ -668,6 +689,8 @@ HRESULT CGameInstance::SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleM
|
||||
{
|
||||
return m_pPhysX_Manager->SaveTriMeshes(pPath, TriMeshes);
|
||||
}
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
HRESULT CGameInstance::LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes)
|
||||
{
|
||||
return m_pPhysX_Manager->LoadTriMeshes(pPath, TriMeshes);
|
||||
|
||||
@@ -39,8 +39,8 @@ HRESULT CGameObject_Manager::Add_GameObject_ToLayer(_uint iLayerLevelIndex, cons
|
||||
|
||||
void CGameObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
Describe_Entity();
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
|
||||
@@ -526,6 +526,7 @@ void CInstance_Model::Free()
|
||||
SAFE_RELEASE(m_pConstantBuffer);
|
||||
SAFE_RELEASE(m_pParticleValueBuffer);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CInstance_Model::Describe_Entity()
|
||||
{
|
||||
@@ -732,3 +733,5 @@ void CInstance_Model::Describe_Entity()
|
||||
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -151,6 +151,7 @@ void CLight::Free()
|
||||
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CLight::Describe_Entity()
|
||||
{
|
||||
@@ -187,3 +188,5 @@ void CLight::Describe_Entity()
|
||||
|
||||
GUI::Separator();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -597,7 +597,10 @@ void CMesh::Free()
|
||||
|
||||
Safe_Delete_Array(m_pBoneMatrices);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CMesh::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1385,6 +1385,7 @@ void CModel::Free()
|
||||
m_AnimRanges.clear();
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CModel::Describe_Entity()
|
||||
{
|
||||
//GUI::Begin("Model_Desc");
|
||||
@@ -1433,3 +1434,6 @@ void CModel::Describe_Entity()
|
||||
//}
|
||||
//GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Navigation.h"
|
||||
|
||||
#include "Cell.h"
|
||||
@@ -68,48 +68,48 @@ HRESULT CNavigation::isMove(_fvector vCurrentPos, _vector vCurrentDir, _vector&
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// iCrossCount > 0 이므로
|
||||
// 슬라이딩 혹은 이웃찾기 혹은 블록
|
||||
// iCrossCount > 0 이므로
|
||||
// 슬라이딩 혹은 이웃찾기 혹은 블록
|
||||
_uint iCrossedNeighborCount = 0;
|
||||
_int iBlockedLine = -1;
|
||||
_int iCrossedNeighbor = -1;
|
||||
{
|
||||
_int iTempNeighbor = -1;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (fOuts[i] < 0.f) { // 선분에 가로막혔는데
|
||||
if (fOuts[i] < 0.f) { // 선분에 가로막혔는데
|
||||
iTempNeighbor = (*m_pCells)[m_iCurrentCellIndex]->Get_Neighbor((NAVI_LINE)i);
|
||||
if (-1 != iTempNeighbor) { // 이웃으로 향하는 길 이면
|
||||
if (-1 != iTempNeighbor) { // 이웃으로 향하는 길 이면
|
||||
iCrossedNeighborCount++;
|
||||
iCrossedNeighbor = iTempNeighbor;
|
||||
}
|
||||
else {
|
||||
iBlockedLine = i; // 진짜 막힌 길이면 저장
|
||||
iBlockedLine = i; // 진짜 막힌 길이면 저장
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 10 11
|
||||
// 20 21 22
|
||||
if (iCrossCount == iCrossedNeighborCount) // 가로막혔던 길이 모두 이웃이 있는 길이었으면
|
||||
if (iCrossCount == iCrossedNeighborCount) // 가로막혔던 길이 모두 이웃이 있는 길이었으면
|
||||
{
|
||||
m_iCurrentCellIndex = iCrossedNeighbor; // 아무 방향으로나
|
||||
m_iCurrentCellIndex = iCrossedNeighbor; // 아무 방향으로나
|
||||
vCorrectOut = XMVector3TransformNormal(vCurrentDirection, XMLoadFloat4x4(&s_WorldMatrix));
|
||||
return S_OK; // 이동
|
||||
return S_OK; // 이동
|
||||
}
|
||||
|
||||
// 10
|
||||
// 20 21
|
||||
if (iCrossCount > iCrossedNeighborCount) // 가로막혔던 길 중 이웃으로 향하는 길이 더 적다면
|
||||
if (iCrossCount > iCrossedNeighborCount) // 가로막혔던 길 중 이웃으로 향하는 길이 더 적다면
|
||||
{
|
||||
if (iCrossCount == 2 && iCrossedNeighborCount == 0) {// 가로막혔던 길이 둘 다 막힌 길이었으면 이동불가능
|
||||
if (iCrossCount == 2 && iCrossedNeighborCount == 0) {// 가로막혔던 길이 둘 다 막힌 길이었으면 이동불가능
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// 10
|
||||
// 21
|
||||
// 막힌 길로 슬라이딩 타면 됨
|
||||
// 막힌 길로 슬라이딩 타면 됨
|
||||
|
||||
// 슬라이딩 벡터
|
||||
// 슬라이딩 벡터
|
||||
_vector vNeighborNormal = -XMLoadFloat3(pCell->Get_Normarl((NAVI_LINE)iBlockedLine));
|
||||
vCurrentDirection = vCurrentDirection - XMVector3Dot(vCurrentDirection, vNeighborNormal) * vNeighborNormal;
|
||||
if (iCrossedNeighborCount == 0) {
|
||||
@@ -124,7 +124,7 @@ HRESULT CNavigation::isMove(_fvector vCurrentPos, _vector vCurrentDir, _vector&
|
||||
if (SUCCEEDED((*m_pCells)[iCrossedNeighbor]->isIn(vEstimatedDestination, fOuts, iCrossCount))) {
|
||||
m_iCurrentCellIndex = iCrossedNeighbor;
|
||||
}
|
||||
else { // K 자 네비도트가 있을 때 아래 삼각형에서 바로 윗삼각형으로 갔을 경우임
|
||||
else { // K 자 네비도트가 있을 때 아래 삼각형에서 바로 윗삼각형으로 갔을 경우임
|
||||
int iFoundCell = Find_Cell_ByPosition(vEstimatedDestination, m_iCurrentCellIndex, 5);
|
||||
|
||||
if (iFoundCell >= 0)
|
||||
@@ -135,7 +135,7 @@ HRESULT CNavigation::isMove(_fvector vCurrentPos, _vector vCurrentDir, _vector&
|
||||
}
|
||||
else
|
||||
{
|
||||
return E_FAIL; // 완전히 네비 밖
|
||||
return E_FAIL; // 완전히 네비 밖
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,8 +143,8 @@ HRESULT CNavigation::isMove(_fvector vCurrentPos, _vector vCurrentDir, _vector&
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
// 불가능,
|
||||
// 경우의 수가 없음
|
||||
// 불가능,
|
||||
// 경우의 수가 없음
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -162,32 +162,32 @@ HRESULT CNavigation::Get_NearCell(_fvector vCurrentPos, _int& iDestCell)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// iCrossCount > 0 이므로
|
||||
// 슬라이딩 혹은 이웃찾기 혹은 블록
|
||||
// iCrossCount > 0 이므로
|
||||
// 슬라이딩 혹은 이웃찾기 혹은 블록
|
||||
_uint iCrossedNeighborCount = 0;
|
||||
_int iBlockedLine = -1;
|
||||
_int iCrossedNeighbor = -1;
|
||||
{
|
||||
_int iTempNeighbor = -1;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (fOuts[i] < 0.f) { // 선분에 가로막혔는데
|
||||
if (fOuts[i] < 0.f) { // 선분에 가로막혔는데
|
||||
iTempNeighbor = (*m_pCells)[m_iCurrentCellIndex]->Get_Neighbor((NAVI_LINE)i);
|
||||
if (-1 != iTempNeighbor) { // 이웃으로 향하는 길 이면
|
||||
if (-1 != iTempNeighbor) { // 이웃으로 향하는 길 이면
|
||||
iCrossedNeighborCount++;
|
||||
iCrossedNeighbor = iTempNeighbor;
|
||||
}
|
||||
else {
|
||||
iBlockedLine = i; // 진짜 막힌 길이면 저장
|
||||
iBlockedLine = i; // 진짜 막힌 길이면 저장
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 10 11
|
||||
// 20 21 22
|
||||
if (iCrossCount == iCrossedNeighborCount) // 가로막혔던 길이 모두 이웃이 있는 길이었으면
|
||||
if (iCrossCount == iCrossedNeighborCount) // 가로막혔던 길이 모두 이웃이 있는 길이었으면
|
||||
{
|
||||
iDestCell = iCrossedNeighbor;
|
||||
return S_OK; // 이동
|
||||
return S_OK; // 이동
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -362,7 +362,9 @@ void CNavigation::Free()
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CNavigation::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -143,6 +143,7 @@ void CPhysX_Manager::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxT
|
||||
{
|
||||
m_TriangleMeshes.emplace(CMyTools::ToWstring(pName), pPxTriMesh);
|
||||
}
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
HRESULT CPhysX_Manager::ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix)
|
||||
{
|
||||
@@ -194,6 +195,7 @@ HRESULT CPhysX_Manager::SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangle
|
||||
assert(ok);
|
||||
return (ok ? S_OK : E_FAIL);
|
||||
}
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
HRESULT CPhysX_Manager::LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
CQuadTree::CQuadTree()
|
||||
{
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CQuadTree::Set_CullingRadius(_float fRadius)
|
||||
{
|
||||
@@ -18,6 +19,7 @@ void CQuadTree::Set_CullingRadius(_float fRadius)
|
||||
m_pChildren[i]->Set_CullingRadius(fRadius);
|
||||
}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
void CQuadTree::Culling(CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices)
|
||||
{
|
||||
@@ -275,9 +277,7 @@ _bool CQuadTree::Set_Y(CGameInstance* pGameInstance, const _float3* pVertexPosit
|
||||
{
|
||||
if (nullptr == m_pChildren[CORNER_LT])
|
||||
{
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y += fY;
|
||||
Add_Y(pVertices, fY);
|
||||
|
||||
XMStoreFloat3(&Out, XMVector3TransformCoord(XMLoadFloat3(&Out), WorldMatrix));
|
||||
return true;
|
||||
@@ -289,9 +289,7 @@ _bool CQuadTree::Set_Y(CGameInstance* pGameInstance, const _float3* pVertexPosit
|
||||
{
|
||||
if (nullptr == m_pChildren[CORNER_LT])
|
||||
{
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_LB]].vPosition.y += fY;
|
||||
Add_Y(pVertices, fY);
|
||||
|
||||
XMStoreFloat3(&Out, XMVector3TransformCoord(XMLoadFloat3(&Out), WorldMatrix));
|
||||
return true;
|
||||
@@ -311,6 +309,24 @@ _bool CQuadTree::Set_Y(CGameInstance* pGameInstance, const _float3* pVertexPosit
|
||||
return false;
|
||||
}
|
||||
|
||||
void CQuadTree::Add_Y(VTXNORTEX* pVertices, _float fY)
|
||||
{
|
||||
_float fValue = {};
|
||||
|
||||
fValue += pVertices[m_iCorners[CORNER_LT]].vPosition.y;
|
||||
fValue += pVertices[m_iCorners[CORNER_RB]].vPosition.y;
|
||||
fValue += pVertices[m_iCorners[CORNER_RT]].vPosition.y;
|
||||
fValue += pVertices[m_iCorners[CORNER_LB]].vPosition.y;
|
||||
|
||||
fValue /= 4.0f;
|
||||
fValue += fY;
|
||||
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y = fValue;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y = fValue;
|
||||
pVertices[m_iCorners[CORNER_RT]].vPosition.y = fValue;
|
||||
pVertices[m_iCorners[CORNER_LB]].vPosition.y = fValue;
|
||||
}
|
||||
|
||||
_bool CQuadTree::isDraw(CGameInstance* pGameInstance, const _float3* pVertexPositions)
|
||||
{
|
||||
_vector vCamPos = XMLoadFloat4(pGameInstance->Get_CamPosition());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "RenderTarget.h"
|
||||
|
||||
#include "Shader.h"
|
||||
@@ -73,12 +73,16 @@ void CRenderTarget::Copy_Resource(ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
m_pContext->CopyResource(pTexture2D, m_pTexture2D);
|
||||
}
|
||||
void CRenderTarget::Get_TextureDesc(D3D11_TEXTURE2D_DESC& Desc)
|
||||
{
|
||||
m_pTexture2D->GetDesc(&Desc);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CRenderTarget::Ready_Debug()
|
||||
{
|
||||
|
||||
XMStoreFloat4x4(&m_WorldMatrix, XMMatrixIdentity()); // 디버그 월드 메트릭스 초기화
|
||||
XMStoreFloat4x4(&m_WorldMatrix, XMMatrixIdentity()); // 디버그 월드 메트릭스 초기화
|
||||
|
||||
_uint iNumViewports = { 1 };
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "RenderTarget_Manager.h"
|
||||
#include "RenderTarget.h"
|
||||
#include "Shader.h"
|
||||
|
||||
CRenderTarget_Manager::CRenderTarget_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CBase(),
|
||||
@@ -153,6 +154,59 @@ HRESULT CRenderTarget_Manager::Copy_RenderTarget(const _wstring& strTargetTag, I
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Refit_RenderTarget(class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput)
|
||||
{
|
||||
CRenderTarget* pInput = Find_RenderTarget(wstrRenderTargetInput);
|
||||
CRenderTarget* pOutput = Find_RenderTarget(wstrRenderTargetOutput);
|
||||
if (nullptr == pInput || nullptr == pOutput) { return E_FAIL; }
|
||||
|
||||
_uint iNumViewPort = 1;
|
||||
D3D11_VIEWPORT vp = {};
|
||||
m_pContext->RSGetViewports(&iNumViewPort, &vp);
|
||||
|
||||
D3D11_TEXTURE2D_DESC OutputDesc = {};
|
||||
pOutput->Get_TextureDesc(OutputDesc);
|
||||
vp.Width = (_float)OutputDesc.Width;
|
||||
vp.Height = (_float)OutputDesc.Height;
|
||||
|
||||
pOutput->Clear();
|
||||
|
||||
|
||||
{ // Bind RTVs
|
||||
_uint iNumRenderTargets = { 1 };
|
||||
ID3D11RenderTargetView* pRenderTargetViews[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = { pOutput->Get_RTV(), };
|
||||
m_pContext->OMSetRenderTargets(0, nullptr, nullptr);
|
||||
m_pContext->OMSetRenderTargets(1, pRenderTargetViews, nullptr);
|
||||
}
|
||||
|
||||
m_pContext->RSSetViewports(iNumViewPort, &vp);
|
||||
|
||||
{ // Bind const
|
||||
_float4x4 matIdentity = {};
|
||||
XMStoreFloat4x4(&matIdentity, XMMatrixIdentity());
|
||||
if (FAILED(pShader->Bind_Matrix("g_WorldMatrix", &matIdentity))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_Matrix("g_ViewMatrix", &matIdentity))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_Matrix("g_ProjMatrix", &matIdentity))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pInput->Bind_ShaderResource(pShader, "g_DiffuseTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::REFIT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
ID3D11ShaderResourceView* const pNullSRV[1] = { nullptr };
|
||||
m_pContext->PSSetShaderResources(0, 1, pNullSRV);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CRenderTarget_Manager::End_MRT()
|
||||
{
|
||||
|
||||
@@ -40,7 +40,10 @@ void CRigidBody::Free()
|
||||
|
||||
SAFE_RELEASE(m_pTransform);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CRigidBody::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -180,7 +180,9 @@ void CRigidBody_Dynamic::Free()
|
||||
m_pRigidBody = nullptr;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CRigidBody_Dynamic::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -70,7 +70,10 @@ void CRigidBody_Static::Free()
|
||||
m_pRigidBody = nullptr;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CRigidBody_Static::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -251,6 +251,7 @@ void CShader::Free()
|
||||
|
||||
m_InputLayouts.clear();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CShader::Describe_Entity()
|
||||
{
|
||||
@@ -268,3 +269,5 @@ void CShader::Describe_Entity()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -106,7 +106,7 @@ HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV
|
||||
|
||||
HRESULT hr = {};
|
||||
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV); // 일단 dds로 시도하고
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV, 1024); // 일단 dds로 시도하고
|
||||
if (FAILED(hr)) {
|
||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||
strcat_s(szTextureFilePath, szTextureFileName);
|
||||
@@ -230,7 +230,10 @@ void CTexture::Free()
|
||||
SAFE_RELEASE(pSRV);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CTexture::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -244,6 +244,7 @@ void CTrail::Free()
|
||||
|
||||
Safe_Delete_Array(m_pVertices);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CTrail::Describe_Entity()
|
||||
{
|
||||
@@ -252,3 +253,5 @@ void CTrail::Describe_Entity()
|
||||
GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh);
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -358,6 +358,7 @@ void CTransform::Free()
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CTransform::Describe_Entity()
|
||||
{
|
||||
@@ -382,3 +383,5 @@ void CTransform::Describe_Entity()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "UIComponent.h"
|
||||
|
||||
CUIComponent ::CUIComponent(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -51,7 +51,9 @@ void CUIComponent::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CUIComponent::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "VIBuffer_Cell.h"
|
||||
|
||||
CVIBuffer_Cell::CVIBuffer_Cell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -127,7 +127,9 @@ void CVIBuffer_Cell::Free()
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_Cell::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "VIBuffer_Cube.h"
|
||||
|
||||
CVIBuffer_Cube::CVIBuffer_Cube(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -273,7 +273,10 @@ void CVIBuffer_Cube::Free()
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_Cube::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "VIBuffer_Rect.h"
|
||||
|
||||
CVIBuffer_Rect::CVIBuffer_Rect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -128,7 +128,10 @@ void CVIBuffer_Rect::Free()
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_Rect::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "QuadTree.h"
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
|
||||
CVIBuffer_Terrain::CVIBuffer_Terrain(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -26,6 +27,7 @@ HRESULT CVIBuffer_Terrain::Initialize_Prototype(const _char* pFilePath, _uint iS
|
||||
_int iWidth = {};
|
||||
_int iHeight = {};
|
||||
_int iComp = {};
|
||||
|
||||
unsigned char* pTexture = {};
|
||||
pTexture = stbi_load(pFilePath, &iWidth, &iHeight, &iComp, 0);
|
||||
|
||||
@@ -252,7 +254,7 @@ void CVIBuffer_Terrain::FitY(_fmatrix WorldMatrix, _float fY)
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||
m_pContext->Map(m_pVB, 0, D3D11_MAP_WRITE, 0, &SubResource);
|
||||
m_pContext->Map(m_pVB, 0, D3D11_MAP_READ_WRITE, 0, &SubResource);
|
||||
|
||||
VTXNORTEX* pVertices = static_cast<VTXNORTEX*>(SubResource.pData);
|
||||
|
||||
@@ -262,6 +264,12 @@ void CVIBuffer_Terrain::FitY(_fmatrix WorldMatrix, _float fY)
|
||||
|
||||
m_pQuadTree->Set_Y(m_pGameInstance, m_pVertexPositions, pVertices, WorldMatrix, fY);
|
||||
|
||||
for (_uint i = 0; i < m_iNumVertices; ++i)
|
||||
{
|
||||
memcpy(&m_pVertexPositions[i], &pVertices[i].vPosition, sizeof(_float3));
|
||||
}
|
||||
|
||||
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
}
|
||||
|
||||
@@ -280,11 +288,82 @@ void CVIBuffer_Terrain::Change_HeigthRatio(_float fRatio)
|
||||
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_Terrain::Set_CullingRadius(_float fRaduis)
|
||||
{
|
||||
m_pQuadTree->Set_CullingRadius(fRaduis);
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
HRESULT CVIBuffer_Terrain::Save_HeightMap(const _char* pFilePath)
|
||||
{
|
||||
string strFilePath = "../Bin/Resources/Data/Map/" + string(pFilePath);
|
||||
|
||||
ofstream out(strFilePath, ios::binary);
|
||||
|
||||
if (false == out.is_open())
|
||||
{
|
||||
MSG_BOX("Failed to Save Binanry File");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||
m_pContext->Map(m_pVB, 0, D3D11_MAP_READ, 0, &SubResource);
|
||||
|
||||
VTXNORTEX* pVertices = static_cast<VTXNORTEX*>(SubResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumVerticesZ; ++i)
|
||||
{
|
||||
for (_uint j = 0; j < m_iNumVerticesX; ++j)
|
||||
{
|
||||
_uint iIndex = i * m_iNumVerticesX + j;
|
||||
out.write(reinterpret_cast<const _char*>(&pVertices[iIndex].vPosition.y), sizeof(_float));
|
||||
}
|
||||
}
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
|
||||
out.close();
|
||||
|
||||
MSG_BOX("Success to Load Binanry File");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Terrain::Load_HeightMap(const _char* pFilePath)
|
||||
{
|
||||
string strFilePath = "../Bin/Resources/Data/Map/" + string(pFilePath);
|
||||
|
||||
ifstream in(strFilePath, ios::binary);
|
||||
|
||||
if (false == in.is_open())
|
||||
{
|
||||
MSG_BOX("Failed to Load Model Binanry File");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
m_pContext->Map(m_pVB, 0, D3D11_MAP_WRITE, 0, &SubResource);
|
||||
|
||||
VTXNORTEX* pVertices = static_cast<VTXNORTEX*>(SubResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumVerticesZ; ++i)
|
||||
{
|
||||
for (_uint j = 0; j < m_iNumVerticesX; ++j)
|
||||
{
|
||||
_uint iIndex = i * m_iNumVerticesX + j;
|
||||
in.read(reinterpret_cast<_char*>(&pVertices[iIndex].vPosition.y), sizeof(_float));
|
||||
}
|
||||
}
|
||||
|
||||
in.close();
|
||||
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CVIBuffer_Terrain* CVIBuffer_Terrain::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pFilePath, _uint iSizeX, _uint iSizeZ)
|
||||
{
|
||||
@@ -317,7 +396,9 @@ void CVIBuffer_Terrain::Free()
|
||||
|
||||
Safe_Release(m_pQuadTree);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_Terrain::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -307,7 +307,10 @@ void CVIBuffer_UI_Instance::Free()
|
||||
Safe_Delete_Array(m_fPosition);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CVIBuffer_UI_Instance::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -94,7 +94,10 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
//
|
||||
CAnimation* Clone();
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -16,6 +16,7 @@ class CCamera_Manager final : public CBase
|
||||
HRESULT Add_Camera(_uint iLevel, CCamera* pCamera, const _wstring& wstrCameraKey);
|
||||
HRESULT Bind_Camera(_uint iLevel, const _wstring& wstrCameraKey, _bool bIgnorePriority);
|
||||
HRESULT IsBinded_Camera(const _wstring& wstrCameraKey);
|
||||
_vector Get_CameraLook();
|
||||
|
||||
|
||||
void Force_CamPosition(_fvector vPos);
|
||||
|
||||
@@ -61,6 +61,8 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
_float3 Get_Volume();
|
||||
|
||||
HRESULT ConvertToDO(class CRigidBody_Dynamic& BodyOriginal);
|
||||
_bool IsGravity() { return m_bGravity; }
|
||||
void SetGravity(_bool bCondition) { m_bGravity = bCondition; };
|
||||
_bool IsActive() const { return m_bActive; }
|
||||
void SetActive(_bool bCondition) { m_bActive = bCondition; }
|
||||
|
||||
@@ -74,6 +76,7 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
|
||||
PSX::PxControllerCollisionFlags m_eBeforeCollisionFlags = {};
|
||||
_bool m_bActive = { true };
|
||||
_bool m_bGravity = { true };
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
@@ -93,7 +96,10 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
static CCharacter_Controller* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -43,8 +43,9 @@ class ENGINE_DLL CCollider final : public CComponent
|
||||
static CCollider* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -34,7 +34,7 @@ enum class NAVI_POINT { A, B, C, END };
|
||||
enum class NAVI_LINE { AB, BC, CA, END };
|
||||
enum class SHADER_PASS_CELL { DEBUG, END };
|
||||
|
||||
enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT, END };
|
||||
enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT, REFIT, END };
|
||||
|
||||
enum class QUESTYPE {MAIN, SUB, END};
|
||||
enum class TEXTURE_MOUNT_SLOT0 { NOT_DEFINED, METALLIC, SPECULAR, HEIGHT, END };
|
||||
|
||||
@@ -72,7 +72,9 @@ class ENGINE_DLL CFSM final : public CComponent
|
||||
static CFSM* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CFSM* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -157,6 +157,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT End_MRT();
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Refit_RenderTarget(class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput);
|
||||
#ifdef _DEBUG
|
||||
void RenderTarget_Debuger();
|
||||
HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
@@ -168,6 +169,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Add_Camera(_uint iLevel, class CCamera* pCamera, const _wstring& strCameraKey);
|
||||
HRESULT Bind_Camera(_uint iLevel, const _wstring& strCameraKey, _bool bIgnorePriority);
|
||||
HRESULT IsBinded_Camera(const _wstring& strCameraKey);
|
||||
_vector Get_CameraLook();
|
||||
const _float* Get_CurrentCameraFar();
|
||||
void Force_CamPosition(_fvector vPos);
|
||||
#pragma endregion
|
||||
@@ -198,9 +200,10 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void Attach_Actor(PSX::PxActor& Actor);
|
||||
void Detach_Actor(PSX::PxActor& pActor);
|
||||
void Release_Actor(PSX::PxActor& Actor);
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity());
|
||||
HRESULT SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
#endif // EDITOR_PROJECT
|
||||
HRESULT LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes); // 모델 불러왔던 경로에 그대로 있음
|
||||
#pragma endregion
|
||||
#pragma region THREADHOLDER
|
||||
@@ -215,26 +218,19 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
#pragma endregion
|
||||
|
||||
public:
|
||||
void Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
{
|
||||
m_ModelMap[filePath] = pModel;
|
||||
}
|
||||
void Add_ModelToMap(const _char* filePath, CModel* pModel);
|
||||
|
||||
void Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
{
|
||||
m_sModelMap[filePath] = sModel;
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
_bool SaveAssimpModel(const _char* filename);
|
||||
#endif
|
||||
void Add_SaveModel(const _char* filePath, SaveModel sModel);
|
||||
|
||||
SaveModel* Load_SaveModel(const _char* filePath);
|
||||
#ifdef EDITOR_PROJECT
|
||||
_bool SaveAssimpModel(const _char* filename);
|
||||
void Save_ModelFilePath(const _char* FilePath);
|
||||
const _char* Load_ModelFilePath(_uint iIndex);
|
||||
const _char* Load_BinaryModelFilePath(_uint iIndex);
|
||||
size_t BinaryModelFilePathCount();
|
||||
size_t ModelFilePathCount();
|
||||
#endif
|
||||
|
||||
private:
|
||||
class CGraphic_Device* m_pGraphic_Device = { nullptr };
|
||||
|
||||
@@ -227,7 +227,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -29,7 +29,9 @@ class ENGINE_DLL CLight final : public CComponent
|
||||
static CLight* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CComponent* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -73,7 +73,11 @@ class ENGINE_DLL CMesh final : public CVIBuffer
|
||||
//
|
||||
virtual CMesh* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -182,7 +182,10 @@ static _int Get_BoneIndex(const _char* pBoneName, vector<class CBone*> Bones); /
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
|
||||
|
||||
virtual void Free(); public:
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -191,16 +191,65 @@ class CMyTools {
|
||||
fSrcRadian += (fRotateSpeed * XM_PI) / 180.f;
|
||||
}
|
||||
}
|
||||
|
||||
inline static _float Get_Direction2D(_float2 fOrigianlDir, _float2 fInputDir) {
|
||||
_vector vOriginal = XMVector2Normalize(XMLoadFloat2(&fOrigianlDir));
|
||||
_vector vInput = XMVector2Normalize(XMLoadFloat2(&fInputDir));
|
||||
|
||||
// 2D 평면에 사상된 방향을 교정해서 리턴
|
||||
// float -> Radian값
|
||||
// -, +
|
||||
inline static _float Get_Direction2D(_float2 vOrigianlDir, _float2 vInputDir) {
|
||||
_vector vOriginal = XMVector2Normalize(XMLoadFloat2(&vOrigianlDir));
|
||||
_vector vInput = XMVector2Normalize(XMLoadFloat2(&vInputDir));
|
||||
|
||||
_float fDiffAngle = XMVectorGetX(XMVector2AngleBetweenNormals(vOriginal, vInput));
|
||||
_float fCross = XMVectorGetZ(XMVector2Cross(vOriginal, vInput));
|
||||
|
||||
return fDiffAngle * (fCross < 0 ? -1.f : 1.f);
|
||||
}
|
||||
// yaw 360도 자동 커트
|
||||
// pitch 80도 클램프
|
||||
inline static void AdjustAccumulateDegreePitchYawDegree(_float2& vAccumulateDegreePitchYaw, float fPitchLimitDegree = 80.f)
|
||||
{
|
||||
if (vAccumulateDegreePitchYaw.y > 360.f)
|
||||
{
|
||||
vAccumulateDegreePitchYaw.y -= 360.f;
|
||||
}
|
||||
else if (vAccumulateDegreePitchYaw.y < -360.f)
|
||||
{
|
||||
vAccumulateDegreePitchYaw.y += 360.f;
|
||||
}
|
||||
|
||||
if (vAccumulateDegreePitchYaw.x > fPitchLimitDegree)
|
||||
{
|
||||
vAccumulateDegreePitchYaw.x = fPitchLimitDegree;
|
||||
}
|
||||
else if (vAccumulateDegreePitchYaw.x < -fPitchLimitDegree)
|
||||
{
|
||||
vAccumulateDegreePitchYaw.x = -fPitchLimitDegree;
|
||||
}
|
||||
}
|
||||
|
||||
// yaw 360도 자동 커트
|
||||
// pitch 80도 클램프
|
||||
inline void AdjustAccumulateDegreePitchYawRadian(_float2& vAccumulateRadianPitchYaw, float fPitchLimitRadian = XMConvertToRadians(80.f))
|
||||
{
|
||||
if (vAccumulateRadianPitchYaw.y > XM_PI)
|
||||
{
|
||||
vAccumulateRadianPitchYaw.y -= XM_PI;
|
||||
}
|
||||
else if (vAccumulateRadianPitchYaw.y < -XM_PI)
|
||||
{
|
||||
vAccumulateRadianPitchYaw.y += XM_PI;
|
||||
}
|
||||
|
||||
if (vAccumulateRadianPitchYaw.x > fPitchLimitRadian)
|
||||
{
|
||||
vAccumulateRadianPitchYaw.x = fPitchLimitRadian;
|
||||
}
|
||||
else if (vAccumulateRadianPitchYaw.x < -fPitchLimitRadian)
|
||||
{
|
||||
vAccumulateRadianPitchYaw.x = -fPitchLimitRadian;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region FileSystem
|
||||
//static void Folder_Func(/* 재귀적으로 탐색할지 */ _In_ _bool bRecursive,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
@@ -6,7 +6,7 @@ NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CNavigation final : public CComponent
|
||||
{
|
||||
// 맵툴 형님께서 다 갈아 엎으셔도 됩니다 ^^7, CCell, CVIBuffer_Cell, 이친구들이랑 영향력이 묶여있어요
|
||||
// 맵툴 형님께서 다 갈아 엎으셔도 됩니다 ^^7, CCell, CVIBuffer_Cell, 이친구들이랑 영향력이 묶여있어요
|
||||
static _float4x4 s_WorldMatrix;
|
||||
public:
|
||||
typedef struct tagNavigaionDesc
|
||||
@@ -55,8 +55,9 @@ class ENGINE_DLL CNavigation final : public CComponent
|
||||
static CNavigation* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -28,9 +28,11 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh);
|
||||
PSX::PxMaterial* Create_Material(const _float3* vMatInfo);
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
HRESULT ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix);
|
||||
HRESULT SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
#endif // EDITOR_PROJECT
|
||||
HRESULT LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
//HRESULT LoadTriMeshes_Binary(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
PSX::PxTriangleMesh* Find_TriangleMesh(const _tchar* pMeshName);
|
||||
|
||||
@@ -19,10 +19,11 @@ class CQuadTree final : public CBase
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
void Culling(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices);
|
||||
void SetUp_Neighbors();
|
||||
_bool Picking(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _float3& Out, _fmatrix WorldMatrix);
|
||||
_bool Set_Y(class CGameInstance* pGameInstance, const _float3* pVertexPositions, VTXNORTEX* pVertices, _fmatrix WorldMatrix, _float fY);
|
||||
void Culling(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices);
|
||||
void SetUp_Neighbors();
|
||||
_bool Picking(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _float3& Out, _fmatrix WorldMatrix);
|
||||
_bool Set_Y(class CGameInstance* pGameInstance, const _float3* pVertexPositions, VTXNORTEX* pVertices, _fmatrix WorldMatrix, _float fY);
|
||||
void Add_Y(VTXNORTEX* pVertices, _float fY);
|
||||
|
||||
private:
|
||||
_uint m_iCorners[CORNER_END] = { };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -18,6 +18,8 @@ class CRenderTarget final : public CBase
|
||||
HRESULT Bind_ShaderResource(class CShader* pShader, const _char* pConstantName);
|
||||
void Clear();
|
||||
void Copy_Resource(ID3D11Texture2D* pTexture2D);
|
||||
void Get_TextureDesc(D3D11_TEXTURE2D_DESC& Desc);
|
||||
ID3D11ShaderResourceView* Get_SRV() const { return m_pSRV; }
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
@@ -47,4 +49,4 @@ class CRenderTarget final : public CBase
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -19,6 +19,8 @@ class CRenderTarget_Manager final : public CBase
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
|
||||
HRESULT Refit_RenderTarget(class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
|
||||
@@ -53,7 +53,9 @@ class ENGINE_DLL CRigidBody abstract : public CComponent
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -71,7 +71,9 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
static CRigidBody_Dynamic* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, RIGIDBODY_PROTOTYPE_DYNAMIC_DESC& Desc);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -40,7 +40,9 @@ class ENGINE_DLL CRigidBody_Static : public CRigidBody
|
||||
static CRigidBody_Static* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, RIGIDBODY_STATIC_PROTOTYPEDESC& Desc);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
@@ -53,8 +53,9 @@ class ENGINE_DLL CShader final : public CComponent
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
|
||||
// CComponent을(를) 통해 상속됨
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -38,7 +38,9 @@ class ENGINE_DLL CTexture final :
|
||||
static CTexture* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName = L"");
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -33,7 +33,9 @@ class ENGINE_DLL CTrail final :
|
||||
static CTrail* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CTrail* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
virtual HRESULT Render() override;
|
||||
private:
|
||||
TRAIL_DESC m_TrailDesc = {};
|
||||
|
||||
@@ -84,7 +84,9 @@ class ENGINE_DLL CTransform final :
|
||||
static CTransform* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -37,7 +37,9 @@ class ENGINE_DLL CUIComponent final : public CComponent
|
||||
static CUIComponent* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "VIBuffer.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -22,7 +22,9 @@ class ENGINE_DLL CVIBuffer_Cell final :
|
||||
static CVIBuffer_Cell* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _float3* pPoints);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "VIBuffer.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -24,7 +24,9 @@ class ENGINE_DLL CVIBuffer_Cube final :
|
||||
static CVIBuffer_Cube* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CVIBuffer_Cube* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "VIBuffer.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -19,7 +19,9 @@ class ENGINE_DLL CVIBuffer_Rect final :
|
||||
static CVIBuffer_Rect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CVIBuffer_Rect* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -28,7 +28,9 @@ class ENGINE_DLL CVIBuffer_Terrain final : public CVIBuffer
|
||||
void Change_HeigthRatio(_float fRatio);
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Set_CullingRadius(_float fRaduis);
|
||||
void Set_CullingRadius(_float fRaduis);
|
||||
HRESULT Save_HeightMap(const _char* pFilePath);
|
||||
HRESULT Load_HeightMap(const _char* pFilePath);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -45,7 +47,9 @@ class ENGINE_DLL CVIBuffer_Terrain final : public CVIBuffer
|
||||
static CVIBuffer_Terrain* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pFilePath, _uint iSizeX, _uint iSizeZ);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -48,7 +48,9 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
|
||||
static CVIBuffer_UI_Instance* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -53,3 +53,5 @@ xcopy /y .\Engine\ThirdPartyLib\Assimp\assimp-vc145-mt.lib .\EngineSDK\Lib
|
||||
|
||||
xcopy /y .\Engine\ThirdPartyLib\fMod\fmod_vc.lib .\EngineSDK\Lib\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\fMod\fmod_vc.lib .\EngineSDK\Lib\Release\
|
||||
|
||||
xcopy /y .\Engine\ThirdPartyLib\DirectXTK\DirectXTKd.lib .\EngineSDK\Lib\Debug\
|
||||
|
||||
Reference in New Issue
Block a user