Merge branch 'Develope' into UI

This commit is contained in:
Kim Nuri
2025-11-07 20:54:22 +09:00
committed by GitHub
114 changed files with 3623 additions and 221 deletions
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

@@ -334,8 +334,8 @@ technique11 MeshTechnique11
pass SkyBoxPass // 2
{
SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_None, 0);
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
@@ -151,11 +151,14 @@
<ItemGroup>
<ClInclude Include="..\Public\DebugCamera.h" />
<ClInclude Include="..\Public\DummyRect.h" />
<ClInclude Include="..\Public\Dummy_Cube.h" />
<ClInclude Include="..\Public\Dummy_Goblin.h" />
<ClInclude Include="..\Public\Editor_Define.h" />
<ClInclude Include="..\Public\Editor_Macro.h" />
<ClInclude Include="..\Public\Editor_Struct.h" />
<ClInclude Include="..\Public\Level_Loading.h" />
<ClInclude Include="..\Public\Level_Logo.h" />
<ClInclude Include="..\Public\Level_ObjectViewer.h" />
<ClInclude Include="..\Public\Loader.h" />
<ClInclude Include="..\Public\MainApp.h" />
<ClInclude Include="Editor.h" />
@@ -166,8 +169,11 @@
<ItemGroup>
<ClCompile Include="..\Private\DebugCamera.cpp" />
<ClCompile Include="..\Private\DummyRect.cpp" />
<ClCompile Include="..\Private\Dummy_Cube.cpp" />
<ClCompile Include="..\Private\Dummy_Goblin.cpp" />
<ClCompile Include="..\Private\Level_Loading.cpp" />
<ClCompile Include="..\Private\Level_Logo.cpp" />
<ClCompile Include="..\Private\Level_ObjectViewer.cpp" />
<ClCompile Include="..\Private\Loader.cpp" />
<ClCompile Include="..\Private\MainApp.cpp" />
<ClCompile Include="..\Private\pch.cpp">
@@ -61,6 +61,9 @@
<Filter Include="02.GameObjects\Dummys\DummyRect">
<UniqueIdentifier>{130c848e-6ab6-4b45-b12c-56db07e2c2f4}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Dummy_Goblin">
<UniqueIdentifier>{0ebb9c08-69b0-49b6-bac3-c827ca13319a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Editor.h">
@@ -102,6 +105,15 @@
<ClInclude Include="..\Public\DummyRect.h">
<Filter>02.GameObjects\Dummys\DummyRect</Filter>
</ClInclude>
<ClInclude Include="..\Public\Dummy_Goblin.h">
<Filter>02.GameObjects\Dummy_Goblin</Filter>
</ClInclude>
<ClInclude Include="..\Public\Level_ObjectViewer.h">
<Filter>01.Level\20.ObjectViewer</Filter>
</ClInclude>
<ClInclude Include="..\Public\Dummy_Cube.h">
<Filter>02.GameObjects\Dummys\DummyCube</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Editor.ico">
@@ -136,6 +148,15 @@
<ClCompile Include="..\Private\DummyRect.cpp">
<Filter>02.GameObjects\Dummys\DummyRect</Filter>
</ClCompile>
<ClCompile Include="..\Private\Dummy_Goblin.cpp">
<Filter>02.GameObjects\Dummy_Goblin</Filter>
</ClCompile>
<ClCompile Include="..\Private\Level_ObjectViewer.cpp">
<Filter>01.Level\20.ObjectViewer</Filter>
</ClCompile>
<ClCompile Include="..\Private\Dummy_Cube.cpp">
<Filter>02.GameObjects\Dummys\DummyCube</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Editor.rc">
@@ -0,0 +1,158 @@
#include "pch.h"
#include "Dummy_Cube.h"
#include "GameInstance.h"
CDummy_Cube::CDummy_Cube(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject{ pDevice, pContext }
{
}
CDummy_Cube::CDummy_Cube(const CDummy_Cube& rhs)
: CGameObject(rhs)
{
}
HRESULT CDummy_Cube::Initialize_Prototype()
{
return S_OK;
}
HRESULT CDummy_Cube::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
return S_OK;
}
void CDummy_Cube::Priority_Update(_float fTimeDelta)
{
}
void CDummy_Cube::Update(_float fTimeDelta)
{
}
void CDummy_Cube::Late_Update(_float fTimeDelta)
{
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, *vPos, m_pTransformCom->Get_Radius());
}
HRESULT CDummy_Cube::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CDummy_Cube::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
///* Com_Model */
//if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
// reinterpret_cast<CComponent**>(&m_pModelCom))))
// return E_FAIL;
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Desc_Box"),
reinterpret_cast<CComponent**>(&m_pModelCom))))
return E_FAIL;
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
return S_OK;
}
HRESULT CDummy_Cube::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
return S_OK;
}
CDummy_Cube* CDummy_Cube::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CDummy_Cube* pInstance = new CDummy_Cube(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CDummy_Cube");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CDummy_Cube::Clone(void* pArg, CGameObject* pOwner)
{
CDummy_Cube* pInstance = new CDummy_Cube(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CDummy_Cube");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CDummy_Cube::Free()
{
__super::Free();
SAFE_RELEASE(m_pModelCom);
SAFE_RELEASE(m_pShaderCom);
}
void CDummy_Cube::Describe_Entity()
{
}
@@ -0,0 +1,173 @@
#include "pch.h"
#include "Dummy_Goblin.h"
#include "GameInstance.h"
#include "DebugCamera.h"
CDummy_Goblin::CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject( pDevice, pContext )
{
}
CDummy_Goblin::CDummy_Goblin(const CDummy_Goblin& Prototype)
: CGameObject( Prototype )
{
}
HRESULT CDummy_Goblin::Initialize_Prototype()
{
return S_OK;
}
HRESULT CDummy_Goblin::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components()))
return E_FAIL;
return S_OK;
}
void CDummy_Goblin::Priority_Update(_float fTimeDelta)
{
}
void CDummy_Goblin::Update(_float fTimeDelta)
{
m_pModelCom->Play_Animation(fTimeDelta);
}
void CDummy_Goblin::Late_Update(_float fTimeDelta)
{
_float4 vPos;
XMStoreFloat4(&vPos, Get_WorldPostion());
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
}
HRESULT CDummy_Goblin::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
//m_pShaderCom->Bind_SRV("g_NormalTexture", nullptr);
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CDummy_Goblin::Ready_Components()
{
__super::Ready_Components(nullptr);
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom))))
return E_FAIL;
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
return S_OK;
}
HRESULT CDummy_Goblin::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))){
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))){
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))){
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
// return E_FAIL;
//}
return S_OK;
}
CDummy_Goblin* CDummy_Goblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CDummy_Goblin* pInstance = new CDummy_Goblin(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CDummy_Goblin");
Safe_Release(pInstance);
}
return pInstance;
}
CGameObject* CDummy_Goblin::Clone(void* pArg, CGameObject* pOwner)
{
CDummy_Goblin* pInstance = new CDummy_Goblin(*this);
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CDummy_Goblin");
Safe_Release(pInstance);
}
return pInstance;
}
void CDummy_Goblin::Free()
{
__super::Free();
Safe_Release(m_pShaderCom);
Safe_Release(m_pModelCom);
}
void CDummy_Goblin::Describe_Entity()
{
}
@@ -4,6 +4,7 @@
#include "GameInstance.h"
#include "Level_Logo.h"
#include "Level_ObjectViewer.h"
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -29,7 +30,7 @@ HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID)
void CLevel_Loading::Update(_float fTimeDelta)
{
if (true == m_pLoader->isFinished() &&
m_pGameInstance->Key_Down(DIK_RETURN))
m_pGameInstance->Key_Down(DIK_F1))
{
CLevel* pNewLevel = { nullptr };
@@ -41,9 +42,9 @@ void CLevel_Loading::Update(_float fTimeDelta)
//case LEVEL::MAP:
// pNewLevel = CLevel_MapViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
//case LEVEL::OBJECT:
// pNewLevel = CLevel_ObjectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
case LEVEL::OBJECT:
pNewLevel = CLevel_ObjectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
break;
//case LEVEL::COMBINED:
// pNewLevel = CLevel_LevelViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
@@ -26,10 +26,10 @@ void CLevel_Logo::Update(_float fTimeDelta)
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::MAP))))
// return;
//}
//else if (GUI::Button("Object Editor", { 100, 100 })) {
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
// return;
//}
/*else */if (GUI::Button("Object Editor", { 100, 100 })) {
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
return;
}
//else if (GUI::Button("Combined Editor", { 100, 100 })) {
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::COMBINED))))
// return;
@@ -0,0 +1,120 @@
#include "pch.h"
#include "Level_ObjectViewer.h"
#include "GameInstance.h"
#include "Level_Loading.h"
#include "Dummy_Goblin.h"
#include "Dummy_Cube.h"
#include "DebugCamera.h"
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
{
}
HRESULT CLevel_ObjectViewer::Initialize()
{
if (FAILED(Ready_Layer_Light())) {
return E_FAIL;
}
if (FAILED(Ready_Layer_Camera(TEXT("Layer_Camera"))))
{
return E_FAIL;
}
if (FAILED(Ready_Layer_Dummy(TEXT("Layer_Dummy"))))
{
return E_FAIL;
}
return S_OK;
}
void CLevel_ObjectViewer::Update(_float fTimeDelta)
{
}
HRESULT CLevel_ObjectViewer::Render()
{
SetWindowText(g_hWnd, TEXT("¿ÀºêÁ§Æ® ·¹º§ÀÔ´Ï´Ù"));
GUI::ShowDemoWindow();
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
CameraDesc.fFovy = XMConvertToRadians(60.0f);
CameraDesc.fNear = 0.1f;
CameraDesc.fFar = 500.f;
CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
CameraDesc.fSpeedPerSec = 5.f;
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
CameraDesc.fMouseSensor = 0.1f;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDebugCamera>(g_iStaticLevel, NEXT_LEVEL,
strLayerTag, &CameraDesc)))
return E_FAIL;
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_Light()
{
LIGHT_DESC LightDesc{};
LightDesc.eType = LIGHT::DIRECTIONAL;
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f);
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
{
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Goblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER)))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Cube>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
return E_FAIL;
return S_OK;
}
CLevel_ObjectViewer* CLevel_ObjectViewer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
{
CLevel_ObjectViewer* pInstance = new CLevel_ObjectViewer(pDevice, pContext, eLevelID);
if (FAILED(pInstance->Initialize()))
{
MSG_BOX("Failed to Created : CLevel_ObjectViewer");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CLevel_ObjectViewer::Free()
{
__super::Free();
}
+62 -23
View File
@@ -4,6 +4,8 @@
#include "GameInstance.h"
#include "DummyRect.h"
#include "MainApp.h"
#include "Dummy_Goblin.h"
#include "Dummy_Cube.h"
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
@@ -56,24 +58,24 @@ HRESULT CLoader::Loading()
case LEVEL::LOGO:
hr = Loading_For_Logo();
break;
//case LEVEL::MAP:
// hr = Loading_For_MapViewer();
// break;
//case LEVEL::OBJECT:
// hr = Loading_For_ObjectViewer();
// break;
//case LEVEL::COMBINED:
// hr = Loading_For_CombinedViewer();
// break;
//case LEVEL::EFFECT:
// hr = Loading_For_Effect();
// break;
//case LEVEL::SKIllSTUDIO:
// hr = Loading_For_SkillStudio();
// break;
//case LEVEL::PARTICLE:
// hr = Loading_For_Particle();
// break;
//case LEVEL::MAP:
// hr = Loading_For_MapViewer();
// break;
case LEVEL::OBJECT:
hr = Loading_For_ObjectViewer();
break;
//case LEVEL::COMBINED:
// hr = Loading_For_CombinedViewer();
// break;
//case LEVEL::EFFECT:
// hr = Loading_For_Effect();
// break;
//case LEVEL::SKIllSTUDIO:
// hr = Loading_For_SkillStudio();
// break;
//case LEVEL::PARTICLE:
// hr = Loading_For_Particle();
// break;
default:
assert(false);
break;
@@ -94,16 +96,16 @@ void CLoader::Output()
HRESULT CLoader::Loading_For_Logo()
{
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Dororong"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/DororongDoro.png"), TEXT("Dororong"), 0)))){
return E_FAIL;
}
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_POSTEX,
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl"),
@@ -141,7 +143,7 @@ HRESULT CLoader::Loading_For_Logo()
return E_FAIL;
}
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Prototype<CDummyRect>(g_iStaticLevel, CDummyRect::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -150,7 +152,44 @@ HRESULT CLoader::Loading_For_Logo()
if (FAILED(m_pGameInstance->Add_Prototype<CDebugCamera>(g_iStaticLevel, CDebugCamera::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
m_strMessage = TEXT("로딩이 완료되었습니다..");
m_strMessage = TEXT("로딩이 완료되었습니다..");
m_isFinished = true;
return S_OK;
}
HRESULT CLoader::Loading_For_ObjectViewer()
{
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinBody.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Desc_Box"),
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Box/Box.fbx", MODEL::NONANIM, XMMatrixIdentity(), 0))))
return E_FAIL;
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
/* For.Prototype_GameObject_Dummy_Goblin */
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Goblin>(g_iStaticLevel, CDummy_Goblin::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Dummy_Cube */
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Cube>(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext))))
return E_FAIL;
m_strMessage = TEXT("정보를 불러오는 중입니다.");
m_strMessage = TEXT("로딩이 완료되었습니다..");
m_isFinished = true;
@@ -0,0 +1,44 @@
#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
NS_BEGIN(Engine)
class CModel;
class CShader;
NS_END
NS_BEGIN(Editor)
class CDummy_Cube final : public CGameObject
{
private:
CDummy_Cube(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CDummy_Cube(const CDummy_Cube& rhs);
virtual ~CDummy_Cube() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
CModel* m_pModelCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
public:
static CDummy_Cube* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,47 @@
#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
NS_BEGIN(Engine)
class CShader;
class CModel;
NS_END
NS_BEGIN(Editor)
class CDummy_Goblin final : public CGameObject
{
private:
CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CDummy_Goblin(const CDummy_Goblin& Prototype);
virtual ~CDummy_Goblin() = default;
public:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
_bool m_bRimLight = { true };
_float m_fRimLightPower = { 3.2f };
_float m_fRimLightStrength = { 3.04f };
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
public:
static CDummy_Goblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
virtual void Free() override;
virtual void Describe_Entity() override;
};
NS_END
@@ -11,7 +11,7 @@ namespace Editor
const unsigned int g_iWinSizeX = 1920;
const unsigned int g_iWinSizeY = 1080;
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END };
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, OBJECT,END };
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
@@ -0,0 +1,31 @@
#pragma once
#include "Editor_Define.h"
#include "Level.h"
NS_BEGIN(Editor)
class CLevel_ObjectViewer final : public CLevel
{
private:
CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
virtual ~CLevel_ObjectViewer() = default;
public:
virtual void Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
/* 이 레벨에서 쓰기위한 객체들을 생성한다. */
virtual HRESULT Initialize() override;
HRESULT Ready_Layer_Camera(const _wstring& strLayerTag);
HRESULT Ready_Layer_Light();
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
HRESULT Ready_Layer_Dummy(const _wstring& strLayerTag);
public:
static CLevel_ObjectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
virtual void Free() override;
};
NS_END
+1
View File
@@ -41,6 +41,7 @@ class CLoader final : public CBase
private:
HRESULT Initialize(LEVEL eNextLevelID);
HRESULT Loading_For_Logo();
HRESULT Loading_For_ObjectViewer();
public:
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);