@@ -100,9 +100,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
// float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
|
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -118,17 +117,15 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vF0;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float fMetallic;
|
float fMetallic = 0.f;
|
||||||
float fRoughness;
|
float fRoughness = 0.f;
|
||||||
float fOcclusion;
|
float fOcclusion = 1.f;
|
||||||
float fAttenuation;
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
@@ -141,32 +138,20 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
|
fMetallic = 0.f;
|
||||||
|
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
float3 vSpec = vSRO.r;
|
vF0 = vSRO.rrr;
|
||||||
|
fRoughness = vSRO.g;
|
||||||
fMetallic = 0.f;
|
fOcclusion = vSRO.b;
|
||||||
fRoughness = vSRO.g;
|
|
||||||
fOcclusion = vSRO.b;
|
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fAttenuation = 1.f;
|
float fDiffuseAOStrength = lerp(0.3f, 5.f, fOcclusion);
|
||||||
|
|
||||||
float fDiffuseAOStrength = lerp(0.3f, 1.f, fOcclusion);
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
|
||||||
|
|
||||||
PBR_Out.vShade *= fDiffuseAOStrength;
|
PBR_Out.vShade *= fDiffuseAOStrength;
|
||||||
|
saturate(PBR_Out.vShade);
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
|
|
||||||
@@ -179,8 +164,8 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -196,27 +181,21 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float fMetallic = 0.f;
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
float fRoughness = 0.5f;
|
||||||
|
float fOcclusion = 1.f;
|
||||||
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
float3 vF0;
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
float fMetallic;
|
float3 vToLight = normalize(g_vLightPos.xyz - vWorldPosition.xyz); // 픽셀에서 라이트로
|
||||||
float fRoughness;
|
|
||||||
float fOcclusion;
|
|
||||||
float fAttenuation;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
float fDistance = length(vFromLight);
|
float fDistance = length(vToLight);
|
||||||
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||||
if (fAttenuation <= 0.f)
|
if (fAttenuation <= 0.f) { discard; }
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
@@ -228,27 +207,14 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
float3 vSpec = vSRO.r;
|
|
||||||
|
|
||||||
fMetallic = 0.f;
|
fMetallic = 0.f;
|
||||||
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
vF0 = vSRO.rrr;
|
||||||
fRoughness = vSRO.g;
|
fRoughness = vSRO.g;
|
||||||
fOcclusion = vSRO.b;
|
fOcclusion = vSRO.b;
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight,
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
vAlbedo, fMetallic, fRoughness,
|
|
||||||
g_vLightDiffuse.rgb, fAttenuation, vF0);
|
|
||||||
|
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
@@ -262,8 +228,8 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -279,33 +245,26 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float fMetallic = 0.f;
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
float fRoughness = 0.5f;
|
||||||
|
float fOcclusion = 1.f;
|
||||||
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
|
float3 vToLight = normalize(g_vLightPos.xyz - vWorldPosition.xyz); // 픽셀에서 라이트로
|
||||||
|
|
||||||
float3 vF0;
|
|
||||||
float fMetallic;
|
|
||||||
float fRoughness;
|
|
||||||
float fOcclusion;
|
|
||||||
float fAttenuation;
|
|
||||||
{
|
{
|
||||||
float fDistance = length(vFromLight);
|
float fDistance = length(vToLight);
|
||||||
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||||
if (fAttenuation <= 0.f)
|
if (fAttenuation <= 0.f) { discard; }
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
float fCosAngle = dot(vFromLight, g_vLightDir.xyz);
|
|
||||||
if (fCosAngle < g_fSpotOuterAngle)
|
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
}
|
||||||
|
float fCosAngle = dot(vToView, g_vLightDir.xyz);
|
||||||
|
if (fCosAngle < g_fSpotOuterAngle) { discard; }
|
||||||
|
|
||||||
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
||||||
fAttenuation *= fSpotAttenenuation;
|
fAttenuation *= fSpotAttenenuation;
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
@@ -317,25 +276,14 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
float3 vSpec = vSRO.r;
|
|
||||||
|
|
||||||
fMetallic = 0.f;
|
fMetallic = 0.f;
|
||||||
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
vF0 = vSRO.rrr;
|
||||||
fRoughness = vSRO.g;
|
fRoughness = vSRO.g;
|
||||||
fOcclusion = vSRO.b;
|
fOcclusion = vSRO.b;
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
|
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
@@ -407,6 +355,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||||
|
|
||||||
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
||||||
|
|
||||||
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
||||||
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
||||||
//bool IsShadow = { false };
|
//bool IsShadow = { false };
|
||||||
@@ -441,6 +390,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
|
||||||
for (int i = -15; i < 16; ++i)
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x;
|
vTexcoord.x = In.vTexcoord.x;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
|
|
||||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
|
|
||||||
if (0.f == vColorTexture.a)
|
if (0.f == vColorTexture.a)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -110,7 +110,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>EDITOR_PROJECT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>EDITOR_PROJECT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -157,29 +157,49 @@
|
|||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\Public\Camera_Debug.h" />
|
||||||
<ClInclude Include="..\Public\Client_Define.h" />
|
<ClInclude Include="..\Public\Client_Define.h" />
|
||||||
<ClInclude Include="..\Public\Client_Enum.h" />
|
<ClInclude Include="..\Public\Client_Enum.h" />
|
||||||
<ClInclude Include="..\Public\Client_Macro.h" />
|
<ClInclude Include="..\Public\Client_Macro.h" />
|
||||||
|
<ClInclude Include="..\Public\Client_Struct.h">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\InfoInstance.h" />
|
||||||
|
<ClInclude Include="..\Public\Level_Field.h" />
|
||||||
<ClInclude Include="..\Public\Level_GamePlay.h" />
|
<ClInclude Include="..\Public\Level_GamePlay.h" />
|
||||||
<ClInclude Include="..\Public\Level_Loading.h" />
|
<ClInclude Include="..\Public\Level_Loading.h" />
|
||||||
<ClInclude Include="..\Public\Level_Logo.h" />
|
<ClInclude Include="..\Public\Level_Logo.h" />
|
||||||
|
<ClInclude Include="..\Public\Level_Restart.h" />
|
||||||
|
<ClInclude Include="..\Public\Light_Main.h" />
|
||||||
<ClInclude Include="..\Public\Loader.h" />
|
<ClInclude Include="..\Public\Loader.h" />
|
||||||
<ClInclude Include="..\Public\MainApp.h" />
|
<ClInclude Include="..\Public\MainApp.h" />
|
||||||
|
<ClInclude Include="..\Public\MapInfo.h" />
|
||||||
|
<ClInclude Include="..\Public\MonsterInfo.h" />
|
||||||
|
<ClInclude Include="..\Public\PlayerInfo.h" />
|
||||||
<ClInclude Include="Client.h" />
|
<ClInclude Include="Client.h" />
|
||||||
<ClInclude Include="framework.h" />
|
<ClInclude Include="framework.h" />
|
||||||
<ClInclude Include="Resource.h" />
|
<ClInclude Include="Resource.h" />
|
||||||
<ClInclude Include="targetver.h" />
|
<ClInclude Include="targetver.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\Private\Camera_Debug.cpp" />
|
||||||
|
<ClCompile Include="..\Private\InfoInstance.cpp" />
|
||||||
|
<ClCompile Include="..\Private\Level_Field.cpp" />
|
||||||
<ClCompile Include="..\Private\Level_GamePlay.cpp" />
|
<ClCompile Include="..\Private\Level_GamePlay.cpp" />
|
||||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||||
<ClCompile Include="..\Private\Level_Logo.cpp" />
|
<ClCompile Include="..\Private\Level_Logo.cpp" />
|
||||||
|
<ClCompile Include="..\Private\Level_Restart.cpp" />
|
||||||
|
<ClCompile Include="..\Private\Light_Main.cpp" />
|
||||||
<ClCompile Include="..\Private\Loader.cpp" />
|
<ClCompile Include="..\Private\Loader.cpp" />
|
||||||
<ClCompile Include="..\Private\MainApp.cpp" />
|
<ClCompile Include="..\Private\MainApp.cpp" />
|
||||||
|
<ClCompile Include="..\Private\MapInfo.cpp" />
|
||||||
|
<ClCompile Include="..\Private\MonsterInfo.cpp" />
|
||||||
<ClCompile Include="..\Private\pch.cpp">
|
<ClCompile Include="..\Private\pch.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\PlayerInfo.cpp" />
|
||||||
<ClCompile Include="Client.cpp" />
|
<ClCompile Include="Client.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -37,6 +37,33 @@
|
|||||||
<ClInclude Include="..\Public\Level_GamePlay.h">
|
<ClInclude Include="..\Public\Level_GamePlay.h">
|
||||||
<Filter>01.Levels\02.GamePlay</Filter>
|
<Filter>01.Levels\02.GamePlay</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Client_Struct.h">
|
||||||
|
<Filter>99.Define</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\InfoInstance.h">
|
||||||
|
<Filter>03.InfoInstance</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Level_Field.h">
|
||||||
|
<Filter>01.Levels\10.Field</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Level_Restart.h">
|
||||||
|
<Filter>01.Levels\99.Restart</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Camera_Debug.h">
|
||||||
|
<Filter>02.GameObjects\Cameras\Debug</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Light_Main.h">
|
||||||
|
<Filter>02.GameObjects\Environment\Lights\Main</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\PlayerInfo.h">
|
||||||
|
<Filter>03.InfoInstance\00.PlayerInfo</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\MonsterInfo.h">
|
||||||
|
<Filter>03.InfoInstance\01.MonsterInfo</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\MapInfo.h">
|
||||||
|
<Filter>03.InfoInstance\02.MapInfo</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="Client.ico">
|
<Image Include="Client.ico">
|
||||||
@@ -74,9 +101,6 @@
|
|||||||
<Filter Include="02.GameObjects">
|
<Filter Include="02.GameObjects">
|
||||||
<UniqueIdentifier>{27434478-691e-42a8-83c7-ecd1a60f46ce}</UniqueIdentifier>
|
<UniqueIdentifier>{27434478-691e-42a8-83c7-ecd1a60f46ce}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="03.Information">
|
|
||||||
<UniqueIdentifier>{cdfbb346-6cae-4094-93cd-b82685efa68e}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="02.GameObjects\Cameras">
|
<Filter Include="02.GameObjects\Cameras">
|
||||||
<UniqueIdentifier>{7efd65d5-eb4d-4331-a746-f0fa2de6275b}</UniqueIdentifier>
|
<UniqueIdentifier>{7efd65d5-eb4d-4331-a746-f0fa2de6275b}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -98,6 +122,78 @@
|
|||||||
<Filter Include="02.GameObjects\NPC\Ally">
|
<Filter Include="02.GameObjects\NPC\Ally">
|
||||||
<UniqueIdentifier>{a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1}</UniqueIdentifier>
|
<UniqueIdentifier>{a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic">
|
||||||
|
<UniqueIdentifier>{b5bef783-5315-4488-ac64-cb98d16a84a9}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic\Item">
|
||||||
|
<UniqueIdentifier>{31681680-d5de-43c9-bc2d-2c91ca58a593}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic\State">
|
||||||
|
<UniqueIdentifier>{1bfec6dc-f008-4d18-87d6-be38824b1272}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic\State\NPC">
|
||||||
|
<UniqueIdentifier>{3eb21e8e-e01c-47fe-828e-800212456eb5}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic\State\PLAYER">
|
||||||
|
<UniqueIdentifier>{9f952e5a-835c-4de9-b7b5-9a731912774d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="04.Mechanic\Skill">
|
||||||
|
<UniqueIdentifier>{c5b61cb3-bc5f-4429-8715-b309dcf054b2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="01.Levels\10.Field">
|
||||||
|
<UniqueIdentifier>{2b209526-b728-4fba-a184-b9224d72903a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="01.Levels\99.Restart">
|
||||||
|
<UniqueIdentifier>{e12b3048-dd6d-41bf-b346-e4abdaa4f215}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Environment\Lights">
|
||||||
|
<UniqueIdentifier>{74f21f9b-30bf-412e-ba4e-526958ab2a52}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\Debug">
|
||||||
|
<UniqueIdentifier>{8d89a59c-fbd2-4a4a-ab01-a70abb80cc49}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\Shoulder">
|
||||||
|
<UniqueIdentifier>{708bbc88-47fb-42c5-b060-14cec7d646f2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Environment\Lights\Main">
|
||||||
|
<UniqueIdentifier>{b24c78ef-dccc-41f0-a086-053ae6b7fbf4}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<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>
|
||||||
|
<Filter Include="02.GameObjects\Environment\Prop">
|
||||||
|
<UniqueIdentifier>{2814c935-13d9-4b9a-94ba-c9e470219a18}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Environment\Prop\SkyBox">
|
||||||
|
<UniqueIdentifier>{19ee2ea4-2d79-46bd-b857-c759e3ec6cf4}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Environment\Prop\SkyBox\TriggerBox">
|
||||||
|
<UniqueIdentifier>{2561df42-3dfa-4045-a30c-85f44cd65e09}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\CameraPosition">
|
||||||
|
<UniqueIdentifier>{25ad4a41-5b06-4659-bd29-c0c4265a3277}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\CameraPosition\Player">
|
||||||
|
<UniqueIdentifier>{5a667a7b-6c90-44f6-9c9f-aac3108b6561}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="03.InfoInstance">
|
||||||
|
<UniqueIdentifier>{cdfbb346-6cae-4094-93cd-b82685efa68e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="03.InfoInstance\00.PlayerInfo">
|
||||||
|
<UniqueIdentifier>{1cfdfc05-0b0d-4c58-8c2d-58090efea4fd}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="03.InfoInstance\01.MonsterInfo">
|
||||||
|
<UniqueIdentifier>{621b87a7-54b8-4d90-84b2-fa8cd26cc396}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="03.InfoInstance\02.MapInfo">
|
||||||
|
<UniqueIdentifier>{413e6692-6e4a-4b00-8306-edf652bd876a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Client.cpp">
|
<ClCompile Include="Client.cpp">
|
||||||
@@ -121,6 +217,30 @@
|
|||||||
<ClCompile Include="..\Private\Level_GamePlay.cpp">
|
<ClCompile Include="..\Private\Level_GamePlay.cpp">
|
||||||
<Filter>01.Levels\02.GamePlay</Filter>
|
<Filter>01.Levels\02.GamePlay</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\InfoInstance.cpp">
|
||||||
|
<Filter>03.InfoInstance</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Level_Field.cpp">
|
||||||
|
<Filter>01.Levels\10.Field</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Level_Restart.cpp">
|
||||||
|
<Filter>01.Levels\99.Restart</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Camera_Debug.cpp">
|
||||||
|
<Filter>02.GameObjects\Cameras\Debug</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Light_Main.cpp">
|
||||||
|
<Filter>02.GameObjects\Environment\Lights\Main</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\PlayerInfo.cpp">
|
||||||
|
<Filter>03.InfoInstance\00.PlayerInfo</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\MonsterInfo.cpp">
|
||||||
|
<Filter>03.InfoInstance\01.MonsterInfo</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\MapInfo.cpp">
|
||||||
|
<Filter>03.InfoInstance\02.MapInfo</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="Client.rc">
|
<ResourceCompile Include="Client.rc">
|
||||||
|
|||||||
@@ -0,0 +1,156 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Camera_Debug.h"
|
||||||
|
#include "Shader.h"
|
||||||
|
|
||||||
|
CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CCamera(pDevice, pContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
|
||||||
|
: CCamera(rhs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
Transition(fTimeDelta);
|
||||||
|
_float3 vCamPos = {};
|
||||||
|
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||||
|
GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||||
|
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||||
|
m_bMovable = !m_bMovable;
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||||
|
m_pGameInstance->Toggle_MouseCenter();
|
||||||
|
}
|
||||||
|
if (m_bMovable) {
|
||||||
|
#pragma region Position
|
||||||
|
_float fSpeed = 5.f;
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_W)) {
|
||||||
|
m_pTransformCom->Go_Straight(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_A)) {
|
||||||
|
m_pTransformCom->Go_Left(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_S)) {
|
||||||
|
m_pTransformCom->Go_Backward(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_D)) {
|
||||||
|
m_pTransformCom->Go_Right(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||||
|
m_pTransformCom->Go_Up(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||||
|
m_pTransformCom->Go_Down(fTimeDelta * fSpeed);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Pressing(DIK_TAB)) {
|
||||||
|
Set_InitialPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma endregion
|
||||||
|
#pragma region Angle
|
||||||
|
|
||||||
|
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||||
|
m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta * fMove.x * m_fMouseSensor);
|
||||||
|
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::RIGHT), fTimeDelta * fMove.y * m_fMouseSensor);
|
||||||
|
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
__super::Bind_Matrices();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamera_Debug::Render()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamera_Debug::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamera_Debug::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
CAMERA_DEBUG_DESC* pDesc = static_cast<CAMERA_DEBUG_DESC*>(pArg);
|
||||||
|
m_fMouseSensor = pDesc->fMouseSensor;
|
||||||
|
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f));
|
||||||
|
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
|
||||||
|
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||||
|
m_bActive = true;
|
||||||
|
|
||||||
|
m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey);
|
||||||
|
m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamera_Debug::Ready_Components(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamera_Debug::Bind_ShaderResources()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Set_InitialPos()
|
||||||
|
{
|
||||||
|
m_pTransformCom->Set_WorldMatrix(m_matInitial);
|
||||||
|
}
|
||||||
|
|
||||||
|
CCamera_Debug* CCamera_Debug::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CCamera_Debug* pInstance = new CCamera_Debug(pDevice, pContext);
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CCamera_Debug");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
CCamera_Debug* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner)
|
||||||
|
{
|
||||||
|
CCamera_Debug* pInstance = new CCamera_Debug(*this);
|
||||||
|
pInstance->m_pOwner = pOwner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CCamera_Debug");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamera_Debug::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "MapInfo.h"
|
||||||
|
#include "MonsterInfo.h"
|
||||||
|
#include "PlayerInfo.h"
|
||||||
|
|
||||||
|
IMPLEMENT_SINGLETON(CInfoInstance)
|
||||||
|
|
||||||
|
CInfoInstance::CInfoInstance()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CInfoInstance::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
LEVEL CInfoInstance::Get_RestartLevel()
|
||||||
|
{
|
||||||
|
return LEVEL::GAMEPLAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
m_pDevice = pDevice;
|
||||||
|
m_pContext = pContext;
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
SAFE_ADDREF(m_pDevice);
|
||||||
|
SAFE_ADDREF(m_pContext);
|
||||||
|
|
||||||
|
m_pMapInfo = CMapInfo::Create(pDevice, pContext);
|
||||||
|
if (nullptr == m_pMapInfo) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext);
|
||||||
|
if (nullptr == m_pPlayerInfo) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
m_pMonsterInfo = CMonsterInfo::Create(pDevice, pContext);
|
||||||
|
if (nullptr == m_pMonsterInfo) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CInfoInstance::Release_Information()
|
||||||
|
{
|
||||||
|
DestroyInstance();
|
||||||
|
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pMapInfo);
|
||||||
|
SAFE_RELEASE(m_pPlayerInfo);
|
||||||
|
SAFE_RELEASE(m_pMonsterInfo);
|
||||||
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
SAFE_RELEASE(m_pContext);
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CInfoInstance::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Level_Field.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "Level_Loading.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
#include "Light_Main.h"
|
||||||
|
#include "Layer.h"
|
||||||
|
|
||||||
|
CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
|
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||||
|
{
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(Ready_Lights())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(Ready_Markers())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Initialize()
|
||||||
|
{
|
||||||
|
assert(false);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLevel_Field::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Set_LevelToChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pInfoInstance->Update(fTimeDelta);
|
||||||
|
|
||||||
|
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||||
|
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::RESTART)))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Render()
|
||||||
|
{
|
||||||
|
SetWindowText(g_hWnd, TEXT("필드레벨"));
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Lights()
|
||||||
|
{
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Layer_Camera()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Layer_Sound()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Markers()
|
||||||
|
{
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag)
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<CLevel*, function<void()>> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
|
||||||
|
{
|
||||||
|
CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CLevel_Field");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return { pInstance, [pInstance]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound(); } };
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLevel_Field::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
}
|
||||||
@@ -2,12 +2,16 @@
|
|||||||
#include "Level_GamePlay.h"
|
#include "Level_GamePlay.h"
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "Level_Loading.h"
|
#include "Level_Loading.h"
|
||||||
|
#include "Light_Main.h"
|
||||||
|
#include "Camera_Debug.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
|
|
||||||
CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||||
{
|
{
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||||
@@ -15,7 +19,6 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
|||||||
if (FAILED(Ready_Lights())) {
|
if (FAILED(Ready_Lights())) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(Ready_Markers())) {
|
if (FAILED(Ready_Markers())) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
@@ -37,10 +40,17 @@ HRESULT CLevel_GamePlay::Initialize()
|
|||||||
|
|
||||||
void CLevel_GamePlay::Update(_float fTimeDelta)
|
void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Set_LevelToChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pInfoInstance->Update(fTimeDelta);
|
||||||
|
|
||||||
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||||
//if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) {
|
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::FIELD)))) {
|
||||||
// return;
|
return;
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,19 +62,9 @@ HRESULT CLevel_GamePlay::Render()
|
|||||||
|
|
||||||
HRESULT CLevel_GamePlay::Ready_Lights()
|
HRESULT CLevel_GamePlay::Ready_Lights()
|
||||||
{
|
{
|
||||||
LIGHT_DESC LightDesc{};
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))){
|
||||||
|
return E_FAIL;
|
||||||
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;
|
|
||||||
//}
|
|
||||||
assert(false);
|
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -76,6 +76,28 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
|||||||
|
|
||||||
HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||||
{
|
{
|
||||||
|
CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
|
||||||
|
Camera_Desc.fFovy = XMConvertToRadians(60.0f);
|
||||||
|
Camera_Desc.fNear = 0.1f;
|
||||||
|
Camera_Desc.fFar = 200.f;
|
||||||
|
Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
|
||||||
|
Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
|
||||||
|
Camera_Desc.fSpeedPerSec = 5.f;
|
||||||
|
Camera_Desc.pCameraKey = CAMERA_DEBUG;
|
||||||
|
Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||||
|
Camera_Desc.fMouseSensor = 0.1f;
|
||||||
|
Camera_Desc.iPriority = 99;
|
||||||
|
Camera_Desc.pFollowTarget = { nullptr };
|
||||||
|
Camera_Desc.pLookTarget = { nullptr };
|
||||||
|
|
||||||
|
CCamera_Debug* pCamera = { nullptr };
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Debug>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))){
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,4 +134,5 @@ void CLevel_GamePlay::Free()
|
|||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Level_Loading.h"
|
#include "Level_Loading.h"
|
||||||
|
|
||||||
#include "Loader.h"
|
#include "Loader.h"
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "Level_Logo.h"
|
#include "Level_Logo.h"
|
||||||
#include "Level_GamePlay.h"
|
#include "Level_GamePlay.h"
|
||||||
|
#include "Level_Restart.h"
|
||||||
|
#include "Level_Field.h"
|
||||||
|
|
||||||
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||||
@@ -47,7 +49,17 @@ void CLevel_Loading::Update(_float fTimeDelta)
|
|||||||
{
|
{
|
||||||
pairLevel = CLevel_GamePlay::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr);
|
pairLevel = CLevel_GamePlay::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr);
|
||||||
} break;
|
} break;
|
||||||
|
case LEVEL::FIELD:
|
||||||
|
{
|
||||||
|
pairLevel = CLevel_Field::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr);
|
||||||
|
} break;
|
||||||
|
case LEVEL::RESTART:
|
||||||
|
{
|
||||||
|
pairLevel = CLevel_Restart::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||||
|
} break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
assert(false); // E_IMPL
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +71,7 @@ void CLevel_Loading::Update(_float fTimeDelta)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else /* FAILED */ {
|
else /* FAILED */ {
|
||||||
assert(false); // 레벨 변경 실패
|
assert(false); // 레벨 변경 실패
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Level_Logo.h"
|
#include "Level_Logo.h"
|
||||||
|
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "Level_Loading.h"
|
#include "Level_Loading.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
|
||||||
|
|
||||||
CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||||
{
|
{
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CLevel_Logo::Initialize()
|
HRESULT CLevel_Logo::Initialize()
|
||||||
@@ -23,6 +25,12 @@ void CLevel_Logo::Update(_float fTimeDelta)
|
|||||||
{
|
{
|
||||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||||
{
|
{
|
||||||
|
m_pGameInstance->Set_LevelToChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pInfoInstance->Update(fTimeDelta);
|
||||||
|
|
||||||
|
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::GAMEPLAY)))) {
|
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::GAMEPLAY)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -31,7 +39,7 @@ void CLevel_Logo::Update(_float fTimeDelta)
|
|||||||
|
|
||||||
HRESULT CLevel_Logo::Render()
|
HRESULT CLevel_Logo::Render()
|
||||||
{
|
{
|
||||||
SetWindowText(g_hWnd, TEXT("로고레벨입니다"));
|
SetWindowText(g_hWnd, TEXT("로고레벨입니다"));
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,5 +65,5 @@ void CLevel_Logo::Free()
|
|||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Level_Restart.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "Level_Loading.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CLevel_Restart::CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
|
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||||
|
{
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Restart::Initialize()
|
||||||
|
{
|
||||||
|
m_eNextLevel = m_pInfoInstance->Get_RestartLevel();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLevel_Restart::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Set_LevelToChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pInfoInstance->Update(fTimeDelta);
|
||||||
|
|
||||||
|
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||||
|
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLevel_Restart::Render()
|
||||||
|
{
|
||||||
|
SetWindowText(g_hWnd, TEXT("리스타트레벨"));
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<CLevel*, function<void()>> CLevel_Restart::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||||
|
{
|
||||||
|
CLevel_Restart* pInstance = new CLevel_Restart(pDevice, pContext, eLevelID);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CLevel_Restart");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return { pInstance, nullptr };
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLevel_Restart::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Light_Main.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
|
CLight_Main::CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CGameObject(pDevice, pContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CLight_Main::CLight_Main(const CLight_Main& Prototype)
|
||||||
|
: CGameObject(Prototype)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLight_Main::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLight_Main::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Initialize(pArg)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components()))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
m_pTransformCom->Set_State(STATE::LOOK, XMVectorSet(1.f, -1.f, 1.f, 0.f));
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLight_Main::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLight_Main::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLight_Main::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLight_Main::Render()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLight_Main::Ready_Components()
|
||||||
|
{
|
||||||
|
__super::Ready_Components(nullptr);
|
||||||
|
|
||||||
|
LIGHT_DESC LightDesc{};
|
||||||
|
|
||||||
|
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||||
|
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||||
|
LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f);
|
||||||
|
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK);
|
||||||
|
LightDesc.iLevel = NEXT_LEVEL;
|
||||||
|
|
||||||
|
/* Com_Light*/
|
||||||
|
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc)))
|
||||||
|
{
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLight_Main::Bind_ShaderResources()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CLight_Main* CLight_Main::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CLight_Main* pInstance = new CLight_Main(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CLight_Main");
|
||||||
|
Safe_Release(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGameObject* CLight_Main::Clone(void* pArg, CGameObject* pOwner)
|
||||||
|
{
|
||||||
|
CLight_Main* pInstance = new CLight_Main(*this);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CLight_Main");
|
||||||
|
Safe_Release(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLight_Main::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
Safe_Release(m_pLightCom);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLight_Main::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Loader.h"
|
#include "Loader.h"
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "MainApp.h"
|
#include "MainApp.h"
|
||||||
|
#include "Light_Main.h"
|
||||||
|
#include "Camera_Debug.h"
|
||||||
|
|
||||||
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
: m_pDevice{ pDevice }
|
: m_pDevice{ pDevice }
|
||||||
@@ -29,11 +31,7 @@ HRESULT CLoader::Initialize(LEVEL eNextLevelID)
|
|||||||
{
|
{
|
||||||
m_eNextLevelID = eNextLevelID;
|
m_eNextLevelID = eNextLevelID;
|
||||||
|
|
||||||
InitializeCriticalSection(&m_CriticalSection);
|
m_pGameInstance->EnqueueJob(&LoadingMain, this);
|
||||||
|
|
||||||
m_hThread = (HANDLE)_beginthreadex(nullptr, 0, LoadingMain, this, 0, nullptr);
|
|
||||||
if (0 == m_hThread)
|
|
||||||
return E_FAIL;
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -45,8 +43,6 @@ HRESULT CLoader::Loading()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterCriticalSection(&m_CriticalSection);
|
|
||||||
|
|
||||||
HRESULT hr = {};
|
HRESULT hr = {};
|
||||||
|
|
||||||
switch (m_eNextLevelID)
|
switch (m_eNextLevelID)
|
||||||
@@ -57,14 +53,21 @@ HRESULT CLoader::Loading()
|
|||||||
case LEVEL::GAMEPLAY:
|
case LEVEL::GAMEPLAY:
|
||||||
hr = Loading_For_GamePlay();
|
hr = Loading_For_GamePlay();
|
||||||
break;
|
break;
|
||||||
|
case LEVEL::FIELD:
|
||||||
|
hr = Loading_For_Field();
|
||||||
|
break;
|
||||||
|
case LEVEL::RESTART:
|
||||||
|
hr = Loading_For_Restart();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection(&m_CriticalSection);
|
CoUninitialize();
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr)){
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -76,17 +79,25 @@ void CLoader::Output()
|
|||||||
|
|
||||||
HRESULT CLoader::Loading_For_Logo()
|
HRESULT CLoader::Loading_For_Logo()
|
||||||
{
|
{
|
||||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("사운드를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("사운드를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Debug>(g_iStaticLevel, CCamera_Debug::Create(m_pDevice, m_pContext)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_Prototype<CLight_Main>(g_iStaticLevel, CLight_Main::Create(m_pDevice, m_pContext)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||||
|
|
||||||
m_isFinished = true;
|
m_isFinished = true;
|
||||||
|
|
||||||
@@ -95,19 +106,61 @@ HRESULT CLoader::Loading_For_Logo()
|
|||||||
|
|
||||||
HRESULT CLoader::Loading_For_GamePlay()
|
HRESULT CLoader::Loading_For_GamePlay()
|
||||||
{
|
{
|
||||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||||
|
|
||||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||||
|
|
||||||
|
m_isFinished = true;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLoader::Loading_For_Field()
|
||||||
|
{
|
||||||
|
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||||
|
|
||||||
|
m_isFinished = true;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CLoader::Loading_For_Restart()
|
||||||
|
{
|
||||||
|
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||||
|
|
||||||
|
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||||
|
|
||||||
m_isFinished = true;
|
m_isFinished = true;
|
||||||
|
|
||||||
@@ -132,11 +185,6 @@ void CLoader::Free()
|
|||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
|
|
||||||
WaitForSingleObject(m_hThread, INFINITE);
|
|
||||||
|
|
||||||
CloseHandle(m_hThread);
|
|
||||||
|
|
||||||
DeleteCriticalSection(&m_CriticalSection);
|
|
||||||
|
|
||||||
SAFE_RELEASE(m_pGameInstance);
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
SAFE_RELEASE(m_pDevice);
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "MainApp.h"
|
#include "MainApp.h"
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "Level_Loading.h"
|
#include "Level_Loading.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
_float g_fTimeMult = 1.f;
|
_float g_fTimeMult = 1.f;
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
|
||||||
CMainApp::CMainApp()
|
CMainApp::CMainApp()
|
||||||
: m_pGameInstance{ CGameInstance::GetInstance() }
|
: m_pGameInstance{ CGameInstance::GetInstance() }
|
||||||
{
|
{
|
||||||
@@ -74,7 +74,7 @@ HRESULT CMainApp::Render()
|
|||||||
|
|
||||||
m_pGameInstance->Draw();
|
m_pGameInstance->Draw();
|
||||||
GUI::Render();
|
GUI::Render();
|
||||||
//m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("피곤해 못 써"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f));
|
//m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("피곤해 못 써"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f));
|
||||||
ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData());
|
ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData());
|
||||||
m_pGameInstance->Render_End();
|
m_pGameInstance->Render_End();
|
||||||
|
|
||||||
@@ -96,7 +96,14 @@ HRESULT CMainApp::Start_Level(LEVEL eLevelID)
|
|||||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID)))) {
|
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
if (nullptr == m_pInfoInstance) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
if (FAILED(m_pInfoInstance->Initialize_Information(m_pDevice, m_pContext))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,6 +164,9 @@ void CMainApp::Free()
|
|||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
|
|
||||||
|
m_pInfoInstance->Release_Information();
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
|
||||||
Release_IMGUI();
|
Release_IMGUI();
|
||||||
|
|
||||||
SAFE_RELEASE(m_pDevice);
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "MapInfo.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
|
||||||
|
CMapInfo::CMapInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMapInfo::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
m_pDevice = pDevice;
|
||||||
|
m_pContext = pContex;
|
||||||
|
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
SAFE_ADDREF(m_pDevice);
|
||||||
|
SAFE_ADDREF(m_pContext);
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CMapInfo* CMapInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
CMapInfo* pInstance = new CMapInfo();
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(pDevice, pContex))) {
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMapInfo::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
SAFE_RELEASE(m_pContext);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "MonsterInfo.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
|
||||||
|
CMonsterInfo::CMonsterInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMonsterInfo::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
m_pDevice = pDevice;
|
||||||
|
m_pContext = pContex;
|
||||||
|
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
SAFE_ADDREF(m_pDevice);
|
||||||
|
SAFE_ADDREF(m_pContext);
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CMonsterInfo* CMonsterInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
CMonsterInfo* pInstance = new CMonsterInfo();
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(pDevice, pContex))) {
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMonsterInfo::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
SAFE_RELEASE(m_pContext);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "PlayerInfo.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "InfoInstance.h"
|
||||||
|
|
||||||
|
CPlayerInfo::CPlayerInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPlayerInfo::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||||
|
m_pDevice = pDevice;
|
||||||
|
m_pContext = pContex;
|
||||||
|
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
SAFE_ADDREF(m_pInfoInstance);
|
||||||
|
SAFE_ADDREF(m_pDevice);
|
||||||
|
SAFE_ADDREF(m_pContext);
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CPlayerInfo* CPlayerInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||||
|
{
|
||||||
|
CPlayerInfo* pInstance = new CPlayerInfo();
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(pDevice, pContex))) {
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPlayerInfo::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
SAFE_RELEASE(m_pInfoInstance);
|
||||||
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
SAFE_RELEASE(m_pContext);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CCamera_Debug final : public CCamera
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct tagCamera_Debug : public CCamera::CAMERA_DESC
|
||||||
|
{
|
||||||
|
_float3 vEye{}, vAt{};
|
||||||
|
_float fMouseSensor{};
|
||||||
|
}CAMERA_DEBUG_DESC;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
CCamera_Debug(const CCamera_Debug& rhs);
|
||||||
|
virtual ~CCamera_Debug() = 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:
|
||||||
|
_bool m_bMovable = true;
|
||||||
|
_float m_fMouseSensor = {};
|
||||||
|
_float4x4 m_matInitial = {};
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
|
virtual HRESULT Ready_Components(void* pArg) override;
|
||||||
|
HRESULT Bind_ShaderResources() override;
|
||||||
|
void Set_InitialPos();
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CCamera_Debug* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
virtual CCamera_Debug* Clone(void* pArg, CGameObject* pOwner) override;
|
||||||
|
virtual void Free() override;
|
||||||
|
void Describe_Entity() override;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include "../Default/framework.h"
|
#include "../Default/framework.h"
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
namespace Client
|
namespace Client
|
||||||
{
|
{
|
||||||
const unsigned int g_iWinSizeX = 1920;
|
const unsigned int g_iWinSizeX = 1920;
|
||||||
const unsigned int g_iWinSizeY = 1080;
|
const unsigned int g_iWinSizeY = 1080;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Client
|
namespace Client
|
||||||
{
|
{
|
||||||
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END };
|
enum class LEVEL { STATIC, LOADING, LOGO, INTRO, GAMEPLAY, FIELD, RESTART, END };
|
||||||
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
|
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
|
||||||
|
enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT };
|
||||||
|
|
||||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
|
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
|
||||||
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
||||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, END };
|
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, END };
|
||||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
||||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END };
|
||||||
|
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END };
|
||||||
|
|
||||||
|
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,9 @@ namespace Client {
|
|||||||
#define FX_NORTEX TEXT("FX_NORTEX")
|
#define FX_NORTEX TEXT("FX_NORTEX")
|
||||||
#define FX_CELL TEXT("FX_CELL")
|
#define FX_CELL TEXT("FX_CELL")
|
||||||
#define FX_PARTICLE TEXT("FX_PARTICLE")
|
#define FX_PARTICLE TEXT("FX_PARTICLE")
|
||||||
|
#define FX_INSTANCE_MODEL TEXT("FX_INSTANCE_MODEL")
|
||||||
#define FX_UIEDITOR TEXT("FX_UIEDITOR")
|
#define FX_UIEDITOR TEXT("FX_UIEDITOR")
|
||||||
|
#define FX_UIINSTANCE TEXT("FX_UIINSTANCE")
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region MACRO_PROTOTYPE
|
#pragma region MACRO_PROTOTYPE
|
||||||
@@ -26,6 +28,7 @@ namespace Client {
|
|||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region OBJECT
|
#pragma region OBJECT
|
||||||
|
|
||||||
|
#define CAMERA_DEBUG TEXT("CAMERA_DEBUG")
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region COMPONENT
|
#pragma region COMPONENT
|
||||||
|
|
||||||
@@ -48,7 +51,9 @@ namespace Client {
|
|||||||
#define LAYER_DOT TEXT("Layer_Dot")
|
#define LAYER_DOT TEXT("Layer_Dot")
|
||||||
#define LAYER_CELL TEXT("Layer_Cell")
|
#define LAYER_CELL TEXT("Layer_Cell")
|
||||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||||
|
#define LAYER_LIGHT TEXT("Layer_Light")
|
||||||
|
|
||||||
|
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region MACRO_TEXTURE
|
#pragma region MACRO_TEXTURE
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CTransform;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Base.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CGameInstance;
|
||||||
|
class CGameObject;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CInfoInstance final : public CBase
|
||||||
|
{
|
||||||
|
DECLARE_SINGLETON(CInfoInstance)
|
||||||
|
private:
|
||||||
|
CInfoInstance();
|
||||||
|
virtual ~CInfoInstance() = default;
|
||||||
|
public:
|
||||||
|
HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
void Release_Information();
|
||||||
|
LEVEL Get_RestartLevel();
|
||||||
|
public:
|
||||||
|
void Update(_float fTimeDelta);
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
CGameInstance* m_pGameInstance = { nullptr };
|
||||||
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
|
|
||||||
|
class CPlayerInfo* m_pPlayerInfo = { nullptr };
|
||||||
|
class CMonsterInfo* m_pMonsterInfo = { nullptr };
|
||||||
|
class CMapInfo* m_pMapInfo = { nullptr };
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
_string m_strLog = {};
|
||||||
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Level.h"
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
NS_END
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CLevel_Field final : public CLevel
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||||
|
virtual ~CLevel_Field() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Update(_float fTimeDelta) override;
|
||||||
|
virtual HRESULT Render() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize() override;
|
||||||
|
HRESULT Initialize(void* pArg);
|
||||||
|
HRESULT Ready_Lights();
|
||||||
|
HRESULT Ready_Markers();
|
||||||
|
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||||
|
HRESULT Ready_Layer_Camera();
|
||||||
|
HRESULT Ready_Layer_Sound();
|
||||||
|
HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Client_Define.h"
|
#include "Client_Define.h"
|
||||||
#include "Level.h"
|
#include "Level.h"
|
||||||
@@ -16,6 +16,10 @@ class CLevel_GamePlay final : public CLevel
|
|||||||
virtual void Update(_float fTimeDelta) override;
|
virtual void Update(_float fTimeDelta) override;
|
||||||
virtual HRESULT Render() override;
|
virtual HRESULT Render() override;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual HRESULT Initialize() override;
|
virtual HRESULT Initialize() override;
|
||||||
HRESULT Initialize(void* pArg);
|
HRESULT Initialize(void* pArg);
|
||||||
@@ -26,6 +30,7 @@ class CLevel_GamePlay final : public CLevel
|
|||||||
HRESULT Ready_Layer_Sound();
|
HRESULT Ready_Layer_Sound();
|
||||||
HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
|
HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
||||||
virtual void Free() override;
|
virtual void Free() override;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Client_Define.h"
|
#include "Client_Define.h"
|
||||||
#include "Level.h"
|
#include "Level.h"
|
||||||
@@ -15,6 +15,9 @@ class CLevel_Logo final : public CLevel
|
|||||||
virtual void Update(_float fTimeDelta) override;
|
virtual void Update(_float fTimeDelta) override;
|
||||||
virtual HRESULT Render() override;
|
virtual HRESULT Render() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual HRESULT Initialize() override;
|
virtual HRESULT Initialize() override;
|
||||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Level.h"
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
NS_END
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
|
||||||
|
class CLevel_Restart final : public CLevel
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||||
|
virtual ~CLevel_Restart() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Update(_float fTimeDelta) override;
|
||||||
|
virtual HRESULT Render() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
LEVEL m_eNextLevel = {};
|
||||||
|
public:
|
||||||
|
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "GameObject.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CLight;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CLight_Main final : public CGameObject
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
CLight_Main(const CLight_Main& Prototype);
|
||||||
|
virtual ~CLight_Main() = 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:
|
||||||
|
CLight* m_pLightCom = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
|
HRESULT Ready_Components();
|
||||||
|
HRESULT Bind_ShaderResources();
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CLight_Main* 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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Client_Define.h"
|
#include "Client_Define.h"
|
||||||
#include "Base.h"
|
#include "Base.h"
|
||||||
@@ -27,8 +27,6 @@ class CLoader final : public CBase
|
|||||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
LEVEL m_eNextLevelID = { LEVEL::END };
|
LEVEL m_eNextLevelID = { LEVEL::END };
|
||||||
|
|
||||||
HANDLE m_hThread = {};
|
|
||||||
CRITICAL_SECTION m_CriticalSection = {};
|
|
||||||
_wstring m_strMessage = {};
|
_wstring m_strMessage = {};
|
||||||
_bool m_isFinished = { false };
|
_bool m_isFinished = { false };
|
||||||
|
|
||||||
@@ -36,6 +34,8 @@ class CLoader final : public CBase
|
|||||||
HRESULT Initialize(LEVEL eNextLevelID);
|
HRESULT Initialize(LEVEL eNextLevelID);
|
||||||
HRESULT Loading_For_Logo();
|
HRESULT Loading_For_Logo();
|
||||||
HRESULT Loading_For_GamePlay();
|
HRESULT Loading_For_GamePlay();
|
||||||
|
HRESULT Loading_For_Field();
|
||||||
|
HRESULT Loading_For_Restart();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Client_Define.h"
|
#include "Client_Define.h"
|
||||||
#include "Base.h"
|
#include "Base.h"
|
||||||
@@ -23,6 +23,7 @@ class CMainApp final : public CBase
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
CGameInstance* m_pGameInstance = { nullptr };
|
CGameInstance* m_pGameInstance = { nullptr };
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
ID3D11Device* m_pDevice = { nullptr };
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Base.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CGameInstance;
|
||||||
|
class CGameObject;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CMapInfo final : public CBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CMapInfo();
|
||||||
|
~CMapInfo() = default;
|
||||||
|
public:
|
||||||
|
void Update(_float fTimeDelta);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CGameInstance* m_pGameInstance = { nullptr };
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CMapInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Base.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CGameInstance;
|
||||||
|
class CGameObject;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CMonsterInfo final : public CBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CMonsterInfo();
|
||||||
|
~CMonsterInfo() = default;
|
||||||
|
public:
|
||||||
|
void Update(_float fTimeDelta);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CGameInstance* m_pGameInstance = { nullptr };
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CMonsterInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "Base.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CGameInstance;
|
||||||
|
class CGameObject;
|
||||||
|
NS_END
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CPlayerInfo final : public CBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CPlayerInfo();
|
||||||
|
~CPlayerInfo() = default;
|
||||||
|
public:
|
||||||
|
void Update(_float fTimeDelta);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CGameInstance* m_pGameInstance = { nullptr };
|
||||||
|
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||||
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
|
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||||
|
|
||||||
|
private:
|
||||||
|
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CPlayerInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 518 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 83 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -131,7 +131,7 @@ float3 Fresnel_Schlick(float cosTheta, float3 F0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Lighting(
|
PBR_LIGHT_OUT PBR_Lighting(
|
||||||
float3 vNormal, float3 vFromView, float3 vFromLight,
|
float3 vNormal, float3 vToView, float3 vToLight,
|
||||||
float3 vAlbedo, float fMetallic, float fRoughness,
|
float3 vAlbedo, float fMetallic, float fRoughness,
|
||||||
float3 vLightColor, float fAttenuation, float3 vFO
|
float3 vLightColor, float fAttenuation, float3 vFO
|
||||||
) {
|
) {
|
||||||
@@ -139,23 +139,24 @@ PBR_LIGHT_OUT PBR_Lighting(
|
|||||||
Out.vShade = 0;
|
Out.vShade = 0;
|
||||||
Out.vSpecular = 0;
|
Out.vSpecular = 0;
|
||||||
|
|
||||||
float3 vHalfVector = normalize(vFromView + vFromLight);
|
float3 vHalfVector = normalize(vToView + vToLight);
|
||||||
float NdotL = saturate(dot(vNormal, vFromLight));
|
float NdotL = saturate(dot(vNormal, vToLight));
|
||||||
float NdotV = saturate(dot(vNormal, vFromView));
|
float NdotV = saturate(dot(vNormal, vToView));
|
||||||
if (NdotL <= 0 || NdotV <= 0)
|
if (NdotL <= 0 || NdotV <= 0)
|
||||||
{
|
{
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
float fAlpha = max(fRoughness * fRoughness, 0.04f);
|
float fAlpha = max(fRoughness * fRoughness, 0.04f);
|
||||||
float k = ((fRoughness + 1.f) * (fRoughness + 1.f)) / 8.f;
|
float k = ((fRoughness + 1.f) * (fRoughness + 1.f)) / 8.f;
|
||||||
|
|
||||||
float D = NDF_ggxtr(vNormal, vHalfVector, fAlpha);
|
float D = NDF_ggxtr(vNormal, vHalfVector, fAlpha);
|
||||||
float G = Geometry_Smith(vNormal, vFromView, vFromLight, k);
|
float G = Geometry_Smith(vNormal, vToView, vToLight, k);
|
||||||
float3 F = Fresnel_Schlick(saturate(dot(vHalfVector, vFromView)), vFO);
|
float3 F = Fresnel_Schlick(saturate(dot(vHalfVector, vToView)), vFO);
|
||||||
|
|
||||||
float3 vNumerator = D * G * F;
|
float3 vNumerator = D * G * F;
|
||||||
float fDenom = max(4.f * NdotL * NdotV, 1e-7);
|
float fDenominator = max(4.f * NdotL * NdotV, 1e-7);
|
||||||
float3 specularBRDF = vNumerator / fDenom;
|
float3 specularBRDF = vNumerator / fDenominator;
|
||||||
|
|
||||||
float3 kS = F;
|
float3 kS = F;
|
||||||
float3 kD = (1.f - kS) * (1.f -fMetallic);
|
float3 kD = (1.f - kS) * (1.f -fMetallic);
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ BlendState BS_WB_Acc
|
|||||||
DestBlend[0] = one;
|
DestBlend[0] = one;
|
||||||
BlendOp[0] = Add;
|
BlendOp[0] = Add;
|
||||||
|
|
||||||
SrcBlend[1] = Zero;
|
SrcBlend[1] = Inv_Src_Alpha;
|
||||||
DestBlend[1] = Inv_Src_Alpha;
|
DestBlend[1] = zero;
|
||||||
BlendOp[1] = Add;
|
BlendOp[1] = Add;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -100,9 +100,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
// float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
|
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -118,17 +117,15 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vF0;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float fMetallic;
|
float fMetallic = 0.f;
|
||||||
float fRoughness;
|
float fRoughness = 0.f;
|
||||||
float fOcclusion;
|
float fOcclusion = 1.f;
|
||||||
float fAttenuation;
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
@@ -141,32 +138,20 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
|
fMetallic = 0.f;
|
||||||
|
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
float3 vSpec = vSRO.r;
|
vF0 = vSRO.rrr;
|
||||||
|
fRoughness = vSRO.g;
|
||||||
fMetallic = 0.f;
|
fOcclusion = vSRO.b;
|
||||||
fRoughness = vSRO.g;
|
|
||||||
fOcclusion = vSRO.b;
|
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fAttenuation = 1.f;
|
float fDiffuseAOStrength = lerp(0.3f, 5.f, fOcclusion);
|
||||||
|
|
||||||
float fDiffuseAOStrength = lerp(0.3f, 1.f, fOcclusion);
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
|
||||||
|
|
||||||
PBR_Out.vShade *= fDiffuseAOStrength;
|
PBR_Out.vShade *= fDiffuseAOStrength;
|
||||||
|
saturate(PBR_Out.vShade);
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
|
|
||||||
@@ -179,8 +164,8 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -196,27 +181,21 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float fMetallic = 0.f;
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
float fRoughness = 0.5f;
|
||||||
|
float fOcclusion = 1.f;
|
||||||
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
float3 vF0;
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
float fMetallic;
|
float3 vToLight = normalize(g_vLightPos.xyz - vWorldPosition.xyz); // 픽셀에서 라이트로
|
||||||
float fRoughness;
|
|
||||||
float fOcclusion;
|
|
||||||
float fAttenuation;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
float fDistance = length(vFromLight);
|
float fDistance = length(vToLight);
|
||||||
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||||
if (fAttenuation <= 0.f)
|
if (fAttenuation <= 0.f) { discard; }
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
@@ -228,27 +207,14 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
float3 vSpec = vSRO.r;
|
|
||||||
|
|
||||||
fMetallic = 0.f;
|
fMetallic = 0.f;
|
||||||
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
vF0 = vSRO.rrr;
|
||||||
fRoughness = vSRO.g;
|
fRoughness = vSRO.g;
|
||||||
fOcclusion = vSRO.b;
|
fOcclusion = vSRO.b;
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight,
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
vAlbedo, fMetallic, fRoughness,
|
|
||||||
g_vLightDiffuse.rgb, fAttenuation, vF0);
|
|
||||||
|
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
@@ -262,8 +228,8 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
|
|
||||||
float2 uv = In.vTexcoord;
|
float2 uv = In.vTexcoord;
|
||||||
|
|
||||||
float3 vNormal = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, uv);
|
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
float3 vNormal = normalize(g_NormalTexture.Sample(DefaultSampler, uv).xyz * 2.f - 1.f);
|
||||||
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
float4 vDepth = g_DepthTexture.Sample(DefaultSampler, uv);
|
||||||
|
|
||||||
float fViewZ = vDepth.y * g_fFar;
|
float fViewZ = vDepth.y * g_fFar;
|
||||||
@@ -279,33 +245,26 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
vWorldPosition = mul(vWorldPosition, g_invMatView);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 vWPos = vWorldPosition.xyz;
|
float3 vF0 = float3(0.04f, 0.04f, 0.04f);
|
||||||
float3 vFromView = normalize(vWPos - g_vCamPosition.xyz); // 카메라에서 픽셀로 가는 방향
|
float fMetallic = 0.f;
|
||||||
float3 vFromLight = normalize(g_vLightDir.xyz); // 라이트에서 오는 라이트 벡터
|
float fRoughness = 0.5f;
|
||||||
|
float fOcclusion = 1.f;
|
||||||
|
float fAttenuation = 1.f;
|
||||||
|
|
||||||
|
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
|
||||||
|
float3 vToLight = normalize(g_vLightPos.xyz - vWorldPosition.xyz); // 픽셀에서 라이트로
|
||||||
|
|
||||||
float3 vF0;
|
|
||||||
float fMetallic;
|
|
||||||
float fRoughness;
|
|
||||||
float fOcclusion;
|
|
||||||
float fAttenuation;
|
|
||||||
{
|
{
|
||||||
float fDistance = length(vFromLight);
|
float fDistance = length(vToLight);
|
||||||
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||||
if (fAttenuation <= 0.f)
|
if (fAttenuation <= 0.f) { discard; }
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
float fCosAngle = dot(vFromLight, g_vLightDir.xyz);
|
|
||||||
if (fCosAngle < g_fSpotOuterAngle)
|
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
}
|
||||||
|
float fCosAngle = dot(vToView, g_vLightDir.xyz);
|
||||||
|
if (fCosAngle < g_fSpotOuterAngle) { discard; }
|
||||||
|
|
||||||
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
||||||
fAttenuation *= fSpotAttenenuation;
|
fAttenuation *= fSpotAttenenuation;
|
||||||
|
|
||||||
float3 vAlbedo = g_DiffuseTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
|
|
||||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||||
{
|
{
|
||||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
@@ -317,25 +276,14 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
}
|
}
|
||||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||||
{
|
{
|
||||||
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
|
||||||
float3 vSpec = vSRO.r;
|
|
||||||
|
|
||||||
fMetallic = 0.f;
|
fMetallic = 0.f;
|
||||||
|
float3 vSRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||||
|
vF0 = vSRO.rrr;
|
||||||
fRoughness = vSRO.g;
|
fRoughness = vSRO.g;
|
||||||
fOcclusion = vSRO.b;
|
fOcclusion = vSRO.b;
|
||||||
|
|
||||||
|
|
||||||
vF0 = vSpec.xxx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fMetallic = 0.f;
|
|
||||||
fRoughness = 0.5f;
|
|
||||||
fOcclusion = 1.f;
|
|
||||||
vF0 = float3(0.04f, 0.04f, 0.04f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vFromView, vFromLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||||
|
|
||||||
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
Out.vShade = float4(PBR_Out.vShade, 1.f);
|
||||||
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
Out.vSpecular = float4(PBR_Out.vSpecular, 1.f);
|
||||||
@@ -407,6 +355,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||||
|
|
||||||
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
||||||
|
|
||||||
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
||||||
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
||||||
//bool IsShadow = { false };
|
//bool IsShadow = { false };
|
||||||
@@ -441,6 +390,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
|
||||||
for (int i = -15; i < 16; ++i)
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x;
|
vTexcoord.x = In.vTexcoord.x;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
|
|
||||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
|
|
||||||
if (0.f == vColorTexture.a)
|
if (0.f == vColorTexture.a)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -202,31 +202,29 @@ PS_OUT PS_MAIN(PS_IN In)
|
|||||||
PS_OUT Out;
|
PS_OUT Out;
|
||||||
|
|
||||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
if (vMtrlDiffuse.a < 0.4f)
|
vector vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
{
|
if (vMtrlDiffuse.a < 0.2f) { discard; }
|
||||||
discard;
|
|
||||||
}
|
|
||||||
|
|
||||||
vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
|
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||||
|
|
||||||
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
|
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||||
|
|
||||||
if (true == g_bRimLight)
|
if (true == g_bRimLight)
|
||||||
{
|
{
|
||||||
float fRimLight = GetRimLight(g_vCamPosition.xyz, In.vWorldPos.xyz, vNormal, g_fRimPower, g_fRimStrength);
|
float fRimLight = GetRimLight(g_vCamPosition.xyz, In.vWorldPos.xyz, vNormal, g_fRimPower, g_fRimStrength);
|
||||||
vMtrlDiffuse.xyz = (vMtrlDiffuse.xyz * (1 - fRimLight)) + g_vRimColor * fRimLight;
|
vMtrlDiffuse.xyz = (vMtrlDiffuse.xyz * (1 - fRimLight)) + g_vRimColor * fRimLight;
|
||||||
}
|
}
|
||||||
vector vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
|
|
||||||
|
|
||||||
Out.vAlbedo = vMtrlDiffuse;
|
Out.vAlbedo = vMtrlDiffuse;
|
||||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, g_fUsingSurfaceParams, 1.f);
|
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||||
|
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||||
|
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||||
|
1.f);
|
||||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||||
Out.vSurface = vSurface;
|
Out.vSurface = vSurface;
|
||||||
|
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,20 +169,20 @@ PS_OUT PS_MAIN(PS_IN In)
|
|||||||
PS_OUT Out;
|
PS_OUT Out;
|
||||||
|
|
||||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
if (vMtrlDiffuse.a < 0.2f)
|
vector vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
{
|
if (vMtrlDiffuse.a < 0.2f) { discard; }
|
||||||
discard;
|
|
||||||
}
|
|
||||||
|
|
||||||
vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
|
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||||
|
|
||||||
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
|
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||||
vector vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
|
|
||||||
Out.vAlbedo = vMtrlDiffuse;
|
Out.vAlbedo = vMtrlDiffuse;
|
||||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, g_fUsingSurfaceParams, 1.f);
|
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||||
|
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||||
|
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||||
|
1.f);
|
||||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||||
Out.vSurface = vSurface;
|
Out.vSurface = vSurface;
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ technique11 MeshTechnique11
|
|||||||
{
|
{
|
||||||
pass MeshPass // 0
|
pass MeshPass // 0
|
||||||
{
|
{
|
||||||
SetRasterizerState(RS_Nocull);
|
SetRasterizerState(RS_Default);
|
||||||
SetDepthStencilState(DSS_Default, 0);
|
SetDepthStencilState(DSS_Default, 0);
|
||||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||||
VertexShader = compile vs_5_0 VS_MAIN();
|
VertexShader = compile vs_5_0 VS_MAIN();
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ bool g_isMaskUVMove;
|
|||||||
bool g_isNoiseUVMove;
|
bool g_isNoiseUVMove;
|
||||||
|
|
||||||
bool g_isReverseDissolve;
|
bool g_isReverseDissolve;
|
||||||
|
bool g_isEmissiveDissolve;
|
||||||
|
|
||||||
float g_fFar;
|
float g_fFar;
|
||||||
|
|
||||||
@@ -158,11 +159,11 @@ VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
|||||||
{
|
{
|
||||||
VS_OUT Out = (VS_OUT) 0;
|
VS_OUT Out = (VS_OUT) 0;
|
||||||
|
|
||||||
row_major matrix matW, matWV, matWVP;
|
matrix matW, matWV, matWVP;
|
||||||
|
|
||||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||||
|
|
||||||
matW = mul(g_WorldMatrix, TransformMatrix);
|
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||||
matWV = mul(matW, g_ViewMatrix);
|
matWV = mul(matW, g_ViewMatrix);
|
||||||
matWVP = mul(matWV, g_ProjMatrix);
|
matWVP = mul(matWV, g_ProjMatrix);
|
||||||
|
|
||||||
@@ -428,14 +429,22 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
|
|
||||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||||
|
|
||||||
if (vMtrlDiffuse.a / g_fDiffuseAlpha > g_fEmissiveCutAlpha)
|
|
||||||
|
float fEmissiveCutAlpha = g_fEmissiveCutAlpha;
|
||||||
|
|
||||||
|
if (g_isEmissiveDissolve == true)
|
||||||
{
|
{
|
||||||
float3 vEmissiveColor= g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a);
|
fEmissiveCutAlpha += (In.vLifeTime.x / In.vLifeTime.y) / 2;
|
||||||
Out.vColorTarget = vector(vEmissiveColor, vMtrlDiffuse.a);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
float fSmoothAlpha = smoothstep(fEmissiveCutAlpha - 0.1f, fEmissiveCutAlpha + 0.1f, vMtrlDiffuse.a);
|
||||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
|
||||||
|
|
||||||
|
|
||||||
|
float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a);
|
||||||
|
|
||||||
|
Out.vColorTarget = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);
|
||||||
|
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
@@ -456,7 +465,7 @@ VS_BLUR_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
|||||||
|
|
||||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||||
|
|
||||||
matW = mul(g_WorldMatrix, TransformMatrix);
|
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||||
matWV = mul(matW, g_ViewMatrix);
|
matWV = mul(matW, g_ViewMatrix);
|
||||||
matWVP = mul(matWV, g_ProjMatrix);
|
matWVP = mul(matWV, g_ProjMatrix);
|
||||||
|
|
||||||
@@ -483,7 +492,6 @@ struct PS_BLUR_IN
|
|||||||
struct PS_BLUR_OUT
|
struct PS_BLUR_OUT
|
||||||
{
|
{
|
||||||
float4 vDiffuse : SV_TARGET0;
|
float4 vDiffuse : SV_TARGET0;
|
||||||
float4 vBlurWeight : SV_TARGET1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -492,7 +500,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
|
|
||||||
PS_BLUR_OUT Out;
|
PS_BLUR_OUT Out;
|
||||||
|
|
||||||
|
|
||||||
vector vMtrlDiffuse;
|
vector vMtrlDiffuse;
|
||||||
vector vMtrlMask;
|
vector vMtrlMask;
|
||||||
vector vMtrlNoise;
|
vector vMtrlNoise;
|
||||||
@@ -540,6 +547,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
/* 최종 색깔 */
|
/* 최종 색깔 */
|
||||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (g_vColor.a > 0)
|
if (g_vColor.a > 0)
|
||||||
vMtrlDiffuse += g_vColor;
|
vMtrlDiffuse += g_vColor;
|
||||||
|
|
||||||
@@ -582,8 +591,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
|
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_isMaskUVMove)
|
if (g_isMaskUVMove)
|
||||||
@@ -600,8 +607,12 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
vMtrlMask.r = 1.f;
|
vMtrlMask.r = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (vMtrlDiffuse.a <= 0.f)
|
if (vMtrlDiffuse.a <= 0.f)
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
@@ -619,23 +630,24 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||||
|
|
||||||
// 색깔 추가할 처리 (이미시브)
|
// 색깔 추가할 처리 (이미시브)
|
||||||
|
|
||||||
|
vector vEmissive;
|
||||||
|
|
||||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
if (g_isEmissive == true)
|
float fSmoothAlpha = smoothstep(g_fEmissiveCutAlpha - 0.02f, g_fEmissiveCutAlpha + 0.02f, vMtrlDiffuse.a);
|
||||||
{
|
|
||||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a);
|
||||||
|
|
||||||
|
vEmissive = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);
|
||||||
|
|
||||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity + vEmissive;
|
||||||
Out.vBlurWeight.r = g_iBlurWeight / 32.f;
|
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.2 MiB |
Binary file not shown.
@@ -167,6 +167,8 @@
|
|||||||
<ClInclude Include="..\Public\Body.h" />
|
<ClInclude Include="..\Public\Body.h" />
|
||||||
<ClInclude Include="..\public\Active_Icon.h" />
|
<ClInclude Include="..\public\Active_Icon.h" />
|
||||||
<ClInclude Include="..\Public\Broom.h" />
|
<ClInclude Include="..\Public\Broom.h" />
|
||||||
|
<ClInclude Include="..\Public\CallBack_EffectHitBox_Behavior.h" />
|
||||||
|
<ClInclude Include="..\Public\CallBack_EffectHitBox_HitReport.h" />
|
||||||
<ClInclude Include="..\Public\CallBack_Monster_Behavior.h" />
|
<ClInclude Include="..\Public\CallBack_Monster_Behavior.h" />
|
||||||
<ClInclude Include="..\Public\CallBack_Monster_HitReport.h" />
|
<ClInclude Include="..\Public\CallBack_Monster_HitReport.h" />
|
||||||
<ClInclude Include="..\Public\CallBack_Playable_Behavior.h" />
|
<ClInclude Include="..\Public\CallBack_Playable_Behavior.h" />
|
||||||
@@ -182,10 +184,14 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Dummy_PhysXEffectHitBox.h" />
|
||||||
<ClInclude Include="..\Public\Dummy_PhysXFixedDoor.h">
|
<ClInclude Include="..\Public\Dummy_PhysXFixedDoor.h">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Dummy_PhysXHitBox.h">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\Public\Dummy_PhysXMonster.h" />
|
<ClInclude Include="..\Public\Dummy_PhysXMonster.h" />
|
||||||
<ClInclude Include="..\Public\Dummy_PhysXPlatform.h">
|
<ClInclude Include="..\Public\Dummy_PhysXPlatform.h">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
@@ -207,7 +213,6 @@
|
|||||||
<ClInclude Include="..\Public\Effect_Editor.h" />
|
<ClInclude Include="..\Public\Effect_Editor.h" />
|
||||||
<ClInclude Include="..\Public\EditEffect.h" />
|
<ClInclude Include="..\Public\EditEffect.h" />
|
||||||
<ClInclude Include="..\Public\Goblin.h" />
|
<ClInclude Include="..\Public\Goblin.h" />
|
||||||
<ClInclude Include="..\Public\Information.h" />
|
|
||||||
<ClInclude Include="..\public\Land.h" />
|
<ClInclude Include="..\public\Land.h" />
|
||||||
<ClInclude Include="..\Public\Level_BloomViewer.h" />
|
<ClInclude Include="..\Public\Level_BloomViewer.h" />
|
||||||
<ClInclude Include="..\public\Level_MapViewer.h" />
|
<ClInclude Include="..\public\Level_MapViewer.h" />
|
||||||
@@ -288,6 +293,8 @@
|
|||||||
<ClCompile Include="..\Private\Body.cpp" />
|
<ClCompile Include="..\Private\Body.cpp" />
|
||||||
<ClCompile Include="..\private\Active_Icon.cpp" />
|
<ClCompile Include="..\private\Active_Icon.cpp" />
|
||||||
<ClCompile Include="..\Private\Broom.cpp" />
|
<ClCompile Include="..\Private\Broom.cpp" />
|
||||||
|
<ClCompile Include="..\Private\CallBack_EffectHitBox_Behavior.cpp" />
|
||||||
|
<ClCompile Include="..\Private\CallBack_EffectHitBox_HitReport.cpp" />
|
||||||
<ClCompile Include="..\Private\CallBack_Monster_Behavior.cpp" />
|
<ClCompile Include="..\Private\CallBack_Monster_Behavior.cpp" />
|
||||||
<ClCompile Include="..\Private\CallBack_Monster_HitReport.cpp" />
|
<ClCompile Include="..\Private\CallBack_Monster_HitReport.cpp" />
|
||||||
<ClCompile Include="..\Private\CallBack_Playable_Behavior.cpp" />
|
<ClCompile Include="..\Private\CallBack_Playable_Behavior.cpp" />
|
||||||
@@ -303,10 +310,14 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Dummy_PhysXEffectHitBox.cpp" />
|
||||||
<ClCompile Include="..\Private\Dummy_PhysXFixedDoor.cpp">
|
<ClCompile Include="..\Private\Dummy_PhysXFixedDoor.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Dummy_PhysXHitBox.cpp">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\Private\Dummy_PhysXMonster.cpp" />
|
<ClCompile Include="..\Private\Dummy_PhysXMonster.cpp" />
|
||||||
<ClCompile Include="..\Private\Dummy_PhysXPlatform.cpp">
|
<ClCompile Include="..\Private\Dummy_PhysXPlatform.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
@@ -328,7 +339,6 @@
|
|||||||
<ClCompile Include="..\Private\Effect_Editor.cpp" />
|
<ClCompile Include="..\Private\Effect_Editor.cpp" />
|
||||||
<ClCompile Include="..\Private\EditEffect.cpp" />
|
<ClCompile Include="..\Private\EditEffect.cpp" />
|
||||||
<ClCompile Include="..\Private\Goblin.cpp" />
|
<ClCompile Include="..\Private\Goblin.cpp" />
|
||||||
<ClCompile Include="..\Private\Information.cpp" />
|
|
||||||
<ClCompile Include="..\private\Land.cpp" />
|
<ClCompile Include="..\private\Land.cpp" />
|
||||||
<ClCompile Include="..\Private\Level_BloomViewer.cpp" />
|
<ClCompile Include="..\Private\Level_BloomViewer.cpp" />
|
||||||
<ClCompile Include="..\private\Level_MapViewer.cpp" />
|
<ClCompile Include="..\private\Level_MapViewer.cpp" />
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
<Filter Include="02.GameObjects">
|
<Filter Include="02.GameObjects">
|
||||||
<UniqueIdentifier>{79dcc46a-5ae9-48bb-962b-8984b15e4f5a}</UniqueIdentifier>
|
<UniqueIdentifier>{79dcc46a-5ae9-48bb-962b-8984b15e4f5a}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="03.Information">
|
|
||||||
<UniqueIdentifier>{fc210c4d-b8a6-4ed4-b19c-4bd175232e5f}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="00.MainApp">
|
<Filter Include="00.MainApp">
|
||||||
<UniqueIdentifier>{47a1f529-dd0e-4f37-9ada-5aa6731dea0b}</UniqueIdentifier>
|
<UniqueIdentifier>{47a1f529-dd0e-4f37-9ada-5aa6731dea0b}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -328,6 +325,18 @@
|
|||||||
<Filter Include="02.GameObjects\Broom">
|
<Filter Include="02.GameObjects\Broom">
|
||||||
<UniqueIdentifier>{a9862861-6eaa-4e04-b7f6-217a32db7db4}</UniqueIdentifier>
|
<UniqueIdentifier>{a9862861-6eaa-4e04-b7f6-217a32db7db4}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Dummys\DummyPhysX\PhysXHitBox">
|
||||||
|
<UniqueIdentifier>{80f4e763-20bb-47c1-b1de-ac11bc28bad8}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Dummys\DummyPhysX\00.Callback\Behavior\HitBox">
|
||||||
|
<UniqueIdentifier>{d35cf4c8-1838-4cf3-80ff-69ef27435792}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Dummys\DummyPhysX\00.Callback\HitReport\HitBox">
|
||||||
|
<UniqueIdentifier>{1b1b3388-cfea-4d6a-b93d-aa174317f573}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Dummys\DummyPhysX\PhysXEffectHitBox">
|
||||||
|
<UniqueIdentifier>{7b7439b1-f2e5-4233-bf26-4db2b41307b7}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Slot_Number">
|
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Slot_Number">
|
||||||
<UniqueIdentifier>{0db597d8-c4e7-479a-9b7e-9014b79a5e03}</UniqueIdentifier>
|
<UniqueIdentifier>{0db597d8-c4e7-479a-9b7e-9014b79a5e03}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -525,9 +534,6 @@
|
|||||||
<ClInclude Include="..\public\DummySkyBox.h">
|
<ClInclude Include="..\public\DummySkyBox.h">
|
||||||
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Public\Information.h">
|
|
||||||
<Filter>03.Information</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\Public\MainLight.h">
|
<ClInclude Include="..\Public\MainLight.h">
|
||||||
<Filter>02.GameObjects\MainLight</Filter>
|
<Filter>02.GameObjects\MainLight</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -648,6 +654,18 @@
|
|||||||
<ClInclude Include="..\Public\Broom.h">
|
<ClInclude Include="..\Public\Broom.h">
|
||||||
<Filter>02.GameObjects\Broom</Filter>
|
<Filter>02.GameObjects\Broom</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Dummy_PhysXHitBox.h">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\PhysXHitBox</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\CallBack_EffectHitBox_HitReport.h">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\00.Callback\HitReport\HitBox</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\CallBack_EffectHitBox_Behavior.h">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\00.Callback\Behavior\HitBox</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Dummy_PhysXEffectHitBox.h">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\PhysXEffectHitBox</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\public\Slot_Number.h" />
|
<ClInclude Include="..\public\Slot_Number.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -839,9 +857,6 @@
|
|||||||
<ClCompile Include="..\private\DummySkyBox.cpp">
|
<ClCompile Include="..\private\DummySkyBox.cpp">
|
||||||
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Private\Information.cpp">
|
|
||||||
<Filter>03.Information</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Private\MainLight.cpp">
|
<ClCompile Include="..\Private\MainLight.cpp">
|
||||||
<Filter>02.GameObjects\MainLight</Filter>
|
<Filter>02.GameObjects\MainLight</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -962,6 +977,18 @@
|
|||||||
<ClCompile Include="..\Private\Broom.cpp">
|
<ClCompile Include="..\Private\Broom.cpp">
|
||||||
<Filter>02.GameObjects\Broom</Filter>
|
<Filter>02.GameObjects\Broom</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Dummy_PhysXHitBox.cpp">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\PhysXHitBox</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\CallBack_EffectHitBox_HitReport.cpp">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\00.Callback\HitReport\HitBox</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\CallBack_EffectHitBox_Behavior.cpp">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\00.Callback\Behavior\HitBox</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Dummy_PhysXEffectHitBox.cpp">
|
||||||
|
<Filter>02.GameObjects\Dummys\DummyPhysX\PhysXEffectHitBox</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\private\Slot_Number.cpp" />
|
<ClCompile Include="..\private\Slot_Number.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "CallBack_EffectHitBox_Behavior.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_Behavior::CCallBack_EffectHitBox_Behavior()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_Behavior::~CCallBack_EffectHitBox_Behavior()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxShape& shape, const PSX::PxActor& actor)
|
||||||
|
{
|
||||||
|
if (nullptr == actor.userData) {
|
||||||
|
return PSX::PxControllerBehaviorFlags(0);
|
||||||
|
}
|
||||||
|
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||||
|
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||||
|
switch (pActorData->eKind)
|
||||||
|
{
|
||||||
|
case PHYSX_KIND::BODY_STATIC:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::BODY_DYNAMIC:
|
||||||
|
switch (pActorData->iSubKind)
|
||||||
|
{
|
||||||
|
case 20:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
eResults = PSX::PxControllerBehaviorFlags(0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::CCTActor:
|
||||||
|
// Action
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::OBSTACLEActor:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return eResults;
|
||||||
|
}
|
||||||
|
|
||||||
|
PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxController& controller)
|
||||||
|
{
|
||||||
|
// CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴
|
||||||
|
return PSX::PxControllerBehaviorFlags(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle)
|
||||||
|
{
|
||||||
|
// Obstacle이 움직이는 발판이다?
|
||||||
|
// 여기서 ride/slide 세팅
|
||||||
|
//return PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||||
|
|
||||||
|
return PSX::PxControllerBehaviorFlags(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCallBack_EffectHitBox_Behavior::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject)
|
||||||
|
{
|
||||||
|
m_pController = pController;
|
||||||
|
m_pPartDynamicBody = pPartDynamicObject;
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pController);
|
||||||
|
SAFE_ADDREF(m_pPartDynamicBody);
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCallBack_EffectHitBox_Behavior::Finalize()
|
||||||
|
{
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
SAFE_RELEASE(m_pPartDynamicBody);
|
||||||
|
SAFE_RELEASE(m_pController);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_Behavior* CCallBack_EffectHitBox_Behavior::Create()
|
||||||
|
{
|
||||||
|
return new CCallBack_EffectHitBox_Behavior();
|
||||||
|
}
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "CallBack_EffectHitBox_HitReport.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "GameObject.h"
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_HitReport::CCallBack_EffectHitBox_HitReport()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_HitReport::~CCallBack_EffectHitBox_HitReport()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||||
|
{
|
||||||
|
PSX::PxController* pController = hit.controller;
|
||||||
|
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||||
|
PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말
|
||||||
|
PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향
|
||||||
|
_float fLength = hit.length; // 시도한 move 길이
|
||||||
|
|
||||||
|
PSX::PxShape* pShape = hit.shape;
|
||||||
|
PSX::PxRigidActor* pActor = hit.actor;
|
||||||
|
|
||||||
|
|
||||||
|
ON_COLLISION_INFO CollisionDesc = {};
|
||||||
|
|
||||||
|
if (nullptr != pController && nullptr != pActor) {
|
||||||
|
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||||
|
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||||
|
if (nullptr == pTargetActorData) { // missing user data
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (pTargetActorData->eKind)
|
||||||
|
{
|
||||||
|
case PHYSX_KIND::BODY_STATIC:
|
||||||
|
// action
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::BODY_DYNAMIC:
|
||||||
|
{
|
||||||
|
switch (pTargetActorData->iSubKind)
|
||||||
|
{
|
||||||
|
case 23: // 무거운데 올라갈 수 있는 벽
|
||||||
|
|
||||||
|
/* OnCollision 함수에 넘길 값 */
|
||||||
|
|
||||||
|
|
||||||
|
CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
|
||||||
|
memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3));
|
||||||
|
memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3));
|
||||||
|
CollisionDesc.fLength = fLength;
|
||||||
|
|
||||||
|
pOwnerActorData->pOwner->Get_Owner()->OnCollision(pTargetActorData->pOwner , &CollisionDesc);
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||||
|
pDynamic->addForce(vDir * fLength * 100000.f, PSX::PxForceMode::eIMPULSE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
case PHYSX_KIND::CCTActor:
|
||||||
|
assert(false);
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::OBSTACLEActor:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCallBack_EffectHitBox_HitReport::onControllerHit(const PSX::PxControllersHit& hit)
|
||||||
|
{
|
||||||
|
PSX::PxController* pController = hit.controller;
|
||||||
|
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||||
|
PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말
|
||||||
|
PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향
|
||||||
|
_float fLength = hit.length; // 시도한 move 길이
|
||||||
|
|
||||||
|
PSX::PxController* pOtherController = hit.other; // 다른 컨트롤러
|
||||||
|
|
||||||
|
if (nullptr != pController && nullptr != pOtherController) {
|
||||||
|
PhsXUserData* pActorData = static_cast<PhsXUserData*>(pOtherController->getActor()->userData);
|
||||||
|
assert(nullptr != pActorData); // missing user data
|
||||||
|
|
||||||
|
switch (pActorData->eKind)
|
||||||
|
{
|
||||||
|
case PHYSX_KIND::BODY_STATIC:
|
||||||
|
assert(false);
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::BODY_DYNAMIC:
|
||||||
|
assert(false);
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::CCTActor:
|
||||||
|
// Action
|
||||||
|
break;
|
||||||
|
case PHYSX_KIND::OBSTACLEActor:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCallBack_EffectHitBox_HitReport::onObstacleHit(const PSX::PxControllerObstacleHit& hit)
|
||||||
|
{
|
||||||
|
PSX::PxController* pController = hit.controller;
|
||||||
|
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||||
|
PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말
|
||||||
|
PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향
|
||||||
|
_float fLength = hit.length; // 시도한 move 길이
|
||||||
|
|
||||||
|
const void* pOtherController = hit.userData; // 장애물
|
||||||
|
|
||||||
|
//switch (pOtherController.member)
|
||||||
|
//{
|
||||||
|
//default:
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCallBack_EffectHitBox_HitReport::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject)
|
||||||
|
{
|
||||||
|
m_pController = pController;
|
||||||
|
m_pPartDynamicBody = pPartDynamicObject;
|
||||||
|
m_pGameInstance = CGameInstance::GetInstance();
|
||||||
|
SAFE_ADDREF(m_pController);
|
||||||
|
SAFE_ADDREF(m_pPartDynamicBody);
|
||||||
|
SAFE_ADDREF(m_pGameInstance);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCallBack_EffectHitBox_HitReport::Finalize()
|
||||||
|
{
|
||||||
|
SAFE_RELEASE(m_pGameInstance);
|
||||||
|
SAFE_RELEASE(m_pPartDynamicBody);
|
||||||
|
SAFE_RELEASE(m_pController);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CCallBack_EffectHitBox_HitReport* CCallBack_EffectHitBox_HitReport::Create()
|
||||||
|
{
|
||||||
|
return new CCallBack_EffectHitBox_HitReport();
|
||||||
|
}
|
||||||
@@ -62,7 +62,7 @@ HRESULT CDummy_Cube::Render()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) {
|
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ HRESULT CDummy_Globe::Render()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||||
|
|
||||||
for (_uint i = 0; i < iNumMeshes; i++)
|
for (_uint i = 0; i < iNumMeshes; i++)
|
||||||
|
|||||||
@@ -0,0 +1,200 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Dummy_PhysXEffectHitBox.h"
|
||||||
|
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
|
|
||||||
|
CDummy_PhysXEffectHitBox::CDummy_PhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CGameObject{ pDevice, pContext }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CDummy_PhysXEffectHitBox::CDummy_PhysXEffectHitBox(const CDummy_PhysXEffectHitBox& rhs)
|
||||||
|
: CGameObject(rhs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXEffectHitBox::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXEffectHitBox::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXEffectHitBox::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
m_pTransformCom->RewindMomentum();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXEffectHitBox::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos));
|
||||||
|
m_vLifeTime.x += fTimeDelta;
|
||||||
|
if (m_vLifeTime.x > m_vLifeTime.y) {
|
||||||
|
m_bDead = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXEffectHitBox::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
if (true == m_pCharacter_Controller->IsActive()) {
|
||||||
|
m_pCharacter_Controller->Move(fTimeDelta);
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||||
|
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXEffectHitBox::Render()
|
||||||
|
{
|
||||||
|
//if (FAILED(Bind_ShaderResources())) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (FAILED(m_pModelCom->Render(0))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (FAILED(m_pCharacter_Controller->Render())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXEffectHitBox::Ready_Components(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
PHYSXDUMMY_DESC* pDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||||
|
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f));
|
||||||
|
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
|
||||||
|
m_vDeltaPos = pDesc->vDeltaPos;
|
||||||
|
m_vLifeTime = pDesc->vLifeTime;
|
||||||
|
{ // CCT
|
||||||
|
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||||
|
|
||||||
|
Desc.iSubKind = pDesc->iSubKind;
|
||||||
|
Desc.pTransform = m_pTransformCom;
|
||||||
|
Desc.eBodyType = ACTOR::BOX;
|
||||||
|
Desc.fContactOffset = 0.1f;
|
||||||
|
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||||
|
Desc.bAutoStepping = { false };
|
||||||
|
Desc.fStepOffset = { 0.05f };
|
||||||
|
Desc.fRadius = 0.5f;
|
||||||
|
Desc.fHeight = 1.0f;
|
||||||
|
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create();
|
||||||
|
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_EffectHitBox_Behavior::Create();
|
||||||
|
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||||
|
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||||
|
/* Com_Shader */
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||||
|
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXEffectHitBox::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_PhysXEffectHitBox* CDummy_PhysXEffectHitBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CDummy_PhysXEffectHitBox* pInstance = new CDummy_PhysXEffectHitBox(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CDummy_PhysXEffectHitBox");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGameObject* CDummy_PhysXEffectHitBox::Clone(void* pArg, CGameObject* pOwner)
|
||||||
|
{
|
||||||
|
CDummy_PhysXEffectHitBox* pInstance = new CDummy_PhysXEffectHitBox(*this);
|
||||||
|
pInstance->m_pOwner = pOwner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CDummy_PhysXEffectHitBox");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXEffectHitBox::Free()
|
||||||
|
{
|
||||||
|
if (nullptr == m_pGameInstance) {
|
||||||
|
m_pCharacter_Controller->SetActive(false);
|
||||||
|
PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition();
|
||||||
|
PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z);
|
||||||
|
m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
|
||||||
|
m_pGameInstance->Detach_Actor(*m_pCharacter_Controller->Get_Actor());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
__super::Free();
|
||||||
|
if (nullptr != m_pCallBack_Behavior) {
|
||||||
|
m_pCallBack_Behavior->Finalize();
|
||||||
|
}
|
||||||
|
if (nullptr != m_pCallBack_HitReport) {
|
||||||
|
m_pCallBack_HitReport->Finalize();
|
||||||
|
}
|
||||||
|
SAFE_RELEASE(m_pCharacter_Controller);
|
||||||
|
Safe_Delete(m_pCallBack_Behavior);
|
||||||
|
Safe_Delete(m_pCallBack_HitReport);
|
||||||
|
SAFE_RELEASE(m_pShaderCom);
|
||||||
|
SAFE_RELEASE(m_pModelCom);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXEffectHitBox::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Dummy_PhysXHitBox.h"
|
||||||
|
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
|
|
||||||
|
CDummy_PhysXHitBox::CDummy_PhysXHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CGameObject{ pDevice, pContext }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CDummy_PhysXHitBox::CDummy_PhysXHitBox(const CDummy_PhysXHitBox& rhs)
|
||||||
|
: CGameObject(rhs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXHitBox::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXHitBox::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXHitBox::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXHitBox::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXHitBox::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||||
|
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXHitBox::Render()
|
||||||
|
{
|
||||||
|
//if (FAILED(Bind_ShaderResources())) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (FAILED(m_pModelCom->Render(0))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
//}
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (FAILED(m_pRigidBody->Render())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXHitBox::Ready_Components(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
PHYSXDUMMY_DESC* pPhysXDummyDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||||
|
|
||||||
|
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPos), 1.f));
|
||||||
|
m_pTransformCom->Rotation(pPhysXDummyDesc->vRotRPY.x, pPhysXDummyDesc->vRotRPY.y, pPhysXDummyDesc->vRotRPY.z);
|
||||||
|
|
||||||
|
|
||||||
|
{ // RIGID_BODY
|
||||||
|
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||||
|
Desc.iSubKind = pPhysXDummyDesc->iSubKind;
|
||||||
|
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Com_Shader */
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||||
|
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CDummy_PhysXHitBox::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_PhysXHitBox* CDummy_PhysXHitBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CDummy_PhysXHitBox* pInstance = new CDummy_PhysXHitBox(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CDummy_PhysXHitBox");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGameObject* CDummy_PhysXHitBox::Clone(void* pArg, CGameObject* pOwner)
|
||||||
|
{
|
||||||
|
CDummy_PhysXHitBox* pInstance = new CDummy_PhysXHitBox(*this);
|
||||||
|
pInstance->m_pOwner = pOwner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CDummy_PhysXHitBox");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXHitBox::Free()
|
||||||
|
{
|
||||||
|
if (nullptr != m_pRigidBody) {
|
||||||
|
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||||
|
}
|
||||||
|
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pRigidBody);
|
||||||
|
SAFE_RELEASE(m_pShaderCom);
|
||||||
|
SAFE_RELEASE(m_pModelCom);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDummy_PhysXHitBox::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Dummy_PhysXPlayable.h"
|
#include "Dummy_PhysXPlayable.h"
|
||||||
|
#include "Dummy_PhysXEffectHitBox.h"
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
|
#include "NomalJap.h"
|
||||||
|
|
||||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext):
|
CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext):
|
||||||
CGameObject(pDevice, pContext)
|
CGameObject(pDevice, pContext)
|
||||||
@@ -48,6 +50,14 @@ void CDummy_PhysXPlayable::Update(_float fTimeDelta)
|
|||||||
m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor());
|
m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (m_pGameInstance->Key_Up(DIK_O)) {
|
||||||
|
{
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNomalJap>(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) {
|
||||||
|
assert(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
||||||
m_pCharacter_Controller->Move(fTimeDelta);
|
m_pCharacter_Controller->Move(fTimeDelta);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ HRESULT CDummy_Plane::Initialize(void* pArg)
|
|||||||
|
|
||||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -10.f, 0.f, 1.f));
|
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -10.f, 0.f, 1.f));
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +44,7 @@ void CDummy_Plane::Update(_float fTimeDelta)
|
|||||||
void CDummy_Plane::Late_Update(_float fTimeDelta)
|
void CDummy_Plane::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +62,6 @@ HRESULT CDummy_Plane::Render()
|
|||||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ HRESULT CEditEffect::Initialize(void* pArg)
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
|
||||||
|
Set_Visible(false);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,6 +41,9 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
|
|||||||
void CEditEffect::Update(_float fTimeDelta)
|
void CEditEffect::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (m_bVisible == false)
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_pInstance_ModelCom == nullptr)
|
if (m_pInstance_ModelCom == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -53,11 +58,11 @@ void CEditEffect::Update(_float fTimeDelta)
|
|||||||
void CEditEffect::Late_Update(_float fTimeDelta)
|
void CEditEffect::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_pInstance_ModelCom == nullptr)
|
if (m_bVisible == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_pInstance_ModelCom == nullptr)
|
||||||
XMStoreFloat4x4(&m_CombinedWorldMatrix , m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
return;
|
||||||
|
|
||||||
|
|
||||||
if (m_EffectInfo.isBlur == true)
|
if (m_EffectInfo.isBlur == true)
|
||||||
@@ -386,6 +391,8 @@ void CEditEffect::Describe_Entity()
|
|||||||
m_EffectInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
m_EffectInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GUI::Checkbox("Visible", &m_bVisible);
|
||||||
|
|
||||||
m_pTransformCom->Describe_Entity();
|
m_pTransformCom->Describe_Entity();
|
||||||
|
|
||||||
GUI::Checkbox("Diffuse", &m_EffectInfo.isDiffuse);
|
GUI::Checkbox("Diffuse", &m_EffectInfo.isDiffuse);
|
||||||
@@ -432,6 +439,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
||||||
|
|
||||||
GUI::Checkbox("EmissiveTex", &m_EffectInfo.isEmissive);
|
GUI::Checkbox("EmissiveTex", &m_EffectInfo.isEmissive);
|
||||||
|
GUI::Checkbox("EmissiveDissolve", &m_EffectInfo.isEmissiveDissolve);
|
||||||
|
|
||||||
if (m_EffectInfo.isEmissive)
|
if (m_EffectInfo.isEmissive)
|
||||||
{
|
{
|
||||||
@@ -609,7 +617,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
|
|
||||||
GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve);
|
GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve);
|
||||||
|
|
||||||
_string strName = m_strDissolveName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
_string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||||
|
|
||||||
if (strName != "") {
|
if (strName != "") {
|
||||||
m_strDissolveName = strName;
|
m_strDissolveName = strName;
|
||||||
@@ -715,6 +723,21 @@ void CEditEffect::Describe_Entity()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::Begin("Simple Plot");
|
||||||
|
|
||||||
|
// samples.data()와 개수, optional offset 인덱스 등 넘길 수 있음
|
||||||
|
ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100));
|
||||||
|
|
||||||
|
GUI::InputFloat("InputValue", &m_fInputValue);
|
||||||
|
|
||||||
|
if (GUI::Button("AddValue"))
|
||||||
|
{
|
||||||
|
m_ValueVector.push_back(m_fInputValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
|
||||||
|
|
||||||
GUI::Separator(); GUI::Spacing();
|
GUI::Separator(); GUI::Spacing();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
DWORD dwByte(0);
|
DWORD dwByte(0);
|
||||||
|
|
||||||
if (!ReadFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,6 +150,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
{
|
{
|
||||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc)))
|
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc)))
|
||||||
{
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,6 +161,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
size_t iComponentLength = {};
|
size_t iComponentLength = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,16 +170,22 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strDiffuseName = szName;
|
m_strDiffuseName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_EffectInfo.isNoise)
|
if (m_EffectInfo.isNoise)
|
||||||
@@ -185,6 +194,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
|
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,15 +203,18 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strNoiseName = szName;
|
m_strNoiseName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pNoise_TextureCom))))
|
||||||
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pNoise_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_EffectInfo.isMasking)
|
if (m_EffectInfo.isMasking)
|
||||||
@@ -219,15 +232,21 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strMaskingName = szName;
|
m_strMaskingName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pMasking_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pMasking_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_EffectInfo.isDissolve)
|
if (m_EffectInfo.isDissolve)
|
||||||
@@ -235,6 +254,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
size_t iComponentLength = {};
|
size_t iComponentLength = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,15 +263,23 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strDissolveName = szName;
|
m_strDissolveName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pDissolve_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pDissolve_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_EffectInfo.isEmissive)
|
if (m_EffectInfo.isEmissive)
|
||||||
@@ -259,6 +287,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
size_t iComponentLength = {};
|
size_t iComponentLength = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,15 +296,21 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strEmissiveName = szName;
|
m_strEmissiveName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pEmissive_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pEmissive_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_EffectInfo.isDistortion)
|
if (m_EffectInfo.isDistortion)
|
||||||
@@ -283,6 +318,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
size_t iComponentLength = {};
|
size_t iComponentLength = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,21 +327,28 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strDistortionName = szName;
|
m_strDistortionName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pDistortion_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pDistortion_TextureCom))))
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t iComponentLength = {};
|
size_t iComponentLength = {};
|
||||||
|
|
||||||
|
|
||||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,22 +357,27 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
|||||||
_char szName[MAX_PATH] = {};
|
_char szName[MAX_PATH] = {};
|
||||||
|
|
||||||
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)(DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)(DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strModelName = szName;
|
m_strModelName = szName;
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pInstance_ModelCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
|
|
||||||
reinterpret_cast<CComponent**>(&m_pInstance_ModelCom))))
|
|
||||||
return E_FAIL;;
|
|
||||||
|
|
||||||
m_pInstance_ModelCom->Load_InstanceModel(hFile);
|
m_pInstance_ModelCom->Load_InstanceModel(hFile);
|
||||||
|
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
|
||||||
|
|
||||||
MessageBox(NULL, L"이펙트 로드 성공", L"System Message", MB_OK);
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -561,9 +609,8 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
|||||||
HRESULT CEffectObject::Bind_ShaderResources()
|
HRESULT CEffectObject::Bind_ShaderResources()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
|
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -613,6 +660,10 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissiveDissolve", &m_EffectInfo.isEmissiveDissolve, sizeof(_bool)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user