@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_BlurWeightTexture;
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
float g_fWeights[32] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
||||
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//TODO 블러 조절 해보려햇는데 실패함..
|
||||
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == vColorTexture.a)
|
||||
{
|
||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1,500 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Land>
|
||||
<Container Name="3Broom_Ext">
|
||||
<Container Name="Key">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod3</PrototypeTag>
|
||||
<PartObject Lod_Level="2" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="5"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2" Key_Index="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Dormer_Wood_Slats</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod2</PrototypeTag>
|
||||
<Position x="-1.05" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod2</PrototypeTag>
|
||||
<Position x="1.05" y="0" z="0"/>
|
||||
<Scale x="0.99999952" y="1" z="0.99999952"/>
|
||||
<Rotation x="-0" y="180" z="-0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="3Broom_Int">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod3</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_Broom_01</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="3Broom_Ext">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="HW_GreatHall">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_FloorMain</PrototypeTag>
|
||||
<Position x="46.552219" y="0" z="38.898628"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_FloorEnd</PrototypeTag>
|
||||
<Position x="46.580196" y="-9.5367432e-07" z="66.865234"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Sconce_Gryffindor</PrototypeTag>
|
||||
<Position x="46.54007" y="0.49999908" z="68.490913"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallIntWindowB</PrototypeTag>
|
||||
<Position x="8.5603905" y="0" z="9.6546278"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallIntWindowB</PrototypeTag>
|
||||
<Position x="4.9284835" y="-9.5367432e-07" z="9.5142498"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallIntWindowC</PrototypeTag>
|
||||
<Position x="12.268991" y="0" z="9.9082165"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallPaneling</PrototypeTag>
|
||||
<Position x="10.824334" y="0" z="5.5098476"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallInt_FlatCeilingB</PrototypeTag>
|
||||
<Position x="4.8808293" y="5.9000006" z="1.8310394"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Sconce_Gryffindor</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Sconce_HufflePuff</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Sconce_Slytherin</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ShadowCaster</PrototypeTag>
|
||||
<Position x="46.50058" y="7.8999949" z="23.989874"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Table</PrototypeTag>
|
||||
<Position x="47.032993" y="0" z="50.447128"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Table</PrototypeTag>
|
||||
<Position x="39.611012" y="4.7683716e-07" z="50.22493"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Table</PrototypeTag>
|
||||
<Position x="55.278839" y="0" z="49.968864"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_TableRunnerGryff</PrototypeTag>
|
||||
<Position x="46.985992" y="9.6857548e-07" z="50.450001"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_TableRunnerHufflePuff</PrototypeTag>
|
||||
<Position x="39.449162" y="0" z="50.225445"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_TableRunnerRaven</PrototypeTag>
|
||||
<Position x="55.339188" y="0" z="49.954151"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallColumnAB</PrototypeTag>
|
||||
<Position x="58.90229" y="0" z="33.904556"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="0" y="89.999985" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallColumnAC</PrototypeTag>
|
||||
<Position x="59.996658" y="0" z="32.924282"/>
|
||||
<Scale x="0.99999988" y="1" z="0.99999988"/>
|
||||
<Rotation x="-0" y="-89.999985" z="-0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallColumnC</PrototypeTag>
|
||||
<Position x="29.750357" y="-4.7683716e-07" z="65.084366"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="-0" y="-70.000008" z="-0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallDoor</PrototypeTag>
|
||||
<Position x="52.069908" y="-4.7683716e-07" z="29.919998"/>
|
||||
<Scale x="0.99999952" y="1" z="0.99999952"/>
|
||||
<Rotation x="-0" y="-179.99998" z="-0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallDoorB</PrototypeTag>
|
||||
<Position x="44.34584" y="0" z="52.525215"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
</Land>
|
||||
|
||||
@@ -1,123 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Land>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Container Name="Key">
|
||||
<Position x="33.378426" y="0" z="36.928886"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="2" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="5"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2" Key_Index="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Object Type="1" Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_FloorMain</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_FloorMain_Lod1</PrototypeTag>
|
||||
<Position x="48.988075" y="0" z="58.2355"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_MERGED_Entry_Base_Stones.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
</Object>
|
||||
<Object Type="1" Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallWindow</PrototypeTag>
|
||||
<Position x="48.56007" y="1.9073486e-06" z="51.822701"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_MERGED_Side_Stone_Steps.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
</Object>
|
||||
<Object Type="1" Lod_Level="1">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallTimbers</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_WallTimbers_Lod1</PrototypeTag>
|
||||
<Position x="45.475964" y="1.9073486e-06" z="47.131371"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_MERGED_Winter_Kit_Icicles.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
</Object>
|
||||
<Object Type="1" Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_Table</PrototypeTag>
|
||||
<Position x="39.54475" y="0" z="69.756302"/>
|
||||
<Scale x="0.99999976" y="1" z="0.99999976"/>
|
||||
<Rotation x="0" y="89.999962" z="0"/>
|
||||
</Object>
|
||||
<Object Type="1" Lod_Level="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_GH_ShadowCaster</PrototypeTag>
|
||||
<Position x="48.098145" y="1.9073486e-06" z="37.810532"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_MERGED_Winter_Kit_Snow.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Decal.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Decal.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Snow_Winter.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Wood_Steps_B.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Wood_Steps_C.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
<Model>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors.mo</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Model>
|
||||
</Object>
|
||||
</Land>
|
||||
|
||||
|
After Width: | Height: | Size: 6.0 MiB |
|
After Width: | Height: | Size: 14 MiB |
|
After Width: | Height: | Size: 8.2 MiB |
|
After Width: | Height: | Size: 14 MiB |
|
After Width: | Height: | Size: 7.5 MiB |
|
After Width: | Height: | Size: 4.6 MiB |
|
After Width: | Height: | Size: 8.7 MiB |
|
After Width: | Height: | Size: 6.6 MiB |
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 6.8 MiB |
@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_BlurWeightTexture;
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
float g_fWeights[32] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
||||
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//TODO 블러 조절 해보려햇는데 실패함..
|
||||
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == vColorTexture.a)
|
||||
{
|
||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -304,9 +304,6 @@ PS_OUT PS_MAIN_TEST(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
float PI = 3.141592;
|
||||
|
||||
struct ParticleValue
|
||||
{
|
||||
@@ -41,10 +42,18 @@ float2 g_vMaskingUVGainAmount;
|
||||
float2 g_vDiffuseNoiseUVGainAmount;
|
||||
float2 g_vMaskNoiseUVGainAmount;
|
||||
|
||||
//
|
||||
int g_iMaskMoveLerpOption;
|
||||
int g_iDiffuseMoveLerpOption;
|
||||
int g_iMaskNoiseMoveLerpOption;
|
||||
int g_iDiffuseNoiseMoveLerpOption;
|
||||
//
|
||||
|
||||
float2 g_vUVCutting;
|
||||
float2 g_vUVMaskCutting;
|
||||
|
||||
|
||||
int g_iBlurWeight; // 블러 강도
|
||||
float g_fBlurIntensity; //블러 세기
|
||||
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
||||
|
||||
@@ -62,6 +71,47 @@ bool g_isMaskUVMove;
|
||||
|
||||
float g_fFar;
|
||||
|
||||
float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
|
||||
{
|
||||
if (iSelectOption < 0)
|
||||
return float2(0 , 0);
|
||||
|
||||
float fRatio = _fRatio;
|
||||
switch (iSelectOption)
|
||||
{
|
||||
case 0:
|
||||
fRatio = fRatio; // Linear
|
||||
break;
|
||||
case 1:
|
||||
fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가
|
||||
break;
|
||||
case 2:
|
||||
fRatio = 1 - (1 - fRatio * fRatio); // EaseOutQuad 초반에 속도 증가
|
||||
break;
|
||||
case 3:
|
||||
fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가
|
||||
break;
|
||||
case 4:
|
||||
fRatio = 1 - (1 - fRatio * fRatio * fRatio); // EaseOutCubic 더 강하게 초반 속도 증가
|
||||
break;
|
||||
case 5:
|
||||
fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선
|
||||
break;
|
||||
case 6:
|
||||
fRatio = sin(13 * PI * fRatio) * (1 - fRatio) * (1 - fRatio); // EaseInBack 뒤로갔다가 앞으로
|
||||
break;
|
||||
case 7:
|
||||
fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수
|
||||
break;
|
||||
case 8:
|
||||
fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적
|
||||
break;
|
||||
}
|
||||
|
||||
return fAmount * fRatio;
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -188,14 +238,15 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||
|
||||
if (g_isDiffuseUVMove)
|
||||
{
|
||||
UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
|
||||
{
|
||||
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||
}
|
||||
|
||||
/* 노이즈 */
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
@@ -235,8 +286,8 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
@@ -247,7 +298,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
if (g_isMaskUVMove)
|
||||
{
|
||||
if (vMaskingTime.y > 0)
|
||||
vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
|
||||
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||
}
|
||||
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
@@ -324,6 +375,7 @@ struct PS_BLUR_IN
|
||||
struct PS_BLUR_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
|
||||
|
||||
@@ -332,6 +384,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
@@ -344,31 +397,20 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
float2 UV = In.vTexcoord; // 이미지의 UV값
|
||||
|
||||
int iTotalFrame = g_vUVCutting.x * g_vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
|
||||
|
||||
int iCurrentFrame = int(fAnimIndex.x); // 현재 프레임이 어디 위치인지
|
||||
|
||||
int iFrameX = iCurrentFrame % (int) g_vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
|
||||
int iFrameY = iCurrentFrame / (int) g_vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
|
||||
|
||||
float fFreamWidth = 1.0 / g_vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
|
||||
float fFreamHeight = 1.0 / g_vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
|
||||
|
||||
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다.
|
||||
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다.
|
||||
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||
|
||||
if (g_isDiffuseUVMove)
|
||||
{
|
||||
UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
|
||||
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||
}
|
||||
|
||||
/* 노이즈 */
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
@@ -387,7 +429,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
vMtrlDiffuse += g_vColor;
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse += g_vColor;
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
@@ -402,10 +445,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
{
|
||||
float2 vMaskTexcoord = In.vTexcoord;
|
||||
|
||||
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
|
||||
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
@@ -416,7 +462,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
if (g_isMaskUVMove)
|
||||
{
|
||||
if (vMaskingTime.y > 0)
|
||||
vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
|
||||
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||
}
|
||||
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
@@ -428,6 +474,17 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||
|
||||
if (g_isDissolve == true)
|
||||
@@ -439,6 +496,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
}
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
||||
Out.vBlurWeight.r = g_iBlurWeight / 32.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -477,3 +535,7 @@ technique11 DefaultTechnique
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Effect_Editor.h" />
|
||||
<ClInclude Include="..\Public\EditEffect.h" />
|
||||
<ClInclude Include="..\Public\Information.h" />
|
||||
<ClInclude Include="..\public\Level_MapViewer.h" />
|
||||
<ClInclude Include="..\Public\LoadingWidget.h" />
|
||||
<ClInclude Include="..\public\MapContainer.h" />
|
||||
@@ -188,8 +189,6 @@
|
||||
<ClInclude Include="..\Public\EffectObject.h" />
|
||||
<ClInclude Include="..\Public\DummyRect.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Cube.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Goblin.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Goblin_Head.h" />
|
||||
<ClInclude Include="..\Public\Editor_Define.h" />
|
||||
<ClInclude Include="..\Public\Editor_Macro.h" />
|
||||
<ClInclude Include="..\Public\Editor_Struct.h" />
|
||||
@@ -238,6 +237,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Effect_Editor.cpp" />
|
||||
<ClCompile Include="..\Private\EditEffect.cpp" />
|
||||
<ClCompile Include="..\Private\Information.cpp" />
|
||||
<ClCompile Include="..\private\Level_MapViewer.cpp" />
|
||||
<ClCompile Include="..\Private\LoadingWidget.cpp" />
|
||||
<ClCompile Include="..\private\MapContainer.cpp" />
|
||||
@@ -254,7 +254,6 @@
|
||||
<ClCompile Include="..\Private\EffectObject.cpp" />
|
||||
<ClCompile Include="..\Private\DummyRect.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Cube.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Goblin.cpp" />
|
||||
<ClCompile Include="..\Private\Hair.cpp" />
|
||||
<ClCompile Include="..\Private\Loader.cpp" />
|
||||
<ClCompile Include="..\Private\Level_EffectViewer.cpp" />
|
||||
@@ -263,7 +262,6 @@
|
||||
<ClCompile Include="..\private\Loading_Panel.cpp" />
|
||||
<ClCompile Include="..\private\MiniMap_Panel.cpp" />
|
||||
<ClCompile Include="..\private\MiniMap_TrimBorder.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Goblin_Head.cpp" />
|
||||
<ClCompile Include="..\Private\Head.cpp" />
|
||||
<ClCompile Include="..\private\Mission_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||
|
||||
@@ -67,12 +67,6 @@
|
||||
<Filter Include="50.UI\Mouse_Cursor">
|
||||
<UniqueIdentifier>{b5d188ff-5925-40bd-8da4-2ed00c89f730}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummy_Goblin">
|
||||
<UniqueIdentifier>{0ebb9c08-69b0-49b6-bac3-c827ca13319a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummy_Goblin\Dummy_Goblin_Head">
|
||||
<UniqueIdentifier>{69af10ea-e8f1-4455-9435-93857b7eb198}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\ModelParts">
|
||||
<UniqueIdentifier>{a04e88c3-dabb-4a91-8b9f-ce7f5562def6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -252,18 +246,12 @@
|
||||
<ClInclude Include="..\public\Mouse_Cursor.h">
|
||||
<Filter>50.UI\Mouse_Cursor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_Goblin.h">
|
||||
<Filter>02.GameObjects\Dummy_Goblin</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_ObjectViewer.h">
|
||||
<Filter>01.Level\20.ObjectViewer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_Cube.h">
|
||||
<Filter>02.GameObjects\Dummys\DummyCube</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_Goblin_Head.h">
|
||||
<Filter>02.GameObjects\Dummy_Goblin\Dummy_Goblin_Head</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Body.h">
|
||||
<Filter>02.GameObjects\ModelParts\Body</Filter>
|
||||
</ClInclude>
|
||||
@@ -405,6 +393,9 @@
|
||||
<ClInclude Include="..\public\DummySkyBox.h">
|
||||
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Information.h">
|
||||
<Filter>03.Information</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -445,18 +436,12 @@
|
||||
<ClCompile Include="..\private\Mouse_Cursor.cpp">
|
||||
<Filter>50.UI\Mouse_Cursor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_Goblin.cpp">
|
||||
<Filter>02.GameObjects\Dummy_Goblin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_ObjectViewer.cpp">
|
||||
<Filter>01.Level\20.ObjectViewer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_Cube.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DummyCube</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_Goblin_Head.cpp">
|
||||
<Filter>02.GameObjects\Dummy_Goblin\Dummy_Goblin_Head</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Body.cpp">
|
||||
<Filter>02.GameObjects\ModelParts\Body</Filter>
|
||||
</ClCompile>
|
||||
@@ -604,6 +589,9 @@
|
||||
<ClCompile Include="..\private\DummySkyBox.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DummySkyBox</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Information.cpp">
|
||||
<Filter>03.Information</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
CBuildingContainer::CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CMapContainer(pDevice, pContext)
|
||||
@@ -139,7 +140,6 @@ void CBuildingContainer::Describe_Entity()
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
|
||||
CDummy_Goblin::CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject( pDevice, pContext )
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_Goblin::CDummy_Goblin(const CDummy_Goblin& Prototype)
|
||||
: CGameObject( Prototype )
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummy_Goblin::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummy_Goblin::Update(_float fTimeDelta)
|
||||
{
|
||||
//m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CDummy_Goblin::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
//m_pShaderCom->Bind_SRV("g_NormalTexture", nullptr);
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_Goblin* CDummy_Goblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_Goblin* pInstance = new CDummy_Goblin(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_Goblin");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_Goblin::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_Goblin* pInstance = new CDummy_Goblin(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_Goblin");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_Goblin::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Release(m_pShaderCom);
|
||||
Safe_Release(m_pModelCom);
|
||||
}
|
||||
|
||||
void CDummy_Goblin::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_Goblin_Head.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
|
||||
CDummy_Goblin_Head::CDummy_Goblin_Head(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_Goblin_Head::CDummy_Goblin_Head(const CDummy_Goblin_Head& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummy_Goblin_Head::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummy_Goblin_Head::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pOwner->Get_Component<CModel>()->Play_Animation(fTimeDelta);
|
||||
m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CDummy_Goblin_Head::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinHead_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_Goblin_Head* CDummy_Goblin_Head::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_Goblin_Head* pInstance = new CDummy_Goblin_Head(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_Goblin_Head");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_Goblin_Head::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_Goblin_Head* pInstance = new CDummy_Goblin_Head(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_Goblin_Head");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_Goblin_Head::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Release(m_pShaderCom);
|
||||
Safe_Release(m_pModelCom);
|
||||
}
|
||||
|
||||
void CDummy_Goblin_Head::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -43,8 +43,9 @@ void CDummy_PhysXBox::Update(_float fTimeDelta)
|
||||
|
||||
void CDummy_PhysXBox::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
//_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
//m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXBox::Render()
|
||||
@@ -53,26 +54,21 @@ HRESULT CDummy_PhysXBox::Render()
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
//_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
//for (_uint i = 0; i < iNumMeshes; i++)
|
||||
//{
|
||||
// if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
|
||||
// if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
|
||||
// if (FAILED(m_pModelCom->Render(i))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// 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;
|
||||
@@ -91,39 +87,40 @@ HRESULT CDummy_PhysXBox::Ready_Components(void* pArg)
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody::RIGIDBODY_DESC Desc{};
|
||||
Desc.tRigidDynamicDesc.bIsKinematic = false;
|
||||
Desc.tRigidDynamicDesc.fDensity = 1000.f;
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pActor = m_pGameInstance->Add_DynamicActor(*m_pRigidBody);
|
||||
if (nullptr == m_pActor) {
|
||||
assert(false);
|
||||
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_PhysXBox::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_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -158,8 +155,8 @@ void CDummy_PhysXBox::Free()
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
//SAFE_RELEASE(m_pModelCom);
|
||||
//SAFE_RELEASE(m_pShaderCom);
|
||||
Safe_Release(m_pShaderCom);
|
||||
Safe_Release(m_pModelCom);
|
||||
}
|
||||
|
||||
void CDummy_PhysXBox::Describe_Entity()
|
||||
|
||||
@@ -34,32 +34,6 @@ HRESULT CDummy_PhysXMesh::Initialize(void* pArg)
|
||||
|
||||
void CDummy_PhysXMesh::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_F2)) {
|
||||
CModel* pModel = Get_Component<CModel>();
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
pModel->Save_PhysXTriMeshes("../Bin/Resources/Models/River/River.bin");
|
||||
|
||||
CRigidBody::RIGIDBODY_DESC Desc{};
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
for (_uint i = 0; i < iNumMesh; ++i)
|
||||
{ // RIGID_BODY
|
||||
Desc.tRigidStaticDesc.szMeshName = pModel->Get_MeshName(i);
|
||||
|
||||
Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(pModel->Get_MeshName(i)).c_str(), nullptr, &Desc);
|
||||
}
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F3)) {
|
||||
CModel* pModel = Get_Component<CModel>();
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
CRigidBody::RIGIDBODY_DESC Desc{};
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
for (_uint i = 0; i < iNumMesh; ++i)
|
||||
{ // RIGID_BODY
|
||||
Desc.tRigidStaticDesc.szMeshName = pModel->Get_MeshName(i);
|
||||
|
||||
Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(pModel->Get_MeshName(i)).c_str(), nullptr, &Desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDummy_PhysXMesh::Update(_float fTimeDelta)
|
||||
|
||||
@@ -16,29 +16,32 @@ CDummy_PhysXPlayable::CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs):
|
||||
void CDummy_PhysXPlayable::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
if (m_pGameInstance->Key_Pressing(DIK_UPARROW)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, 1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(-1.f, 0.f, 0.f, 0.f));
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LEFT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(-1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, -1.f, 0.f));
|
||||
if (m_pGameInstance->Key_Pressing(DIK_DOWN)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, -1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(1.f, 0.f, 0.f, 0.f));
|
||||
if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 10.f, 0.f, 0.f));
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -10.f, 0.f, 0.f));
|
||||
}
|
||||
//m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY, 0.f, 0.f));
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -52,34 +55,25 @@ void CDummy_PhysXPlayable::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
//if (FAILED(Bind_ShaderResources())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
//m_pShaderCom->Bind_SRV("g_NormalTexture", nullptr);
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
//if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -104,9 +98,16 @@ HRESULT CDummy_PhysXPlayable::Initialize(void* pArg)
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(nullptr))) {
|
||||
CTransform::TRANSFORM_DESC TransformDesc{};
|
||||
TransformDesc.fRadius = 100.f;
|
||||
TransformDesc.fRotationPerSec = XMConvertToRadians(60.f);
|
||||
TransformDesc.fSpeedPerSec = 30.f;
|
||||
if (FAILED(__super::Ready_Components(&TransformDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
PlayableSTARTPOS_DESC* pDesc = static_cast<PlayableSTARTPOS_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);
|
||||
{
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
@@ -116,22 +117,24 @@ HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.tCapsuleInfo.fRadius = 1.5f;
|
||||
Desc.tCapsuleInfo.fHeight = 3.0f;
|
||||
Desc.tCapsuleInfo.fRadius = 0.5f;
|
||||
Desc.tCapsuleInfo.fHeight = 1.0f;
|
||||
Desc.tCapsuleInfo.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_ANIMMESH,
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
//m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
|
||||
void CEditEffect::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
Reference_Mat_For_EditEffect();
|
||||
|
||||
|
||||
if (m_isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
@@ -69,7 +69,7 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
|
||||
void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
{
|
||||
ImGui::Begin("Reference Material");
|
||||
|
||||
|
||||
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" };
|
||||
|
||||
@@ -93,7 +93,7 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -148,12 +148,7 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
||||
|
||||
//트레일 만들기
|
||||
//사인 러프
|
||||
//머테리얼 바인딩
|
||||
//블러가 디졸브에 안사라짐
|
||||
//루프 빌보드
|
||||
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
||||
|
||||
_int iCurrentItem = static_cast<_int>(m_eRenderOrder);
|
||||
@@ -169,7 +164,7 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("Masking", &m_isMasking);
|
||||
GUI::Checkbox("Dissolve", &m_isDissolve);
|
||||
GUI::Checkbox("Noise", &m_isNoise);
|
||||
GUI::Checkbox("Blur", &m_isBlur);
|
||||
|
||||
|
||||
if (GUI::Checkbox("Billboard", &m_isBillboard))
|
||||
{
|
||||
@@ -184,8 +179,13 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("BLUR"))
|
||||
{
|
||||
GUI::Checkbox("Blur", &m_isBlur);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_iBlurWeight, 1.f, 0, 32);
|
||||
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
@@ -194,11 +194,11 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("EMISSIVE"))
|
||||
{
|
||||
const char* pCompute[] = { "EQUL" , "PLUS", "SUBSTRACT", "MULTY" , "DIV" };
|
||||
const char* pCompute[] = {"NONE", "DIV" , "PLUS", "SUBSTRACT", "MULTY" , "EQUL" };
|
||||
|
||||
_int iColorOption = (_int)m_fColorOption;
|
||||
|
||||
if (ImGui::Combo("OPTION", &iColorOption, pCompute, 5))
|
||||
if (ImGui::Combo("OPTION", &iColorOption, pCompute , 6))
|
||||
{
|
||||
m_fColorOption = (_float)iColorOption;
|
||||
}
|
||||
@@ -243,12 +243,28 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
||||
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
||||
|
||||
|
||||
|
||||
_int iDiffuseMoveLerpOption = (_int)m_iDiffuseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
||||
if (GUI::TreeNode("DIFFUSE_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
|
||||
@@ -267,11 +283,27 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
|
||||
_int iMaskMoveLerpOption = (_int)m_iMaskMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iMaskMoveLerpOption = iMaskMoveLerpOption;
|
||||
}
|
||||
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
if (GUI::TreeNode("MASKING_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
||||
GUI::TreePop();
|
||||
}
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
|
||||
GUI::TreePop();
|
||||
@@ -282,8 +314,11 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("DISSOLVE"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||
|
||||
if (GUI::TreeNode("DISSOLV_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||
GUI::TreePop();
|
||||
}
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
|
||||
GUI::TreePop();
|
||||
@@ -295,11 +330,40 @@ void CEditEffect::Describe_Entity()
|
||||
if (GUI::TreeNode("NOISE"))
|
||||
{
|
||||
ImGui::PushItemWidth(80);
|
||||
|
||||
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
||||
|
||||
_int iDiffuseNoiseMoveLerpOption = (_int)m_iDiffuseNoiseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp DiffuseNoiseMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iDiffuseNoiseMoveLerpOption = iDiffuseNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
|
||||
|
||||
_int iMaskNoiseMoveLerpOption = (_int)m_iMaskNoiseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskNoiseMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iMaskNoiseMoveLerpOption = iMaskNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
||||
if (GUI::TreeNode("NOISE_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#include "GameInstance.h"
|
||||
|
||||
CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
:CPartObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CEffectObject::CEffectObject(const CEffectObject& rhs)
|
||||
:CGameObject(rhs)
|
||||
:CPartObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -66,6 +66,12 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_iBlurWeight, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
@@ -174,6 +180,26 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_iMaskMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_iDiffuseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskNoiseMoveLerpOption", &m_iMaskNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseNoiseMoveLerpOption", &m_iDiffuseNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
{
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
#include <sstream>
|
||||
|
||||
CEffect_Editor::CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffectObject{ pDevice, pContext }
|
||||
: CContainerObject{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs)
|
||||
: CEffectObject(rhs)
|
||||
: CContainerObject(rhs)
|
||||
, m_MatFiles(rhs.m_MatFiles)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,8 @@ HRESULT CEffect_Editor::Initialize_Prototype()
|
||||
{
|
||||
|
||||
|
||||
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Base_Mat");
|
||||
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Mat_Instance");
|
||||
ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Protego");
|
||||
|
||||
|
||||
for (auto iter : m_MatFiles)
|
||||
{
|
||||
@@ -38,6 +38,7 @@ HRESULT CEffect_Editor::Initialize_Prototype()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
@@ -60,17 +61,19 @@ HRESULT CEffect_Editor::Initialize(void* pArg)
|
||||
|
||||
void CEffect_Editor::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CEffect_Editor::Update(_float fTimeDelta)
|
||||
{
|
||||
Describe_Entity();
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CEffect_Editor::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CEffect_Editor::Ready_Components(void* pArg)
|
||||
@@ -84,9 +87,20 @@ HRESULT CEffect_Editor::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CEffect_Editor::Ready_Child()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEditEffect>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_EFFECT, nullptr, this, reinterpret_cast<CEditEffect**>(&m_pEditEffect))))
|
||||
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_strCurrentEffectName = "EffectObject0";
|
||||
SAFE_RELEASE(m_pEditEffect);
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -310,17 +324,136 @@ CGameObject* CEffect_Editor::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CEffect_Editor::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pEditEffect);
|
||||
}
|
||||
|
||||
void CEffect_Editor::Describe_Entity()
|
||||
{
|
||||
ImGui::Begin("Effect Editor");
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 1.f, 1.f), m_strCurrentEffectName.c_str());
|
||||
|
||||
if (m_pEditEffect != nullptr)
|
||||
m_pEditEffect->Describe_Entity();
|
||||
|
||||
ImGui::End();
|
||||
|
||||
ImGui::Begin("Reference Material");
|
||||
|
||||
if (m_pEditEffect != nullptr)
|
||||
m_pEditEffect->Reference_Mat_For_EditEffect();
|
||||
|
||||
ImGui::End();
|
||||
|
||||
ImGui::Begin("Effect Hierarchy");
|
||||
|
||||
#pragma region PopUp
|
||||
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
|
||||
ImGui::OpenPopup("Effect Hierarchy");
|
||||
|
||||
|
||||
if (ImGui::BeginPopup("Effect Hierarchy"))
|
||||
{
|
||||
if (ImGui::MenuItem("Create Effect"))
|
||||
{
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc)))
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
_int iIndex = {};
|
||||
|
||||
for (auto& pPartObject : m_PartObjects)
|
||||
{
|
||||
_string strName = "EffectObject" + to_string(iIndex);
|
||||
|
||||
if (GUI::TreeNode(strName.c_str()))
|
||||
{
|
||||
|
||||
#pragma region PopUp
|
||||
|
||||
if (GUI::IsItemClicked(ImGuiMouseButton_Right))
|
||||
GUI::OpenPopup(strName.c_str());
|
||||
|
||||
|
||||
if (GUI::BeginPopup(strName.c_str()))
|
||||
{
|
||||
|
||||
if (ImGui::MenuItem("Delete Effect"))
|
||||
{
|
||||
auto iter = m_PartObjects.begin();
|
||||
advance(iter, iIndex); // 이터레이터를 증가시킨다
|
||||
|
||||
SAFE_RELEASE(pPartObject.second);
|
||||
m_PartObjects.erase(iter);
|
||||
|
||||
GUI::EndPopup();
|
||||
GUI::TreePop();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GUI::EndPopup();
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
if (GUI::IsItemClicked()) // 선택창에 띄우기
|
||||
{
|
||||
CEditEffect* pSelectedEffectObject = dynamic_cast<CEditEffect*>(pPartObject.second);
|
||||
|
||||
if (pSelectedEffectObject == nullptr)
|
||||
{
|
||||
GUI::TreePop();
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (m_pEditEffect == pSelectedEffectObject)
|
||||
{
|
||||
GUI::TreePop();
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Safe_Release(m_pEditEffect);
|
||||
|
||||
m_pEditEffect = pSelectedEffectObject;
|
||||
|
||||
Safe_AddRef(pSelectedEffectObject);
|
||||
|
||||
m_strCurrentEffectName = strName;
|
||||
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
HRESULT CEffect_Editor::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "Information.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CInformation)
|
||||
|
||||
|
||||
HRESULT CInformation::Initialize_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
m_pDevice = pDevice;
|
||||
m_pContext = pContext;
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInformation::Release_Info()
|
||||
{
|
||||
if (nullptr == s_pInstance) {
|
||||
return S_OK;
|
||||
}
|
||||
DestroyInstance();
|
||||
|
||||
//SAFE_RELEASE();
|
||||
//SAFE_RELEASE();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CInformation::strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents)
|
||||
{
|
||||
assert(iCurrentIndex < contents.size());
|
||||
assert(iCurrentIndex >= 0);
|
||||
return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char*
|
||||
{
|
||||
auto vec = static_cast<vector<_string>*>(data);
|
||||
return (*vec)[iIndex].c_str();
|
||||
}, &contents, (_int)(contents.size())
|
||||
);
|
||||
}
|
||||
|
||||
_bool CInformation::wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents)
|
||||
{
|
||||
assert(iCurrentIndex < contents.size());
|
||||
assert(iCurrentIndex >= 0);
|
||||
return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char*
|
||||
{
|
||||
auto vec = static_cast<vector<_wstring>*>(data);
|
||||
return CMyTools::ToString((*vec)[iIndex]).c_str();
|
||||
}, &contents, (_int)(contents.size())
|
||||
);
|
||||
}
|
||||
|
||||
void CInformation::Log_Render()
|
||||
{
|
||||
GUI::Begin("Log");
|
||||
GUI::Text(m_strLog.c_str());
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CInformation::Log_Push(const _char* pContents)
|
||||
{
|
||||
m_strLog.append(_string("\n") + pContents);
|
||||
}
|
||||
|
||||
void CInformation::Log_Clear()
|
||||
{
|
||||
m_strLog.clear();
|
||||
}
|
||||
|
||||
CInformation::CInformation()
|
||||
{
|
||||
}
|
||||
|
||||
void CInformation::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "DummyObject.h"
|
||||
#include "DummySkyBox.h"
|
||||
|
||||
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -46,7 +47,9 @@ void CLevel_ObjectViewer::Update(_float fTimeDelta)
|
||||
|
||||
Show_AnimList();
|
||||
|
||||
Object_Setting();
|
||||
Dummy_Object_Setting();
|
||||
|
||||
Parts_Object_Setting();
|
||||
}
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Render()
|
||||
@@ -76,19 +79,20 @@ void CLevel_ObjectViewer::Add_Parts()
|
||||
{
|
||||
if (GUI::BeginTabBar("##MaleTabBar"))
|
||||
{
|
||||
if (GUI::BeginTabItem("Head"))
|
||||
if (GUI::BeginTabItem("Body"))
|
||||
{
|
||||
Category_PartsModelList("Human/Head/Male", "Head");
|
||||
Category_PartsModelList("Human/Body/Male", "Body");
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
|
||||
_bool bDisabled = {};
|
||||
if (m_HumanRoot)
|
||||
bDisabled = (m_HumanRoot->Get_MainModel());
|
||||
if (!bDisabled) GUI::BeginDisabled();
|
||||
if (GUI::BeginTabItem("Body"))
|
||||
if (GUI::BeginTabItem("Head"))
|
||||
{
|
||||
Category_PartsModelList("Human/Body/Male", "Body");
|
||||
Category_PartsModelList("Human/Head/Male", "Head");
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
@@ -97,6 +101,9 @@ void CLevel_ObjectViewer::Add_Parts()
|
||||
{
|
||||
Category_PartsModelList("Human/Hair/Male", "Hair");
|
||||
|
||||
if (m_HumanRoot)
|
||||
m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
if (!bDisabled) GUI::EndDisabled();
|
||||
@@ -109,19 +116,20 @@ void CLevel_ObjectViewer::Add_Parts()
|
||||
{
|
||||
if (GUI::BeginTabBar("##FeMaleTabBar"))
|
||||
{
|
||||
if (GUI::BeginTabItem("Head"))
|
||||
if (GUI::BeginTabItem("Body"))
|
||||
{
|
||||
Category_PartsModelList("Human/Head/FeMale", "Head");
|
||||
Category_PartsModelList("Human/Body/FeMale", "Body");
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
|
||||
_bool bDisabled = {};
|
||||
if (m_HumanRoot)
|
||||
bDisabled = (m_HumanRoot->Get_MainModel());
|
||||
if (!bDisabled) GUI::BeginDisabled();
|
||||
if (GUI::BeginTabItem("Body"))
|
||||
if (GUI::BeginTabItem("Head"))
|
||||
{
|
||||
Category_PartsModelList("Human/Body/FeMale", "Body");
|
||||
Category_PartsModelList("Human/Head/FeMale", "Head");
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
@@ -130,6 +138,9 @@ void CLevel_ObjectViewer::Add_Parts()
|
||||
{
|
||||
Category_PartsModelList("Human/Hair/FeMale", "Hair");
|
||||
|
||||
if (m_HumanRoot)
|
||||
m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
if (!bDisabled) GUI::EndDisabled();
|
||||
@@ -149,6 +160,8 @@ void CLevel_ObjectViewer::Show_ModelFilePath()
|
||||
Category_ModelList("Monster");
|
||||
|
||||
Category_ModelList("Human");
|
||||
|
||||
Category_ModelList("Object");
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();
|
||||
@@ -214,8 +227,6 @@ void CLevel_ObjectViewer::Category_PartsModelList(const _char* Category, const _
|
||||
{
|
||||
if (GUI::Button(szCategory))
|
||||
{
|
||||
Save_LayerName(Layer);
|
||||
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
|
||||
CDummyObject::PARTS_OBJECT_DESC Desc = {};
|
||||
@@ -225,10 +236,10 @@ void CLevel_ObjectViewer::Category_PartsModelList(const _char* Category, const _
|
||||
m_HumanRoot->Set_ModelName(szCategory);
|
||||
|
||||
_uint iIndex = 0;
|
||||
if (strstr(szCategory,"Head"))
|
||||
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HEAD);
|
||||
else if (strstr(szCategory,"Body"))
|
||||
if (strstr(szCategory,"Body"))
|
||||
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::BODY);
|
||||
else if (strstr(szCategory,"Head"))
|
||||
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HEAD);
|
||||
else if (strstr(szCategory,"Hair"))
|
||||
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR);
|
||||
|
||||
@@ -250,6 +261,7 @@ void CLevel_ObjectViewer::Show_AnimList()
|
||||
if (GUI::Button(pModel->Get_AnimList(i)))
|
||||
{
|
||||
pModel->Set_AnimationIndex(i);
|
||||
pModel->Set_CurrentTrackPosition(0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +293,7 @@ void CLevel_ObjectViewer::Show_ObjectList()
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Object_Setting()
|
||||
void CLevel_ObjectViewer::Dummy_Object_Setting()
|
||||
{
|
||||
GUI::Begin("Object_Info");
|
||||
if (!m_Objects.empty())
|
||||
@@ -308,15 +320,20 @@ void CLevel_ObjectViewer::Object_Setting()
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Parts_Object_Setting()
|
||||
{
|
||||
GUI::Begin("PartsObject_Info");
|
||||
if (m_HumanRoot)
|
||||
{
|
||||
CModel* pModel = m_HumanRoot->Get_MainModel();
|
||||
if (pModel)
|
||||
{
|
||||
_float AnimTrack = pModel->Get_CurrentTrackPosition();
|
||||
GUI::DragFloat("AnimTrack", &AnimTrack);
|
||||
GUI::Button(pModel->Get_AnimList(pModel->Get_AnimIndex()));
|
||||
|
||||
_float KeyFrame = pModel->Get_CurrentTrackPosition();
|
||||
GUI::DragFloat("KeyFrame", &KeyFrame);
|
||||
|
||||
_float AnimSpeed = pModel->Get_AnimSpeed();
|
||||
GUI::DragFloat("AnimSpeed", &AnimSpeed, 0.1f);
|
||||
@@ -328,36 +345,64 @@ void CLevel_ObjectViewer::Object_Setting()
|
||||
pModel->Set_PlayAnim(bPlayAnim);
|
||||
}
|
||||
|
||||
if (GUI::Button("Add Event"))
|
||||
if (GUI::Button("Load KeyFrame"))
|
||||
{
|
||||
m_fAnimFrame = m_HumanRoot->Get_MainModel()->Get_CurrentTrackPosition();
|
||||
Load_KeyFrame();
|
||||
}
|
||||
|
||||
GUI::DragFloat("Anim Frame", &m_fAnimFrame);
|
||||
GUI::SameLine();
|
||||
if(GUI::Button("Event"))
|
||||
{
|
||||
static _char EventName[64] = {};
|
||||
|
||||
GUI::InputText("EventName", EventName, sizeof(EventName));
|
||||
GUI::SameLine();
|
||||
|
||||
if (GUI::Button("Save KeyFrame"))
|
||||
{
|
||||
if (m_HumanRoot && m_HumanRoot->Get_MainModel())
|
||||
{
|
||||
_float fKeyFrame = m_HumanRoot->Get_MainModel()->Get_CurrentTrackPosition();
|
||||
m_KeyFrame.push_back(fKeyFrame);
|
||||
m_Events.emplace_back(EventName);
|
||||
|
||||
FILE* fp = nullptr;
|
||||
fopen_s(&fp, "../Bin/Resources/Models/KeyFrame.bin", "wb");
|
||||
if (!fp) return;
|
||||
|
||||
_uint KeyFrameSize = (_uint)m_KeyFrame.size();
|
||||
|
||||
fwrite(&KeyFrameSize, sizeof(_uint), 1, fp);
|
||||
|
||||
for (size_t i = 0; i < m_KeyFrame.size(); i++)
|
||||
{
|
||||
_uint EventSize = (_uint)m_Events[i].size();
|
||||
fwrite(&m_KeyFrame[i], sizeof(_float), 1, fp);
|
||||
fwrite(&EventSize, sizeof(_uint), 1, fp);
|
||||
fwrite(&m_Events[i], sizeof(_string), 1, fp);
|
||||
}
|
||||
|
||||
|
||||
fclose(fp);
|
||||
|
||||
EventName[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_KeyFrame.size(); ++i)
|
||||
{
|
||||
ImDrawList* draw = ImGui::GetForegroundDrawList();
|
||||
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
|
||||
float scale = 50.f;
|
||||
|
||||
draw->AddLine(center, ImVec2(center.x + scale, center.y), IM_COL32(255, 0, 0, 255), 2.0f);
|
||||
draw->AddLine(center, ImVec2(center.x, center.y - scale), IM_COL32(0, 255, 0, 255), 2.0f);
|
||||
draw->AddLine(center, ImVec2(center.x + scale * 0.5f, center.y + scale * 0.5f), IM_COL32(0, 0, 255, 255), 2.0f);
|
||||
GUI::DragFloat(m_Events[i].c_str(), &m_KeyFrame[i]);
|
||||
}
|
||||
|
||||
|
||||
if (GUI::Button("Delete"))
|
||||
{
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_Root"))->Clear_Layer();
|
||||
m_HumanRoot = nullptr;
|
||||
m_KeyFrame.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_HumanRoot)
|
||||
|
||||
m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
|
||||
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
@@ -386,6 +431,30 @@ _wchar* CLevel_ObjectViewer::Save_ModelName(const _char* Category)
|
||||
return m_wszName;
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Load_KeyFrame()
|
||||
{
|
||||
FILE* fp = nullptr;
|
||||
fopen_s(&fp, "../Bin/Resources/Models/KeyFrame.bin", "rb");
|
||||
if (!fp) return;
|
||||
|
||||
_uint KeyFameSize = {};
|
||||
_uint EventLen = {};
|
||||
|
||||
fread(&KeyFameSize, sizeof(_uint), 1, fp);
|
||||
|
||||
for (size_t i = 0; i < KeyFameSize; i++)
|
||||
{
|
||||
fread(&m_fKeyFrame, sizeof(_float), 1, fp);
|
||||
fread(&EventLen, sizeof(_uint), 1, fp);
|
||||
fread(&m_strEvent, sizeof(_string), 1, fp);
|
||||
|
||||
m_Events.push_back(m_strEvent);
|
||||
m_KeyFrame.push_back(m_fKeyFrame);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
{
|
||||
CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
|
||||
@@ -428,7 +497,7 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Cube>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummySkyBox>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -97,24 +97,24 @@ HRESULT CLevel_PhysXLab::Ready_Layer_Terrain(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_PhysXLab::Ready_Layer_PhysXObjects(const _wstring& strLayerTag)
|
||||
{
|
||||
//for (int i = 0; i < 50; ++i) {
|
||||
// CDummy_PhysXBox::BOXSTARTPOS_DESC Desc{};
|
||||
// Desc.vPos = { m_pGameInstance->Random_Float(0.f, 30.f), m_pGameInstance->Random_Float(3.f, 33.f), m_pGameInstance->Random_Float(0.f, 30.f) };
|
||||
// Desc.vRotRPY = { m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI) };
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
CDummy_PhysXBox::BOXSTARTPOS_DESC Desc{};
|
||||
Desc.vPos = { m_pGameInstance->Random_Float(0.f, 30.f), m_pGameInstance->Random_Float(3.f, 33.f), m_pGameInstance->Random_Float(0.f, 30.f) };
|
||||
Desc.vRotRPY = { m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI) };
|
||||
|
||||
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXBox>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//{
|
||||
// CDummy_PhysXPlayable::BOXSTARTPOS_DESC Desc{};
|
||||
// Desc.vPos = { 0.f, 10.f, 0.f };
|
||||
// Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXPlayable>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER, &Desc))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXBox>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CDummy_PhysXPlayable::PlayableSTARTPOS_DESC Desc{};
|
||||
Desc.vPos = { 0.f, 100.f, 0.f };
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXPlayable>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
//{
|
||||
// CDummy_PhysXMesh::BOXSTARTPOS_DESC Desc{};
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "Head.h"
|
||||
#include "Body.h"
|
||||
#include "Hair.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "DummySkyBox.h"
|
||||
#include "DummyObject.h"
|
||||
#include <filesystem>
|
||||
@@ -50,6 +49,8 @@
|
||||
#include "MapObject_Static.h"
|
||||
#include "MapObject_LOD.h"
|
||||
#include "MapObject_Manager.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Static.h"
|
||||
#pragma endregion
|
||||
|
||||
|
||||
@@ -436,7 +437,7 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
@@ -494,23 +495,23 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
|
||||
{
|
||||
CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{};
|
||||
Desc.tRigidDynamicDesc.bExclusive = false;
|
||||
Desc.tRigidDynamicDesc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.tRigidDynamicDesc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.tRigidDynamicDesc.ePxShapeFlag = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 1.f, 1.f, 1.f };
|
||||
Desc.fDensity = 10.f;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_River_Col_Model"),
|
||||
// //CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, "../Bin/Resources/Models/River/River.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))){
|
||||
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, "../Bin/Resources/Models/River/River.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))){
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -525,17 +526,17 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"),
|
||||
// CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity())))){
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef 기무리
|
||||
vector<_wstring> ModelPrototypeTags = {};
|
||||
vector<filesystem::path> ModelPrototypePath = {};
|
||||
|
||||
//for (const auto& file : filesystem::directory_iterator("..\\Bin\\Resources\\Models\\MapMesh"))
|
||||
for (const auto& file : filesystem::directory_iterator("C:\\Users\\kimnuri\\Desktop\\Hogwart\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain"))
|
||||
for (const auto& file : filesystem::directory_iterator("C:\\Users\\kimnuri\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain"))
|
||||
{
|
||||
if (file.is_directory()){
|
||||
continue;
|
||||
@@ -568,10 +569,16 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
|
||||
CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{};
|
||||
for (_uint i = 0; i < iNumMesh; ++i) {
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
Desc.tRigidStaticDesc.szMeshName = pModel->Get_MeshName(i);
|
||||
Desc.tRigidStaticDesc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(Desc.tRigidStaticDesc.szMeshName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
_string strDestName = pModel->Get_MeshName(i) + to_string(i);
|
||||
{
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.f;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -707,16 +714,9 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_F_Hair1_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/FeMale/F_Hair1/F_Hair1.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
#pragma region MONSTER
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
@@ -726,6 +726,21 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Dragon_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon.bin", XMMatrixScaling(0.0005f, 0.0005f, 0.0005f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_SkyboxModel */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Desc_Box"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity()))))
|
||||
@@ -761,8 +776,8 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummyObject>(g_iStaticLevel, CDummyObject::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Dummy_Cube */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Cube>(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext))))
|
||||
/* For.Prototype_GameObject_DummySkyBox */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummySkyBox>(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
m_strMessage = TEXT("Loading Success!");
|
||||
@@ -825,12 +840,19 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
|
||||
|
||||
CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{};
|
||||
for (_uint i = 0; i < iNumMesh; ++i) {
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
Desc.tRigidStaticDesc.szMeshName = pModel->Get_MeshName(i);
|
||||
Desc.tRigidStaticDesc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(Desc.tRigidStaticDesc.szMeshName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
_string strDestName = pModel->Get_MeshName(i) + to_string(i);
|
||||
{
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.f;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -862,6 +884,14 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapObject_LOD>(g_iStaticLevel, CMapObject_LOD::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Interactable */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Interactable>(g_iStaticLevel, CMapElement_Interactable::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Static */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Static>(g_iStaticLevel, CMapElement_Static::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Terrain */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTerrain>(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -70,6 +70,7 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
|
||||
// <PartObject>
|
||||
tinyxml2::XMLElement* PartObject = Doc.NewElement("PartObject");
|
||||
PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
|
||||
PartObject->SetAttribute("Key_Index", pMapObject->Get_iKeyIndex());
|
||||
Container->InsertEndChild(PartObject);
|
||||
|
||||
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
|
||||
@@ -110,7 +111,6 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
|
||||
RotationElem->SetAttribute("y", vRotation.y);
|
||||
RotationElem->SetAttribute("z", vRotation.z);
|
||||
PartObject->InsertEndChild(RotationElem);
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -13,6 +13,14 @@ CMapElement::CMapElement(const CMapElement& rhs)
|
||||
{
|
||||
}
|
||||
|
||||
const _wstring& CMapElement::Get_PrototypeTag(_uint iIndex)
|
||||
{
|
||||
if (m_iMaxLodLevel < iIndex)
|
||||
return m_ModelPrototypeTags[0];
|
||||
|
||||
return m_ModelPrototypeTags[iIndex];
|
||||
}
|
||||
|
||||
void CMapElement::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
|
||||
CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
@@ -20,12 +23,33 @@ HRESULT CMapElement_Interactable::Initialize_Prototype()
|
||||
|
||||
HRESULT CMapElement_Interactable::Initialize(void* pArg)
|
||||
{
|
||||
MAPOBJECT_LOD_DESC* pDesc = static_cast<MAPOBJECT_LOD_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
m_vPosition = pDesc->vPosition;
|
||||
m_vScale = pDesc->vScale;
|
||||
m_vRotation = pDesc->vRotation;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -58,6 +82,9 @@ void CMapElement_Interactable::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CMapElement_Interactable::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
@@ -96,6 +123,23 @@ HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -147,6 +191,10 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Interactable::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::Describe_Entity()
|
||||
@@ -165,7 +213,7 @@ void CMapElement_Interactable::Describe_Entity()
|
||||
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
|
||||
|
||||
/*if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
if (nullptr != pTerrain)
|
||||
@@ -173,7 +221,7 @@ void CMapElement_Interactable::Describe_Entity()
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
|
||||
CMapElement_Static::CMapElement_Static(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
@@ -20,12 +24,33 @@ HRESULT CMapElement_Static::Initialize_Prototype()
|
||||
|
||||
HRESULT CMapElement_Static::Initialize(void* pArg)
|
||||
{
|
||||
MAPOBJECT_LOD_DESC* pDesc = static_cast<MAPOBJECT_LOD_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
m_vPosition = pDesc->vPosition;
|
||||
m_vScale = pDesc->vScale;
|
||||
m_vRotation = pDesc->vRotation;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -58,6 +83,9 @@ void CMapElement_Static::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CMapElement_Static::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
@@ -95,6 +123,23 @@ HRESULT CMapElement_Static::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -146,6 +191,10 @@ CGameObject* CMapElement_Static::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Static::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
void CMapElement_Static::Describe_Entity()
|
||||
@@ -164,7 +213,7 @@ void CMapElement_Static::Describe_Entity()
|
||||
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
|
||||
|
||||
/*if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
if (nullptr != pTerrain)
|
||||
@@ -172,7 +221,7 @@ void CMapElement_Static::Describe_Entity()
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
|
||||
@@ -57,6 +57,11 @@ _wstring CMapObject::Get_PrototypeTag(_uint iLodIndex)
|
||||
return _wstring();
|
||||
}
|
||||
|
||||
_uint CMapObject::Get_LodLevel()
|
||||
{
|
||||
return m_iMaxLodLevel;
|
||||
}
|
||||
|
||||
HRESULT CMapObject::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
|
||||
@@ -32,7 +32,7 @@ HRESULT CMapObject_LOD::Initialize(void* pArg)
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
@@ -284,22 +284,21 @@ void CMapObject_LOD::Describe_Entity()
|
||||
GUI::SameLine();
|
||||
if (GUI::Button("Bake!!!")) {
|
||||
CMapObject_Manager* pManager = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_MAPOBJECTMANAGER)->Get_Object<CMapObject_Manager>();
|
||||
for (_uint i = 0; i < (_uint)m_ModelPrototypeTags.size(); ++i) {
|
||||
for (_uint i = 0; i < (_uint)m_ModelPathIndices.size(); ++i) {
|
||||
filesystem::path filePath = pManager->Get_PrototypePath(m_ModelPathIndices[i]);
|
||||
|
||||
CModel* pModel = m_pModelComs[i];
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
pModel->Save_PhysXTriMeshes(filePath.string().c_str());
|
||||
|
||||
|
||||
CRigidBody::RIGIDBODY_DESC Desc{};
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
|
||||
for (_uint i = 0; i < iNumMesh; ++i)
|
||||
{ // RIGID_BODY
|
||||
Desc.tRigidStaticDesc.szMeshName = pModel->Get_MeshName(i);
|
||||
_string strDestName = pModel->Get_MeshName(i) + to_string(i);
|
||||
Desc.szMeshName = strDestName.c_str();
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(pModel->Get_MeshName(i)).c_str(), nullptr, &Desc))) {
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), nullptr, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "MapObject_LOD.h"
|
||||
#include "MapObject_Static.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "MapElement_Static.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
|
||||
CMapObject_Manager::CMapObject_Manager(ID3D11Device * pDevice, ID3D11DeviceContext * pContext)
|
||||
@@ -20,6 +22,7 @@ CMapObject_Manager::CMapObject_Manager(const CMapObject_Manager& rhs)
|
||||
, m_ModelPrototypeTags{ rhs.m_ModelPrototypeTags }
|
||||
, m_LODModelPrototypeTags{ rhs.m_LODModelPrototypeTags }
|
||||
, m_ModelPrototypePaths{ rhs.m_ModelPrototypePaths }
|
||||
, m_PartObjectKeyCount{ rhs.m_PartObjectKeyCount }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,6 +35,10 @@ HRESULT CMapObject_Manager::Initialize_Prototype(vector<_wstring>& ModelPrototyp
|
||||
{
|
||||
m_LODModelPrototypeTags.push_back(ModelPrototypeTags[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_PartObjectKeyCount.emplace(ModelPrototypeTags[i], 0);
|
||||
}
|
||||
|
||||
m_ModelPrototypeTags.push_back(ModelPrototypeTags[i]);
|
||||
m_ModelPrototypePaths.push_back(ModelPrototypePaths[i]);
|
||||
@@ -65,20 +72,34 @@ void CMapObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
void CMapObject_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Begin("File");
|
||||
const char* ModeNames[3] =
|
||||
{
|
||||
"CONTAINER",
|
||||
"ELEMENT_STATIC",
|
||||
"ELEMENT_INTERACT"
|
||||
};
|
||||
GUI::Combo("MODE", (_int*)(&m_eType), ModeNames, IM_ARRAYSIZE(ModeNames));
|
||||
|
||||
GUI::InputText("MapFileName", m_szSaveFileName, MAX_PATH);
|
||||
if (GUI::Button("Save_Map"))
|
||||
{
|
||||
Save_MapData("Test");
|
||||
Save_MapData(m_szSaveFileName);
|
||||
|
||||
}
|
||||
if (GUI::Button("Load_Map"))
|
||||
{
|
||||
Load_MapData("Test");
|
||||
Load_MapData(m_szSaveFileName);
|
||||
|
||||
}
|
||||
|
||||
GUI::InputText("Containter Name", m_szSaveContainerName, MAX_PATH);
|
||||
if (GUI::Button("Save_Container"))
|
||||
|
||||
if (ADD_TYPE::CONTAINER == m_eType)
|
||||
{
|
||||
Save_ContainerData("ContainerTest", m_szSaveContainerName);
|
||||
if (GUI::Button("Save_Container"))
|
||||
{
|
||||
Save_ContainerData("ContainerTest", m_szSaveContainerName);
|
||||
}
|
||||
}
|
||||
if (GUI::Button("Load_Container"))
|
||||
{
|
||||
@@ -90,9 +111,15 @@ void CMapObject_Manager::Update(_float fTimeDelta)
|
||||
|
||||
Update_ObjectList();
|
||||
|
||||
Update_Edit();
|
||||
if (ADD_TYPE::CONTAINER != m_eType)
|
||||
{
|
||||
Update_Edit();
|
||||
}
|
||||
|
||||
Update_ContainerObject();
|
||||
if (ADD_TYPE::CONTAINER == m_eType)
|
||||
{
|
||||
Update_ContainerObject();
|
||||
}
|
||||
|
||||
for (auto* pObject : m_MapObjects)
|
||||
{
|
||||
@@ -148,22 +175,13 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
|
||||
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
|
||||
|
||||
tinyxml2::XMLElement* land = {};
|
||||
tinyxml2::XMLElement* container = {};
|
||||
doc.Clear();
|
||||
doc.InsertFirstChild(doc.NewDeclaration());
|
||||
|
||||
if (loadResult != tinyxml2::XML_SUCCESS)
|
||||
{
|
||||
doc.InsertFirstChild(doc.NewDeclaration());
|
||||
|
||||
land = doc.NewElement("Land");
|
||||
doc.InsertEndChild(land);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
land = doc.FirstChildElement("Land");
|
||||
}
|
||||
tinyxml2::XMLElement* land = doc.NewElement("Land");
|
||||
doc.InsertEndChild(land);
|
||||
|
||||
#pragma region SAVE_BUILDING
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"));
|
||||
|
||||
if (nullptr == pLayer)
|
||||
@@ -171,7 +189,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
|
||||
const list<CGameObject*>* pList = pLayer->Get_Objects();
|
||||
|
||||
|
||||
for (auto pGamObject : *pList)
|
||||
{
|
||||
CBuildingContainer* pContainerObject = dynamic_cast<CBuildingContainer*>(pGamObject);
|
||||
@@ -196,7 +213,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
|
||||
#pragma region CONTAINER_TRANSFORM
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
@@ -217,16 +233,148 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
container->InsertEndChild(Rotation);
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
#pragma region SAVE_PARTOBJECT
|
||||
|
||||
if (FAILED(pContainerObject->Save_PartObjects(doc, container)))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
// ÀúÀå
|
||||
#pragma region ELEMENT_STATIC
|
||||
pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Static"));
|
||||
|
||||
if (nullptr != pLayer)
|
||||
{
|
||||
const list<CGameObject*>* pList = pLayer->Get_Objects();
|
||||
|
||||
for (auto pGamObject : *pList)
|
||||
{
|
||||
CMapElement* pElement = dynamic_cast<CMapElement*>(pGamObject);
|
||||
|
||||
if (nullptr == pElement)
|
||||
return E_FAIL;
|
||||
|
||||
_uint iLodLevel = pElement->Get_LodLevel();
|
||||
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_STATIC));
|
||||
object->SetAttribute("Lod_Level", iLodLevel);
|
||||
land->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < iLodLevel + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, pGamObject->Get_Component<CTransform>()->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = pGamObject->Get_Component<CTransform>()->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, pGamObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
#pragma endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ELEMENT_INTERACTABEL
|
||||
pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interactable"));
|
||||
|
||||
if (nullptr != pLayer)
|
||||
{
|
||||
const list<CGameObject*>* pList = pLayer->Get_Objects();
|
||||
|
||||
for (auto pGamObject : *pList)
|
||||
{
|
||||
CMapElement* pElement = dynamic_cast<CMapElement*>(pGamObject);
|
||||
|
||||
if (nullptr == pElement)
|
||||
return E_FAIL;
|
||||
|
||||
_uint iLodLevel = pElement->Get_LodLevel();
|
||||
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_INTERACT));
|
||||
object->SetAttribute("Lod_Level", iLodLevel);
|
||||
land->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < iLodLevel + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, pGamObject->Get_Component<CTransform>()->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = pGamObject->Get_Component<CTransform>()->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, pGamObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
// ÀúÀå
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
MSG_BOX("Failed to Save File");
|
||||
}
|
||||
@@ -235,11 +383,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
MSG_BOX("Succeed to Save File");
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -300,12 +443,15 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
|
||||
{
|
||||
// <PartObject>
|
||||
tinyxml2::XMLElement* PartObject = doc.NewElement("PartObject");
|
||||
PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
|
||||
_uint iLodLvel = pMapObject->Get_LodLevel();
|
||||
|
||||
PartObject->SetAttribute("Lod_Level", iLodLvel);
|
||||
PartObject->SetAttribute("Key_Index", pMapObject->Get_iKeyIndex());
|
||||
container->InsertEndChild(PartObject);
|
||||
|
||||
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
|
||||
{
|
||||
// <PrototypeTag>ÅØ½ºÆ®</PrototypeTag>
|
||||
// <PrototypeTag>ÅØ½ºÆ®</PrototypeTag>
|
||||
tinyxml2::XMLElement* proto = doc.NewElement("PrototypeTag");
|
||||
proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
|
||||
PartObject->InsertEndChild(proto);
|
||||
@@ -352,7 +498,7 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
|
||||
m_pSelectObject = nullptr;
|
||||
#pragma endregion
|
||||
|
||||
// ÀúÀå
|
||||
// ÀúÀå
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
MSG_BOX("Failed to Save File");
|
||||
}
|
||||
@@ -417,86 +563,96 @@ HRESULT CMapObject_Manager::Load_MapData(const _char* pFileName)
|
||||
for (auto* PartObject = Container->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
|
||||
#pragma region MAPOBJECT_STATIC
|
||||
if (0 == iLodLevel) /* MapObject_Static */
|
||||
{
|
||||
MAPOBJECT_STATIC_DESC Desc = {};
|
||||
string strTag = {};
|
||||
auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
|
||||
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
|
||||
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = strTag;
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Part<CMapObject_Static>(strKey, g_iStaticLevel, nullptr, &Desc);
|
||||
}
|
||||
#pragma endregion
|
||||
PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_LOD
|
||||
else
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = strTag;
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Part<CMapObject_LOD>(strKey, g_iStaticLevel, nullptr, &Desc);
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
CMapObject_LOD* pMapObject;
|
||||
|
||||
if (FAILED(pContainerObject->Add_Part<CMapObject_LOD>(strKey, g_iStaticLevel, &pMapObject, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
pMapObject->Set_KeyIndex(iKeyIndex);
|
||||
|
||||
SAFE_RELEASE(pMapObject);
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
|
||||
MAPOBJECT_TYPE eType = {};
|
||||
|
||||
Object->QueryUnsignedAttribute("Type", (_uint*)(&eType));
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
|
||||
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Rotation = Object->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
string strTag = {};
|
||||
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
if(MAPOBJECT_TYPE::ELEMENT_STATIC == eType)
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Static>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Static"), &Desc);
|
||||
else if(MAPOBJECT_TYPE::ELEMENT_INTERACT == eType)
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Interactable>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -568,48 +724,12 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
|
||||
for (auto* PartObject = TargetContainer->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
|
||||
#pragma region MAPOBJECT_STATIC
|
||||
if (0 == iLodLevel) /* MapObject_Static */
|
||||
{
|
||||
MAPOBJECT_STATIC_DESC Desc = {};
|
||||
string strTag = {};
|
||||
auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
|
||||
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = strTag;
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Part<CMapObject_Static>(strKey, g_iStaticLevel, nullptr, &Desc);
|
||||
}
|
||||
#pragma endregion
|
||||
PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_LOD
|
||||
else
|
||||
{
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
@@ -620,7 +740,7 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
|
||||
}
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = strTag;
|
||||
const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
@@ -641,7 +761,6 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Part<CMapObject_LOD>(strKey, g_iStaticLevel, nullptr, &Desc);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
@@ -661,69 +780,29 @@ void CMapObject_Manager::Update_PrototypeList()
|
||||
{
|
||||
auto& Tag = m_ModelPrototypeTags[i];
|
||||
|
||||
if (_wstring::npos != Tag.find(L"Lod")){
|
||||
if (_wstring::npos != Tag.find(L"Lod")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
|
||||
{
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
if(false == Find_Lod_Prototype(Tag, LodModelIndices))
|
||||
switch (m_eType)
|
||||
{
|
||||
MAPOBJECT_STATIC_DESC Desc = {};
|
||||
case Editor::CMapObject_Manager::ADD_TYPE::CONTAINER:
|
||||
Create_PartObject(Tag);
|
||||
break;
|
||||
|
||||
Desc.strModelPrototypeTag = Tag;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Desc.iModelPathIndex = i;
|
||||
case Editor::CMapObject_Manager::ADD_TYPE::ELEMENT_STATIC:
|
||||
Create_Elemnt_Static(Tag);
|
||||
break;
|
||||
|
||||
CMapObject_Static* pMapObject = { nullptr };
|
||||
const string strKey = CMyTools::ToString(Tag);
|
||||
|
||||
pMapObject = m_pGameInstance->Clone_Prototype<CMapObject_Static>(g_iStaticLevel, &Desc);
|
||||
|
||||
/* if(FAILED(m_pContainer->Add_Part<CMapObject_Static>(strKey, 0, &pMapObject, &Desc)))
|
||||
break;*/
|
||||
|
||||
m_MapObjects.push_back(pMapObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
|
||||
vector<_wstring> PrototypeTags;
|
||||
|
||||
PrototypeTags.push_back(Tag);
|
||||
Desc.iMaxLodLevel = 0;
|
||||
Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Desc.pModelPathIndices = &LodModelIndices;
|
||||
|
||||
CMapObject_LOD* pMapObject = { nullptr };
|
||||
const string strKey = CMyTools::ToString(Tag);
|
||||
|
||||
pMapObject = m_pGameInstance->Clone_Prototype<CMapObject_LOD>(g_iStaticLevel, &Desc);
|
||||
|
||||
//if (FAILED(m_pContainer->Add_Part<CMapObject_LOD>(strKey, 0, &pMapObject, &Desc)))
|
||||
// break;
|
||||
|
||||
m_MapObjects.push_back(pMapObject);
|
||||
|
||||
for (_uint i = 0; i < LodModelIndices.size(); ++i)
|
||||
{
|
||||
_wstring strLodTag = Tag + L"_Lod" + to_wstring(i + 1);
|
||||
|
||||
pMapObject->Add_LodModel(strLodTag.c_str());
|
||||
}
|
||||
|
||||
|
||||
case Editor::CMapObject_Manager::ADD_TYPE::ELEMENT_INTERACT:
|
||||
Create_Elemnt_Interact(Tag);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
@@ -732,10 +811,7 @@ void CMapObject_Manager::Update_PrototypeList()
|
||||
|
||||
void CMapObject_Manager::Update_ObjectList()
|
||||
{
|
||||
//CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_MapObject"));
|
||||
|
||||
//if (nullptr == pLayer)
|
||||
// return;
|
||||
CLayer* pLayer = { nullptr };
|
||||
|
||||
//m_pMapObjects = pLayer->Get_Objects();
|
||||
|
||||
@@ -744,41 +820,93 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
_uint iObjectIndex = {};
|
||||
string strSrc;
|
||||
|
||||
if (false == m_MapObjects.empty())
|
||||
if(ADD_TYPE::CONTAINER == m_eType)
|
||||
{
|
||||
for (auto pMapObject : m_MapObjects)
|
||||
if (false == m_MapObjects.empty())
|
||||
{
|
||||
CMapObject* pCurrentMapObject = static_cast<CMapObject*>(pMapObject);
|
||||
for (auto pMapObject : m_MapObjects)
|
||||
{
|
||||
CMapObject* pCurrentMapObject = static_cast<CMapObject*>(pMapObject);
|
||||
|
||||
if (nullptr == pCurrentMapObject)
|
||||
continue;
|
||||
|
||||
wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
|
||||
|
||||
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
|
||||
|
||||
if (ImGui::Button(strSrc.c_str()))
|
||||
{
|
||||
m_pSelectObject = pCurrentMapObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ADD_TYPE::ELEMENT_STATIC == m_eType)
|
||||
pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Static"));
|
||||
else if (ADD_TYPE::ELEMENT_INTERACT == m_eType)
|
||||
pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interact"));
|
||||
|
||||
if (nullptr == pLayer)
|
||||
{
|
||||
GUI::End();
|
||||
return;
|
||||
}
|
||||
|
||||
const list<class CGameObject*>* pObjectList = pLayer->Get_Objects();
|
||||
|
||||
for (auto pObject : *pObjectList)
|
||||
{
|
||||
CMapElement* pCurrentMapObject = static_cast<CMapElement*>(pObject);
|
||||
|
||||
if (nullptr == pCurrentMapObject)
|
||||
continue;
|
||||
|
||||
wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
|
||||
wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag(0);
|
||||
|
||||
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
|
||||
|
||||
if (ImGui::Button(strSrc.c_str()))
|
||||
{
|
||||
m_pSelectObject = pCurrentMapObject;
|
||||
m_pSelectElemnt = pCurrentMapObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CMapObject_Manager::Update_Edit()
|
||||
{
|
||||
GUI::Begin("Edit");
|
||||
if (m_pGameInstance->Mouse_Down(DIM_4))
|
||||
m_pSelectObject = nullptr;
|
||||
|
||||
if (nullptr != m_pSelectObject)
|
||||
if (ADD_TYPE::CONTAINER == m_eType)
|
||||
{
|
||||
m_pSelectObject->Describe_Entity();
|
||||
if (m_pSelectObject->isDead())
|
||||
if (m_pGameInstance->Mouse_Down(DIM_4))
|
||||
m_pSelectObject = nullptr;
|
||||
|
||||
if (nullptr != m_pSelectObject)
|
||||
{
|
||||
m_pSelectObject->Describe_Entity();
|
||||
if (m_pSelectObject->isDead())
|
||||
m_pSelectObject = nullptr;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Down(DIM_4))
|
||||
m_pSelectElemnt = nullptr;
|
||||
|
||||
if (nullptr != m_pSelectElemnt)
|
||||
{
|
||||
m_pSelectElemnt->Describe_Entity();
|
||||
if (m_pSelectElemnt->isDead())
|
||||
m_pSelectElemnt = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
@@ -823,12 +951,111 @@ void CMapObject_Manager::Update_ContainerObject()
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CMapObject_Manager::Create_PartObject(_wstring& strPrototypeTag)
|
||||
{
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
|
||||
vector<_wstring> PrototypeTags;
|
||||
|
||||
Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
|
||||
|
||||
PrototypeTags.push_back(strPrototypeTag);
|
||||
|
||||
for (_uint i = 0; i < LodModelIndices.size(); ++i)
|
||||
{
|
||||
_wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
|
||||
PrototypeTags.push_back(strLodTag);
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
|
||||
Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Desc.pModelPathIndices = &LodModelIndices;
|
||||
|
||||
CMapObject_LOD* pMapObject = { nullptr };
|
||||
const string strKey = CMyTools::ToString(strPrototypeTag);
|
||||
|
||||
pMapObject = m_pGameInstance->Clone_Prototype<CMapObject_LOD>(g_iStaticLevel, &Desc);
|
||||
pMapObject->Set_KeyIndex(Get_KeyCount(strPrototypeTag));
|
||||
|
||||
m_MapObjects.push_back(pMapObject);
|
||||
}
|
||||
|
||||
void CMapObject_Manager::Create_Elemnt_Static(_wstring& strPrototypeTag)
|
||||
{
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
|
||||
vector<_wstring> PrototypeTags;
|
||||
|
||||
Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
|
||||
|
||||
PrototypeTags.push_back(strPrototypeTag);
|
||||
|
||||
for (_uint i = 0; i < LodModelIndices.size(); ++i)
|
||||
{
|
||||
_wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
|
||||
PrototypeTags.push_back(strLodTag);
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
|
||||
Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Desc.pModelPathIndices = &LodModelIndices;
|
||||
|
||||
CMapElement_Static* pMapObject = { nullptr };
|
||||
const string strKey = CMyTools::ToString(strPrototypeTag);
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Static>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Static"), &Desc);
|
||||
}
|
||||
|
||||
void CMapObject_Manager::Create_Elemnt_Interact(_wstring& strPrototypeTag)
|
||||
{
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
|
||||
vector<_wstring> PrototypeTags;
|
||||
|
||||
Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
|
||||
|
||||
PrototypeTags.push_back(strPrototypeTag);
|
||||
|
||||
for (_uint i = 0; i < LodModelIndices.size(); ++i)
|
||||
{
|
||||
_wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
|
||||
PrototypeTags.push_back(strLodTag);
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
|
||||
Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Desc.pModelPathIndices = &LodModelIndices;
|
||||
|
||||
CMapElement_Interactable* pMapObject = { nullptr };
|
||||
const string strKey = CMyTools::ToString(strPrototypeTag);
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Interactable>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
|
||||
}
|
||||
|
||||
_bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices)
|
||||
{
|
||||
// for (auto& Tag : m_LODModelPrototypeTags)
|
||||
for(_uint i = 0 ; i < m_ModelPrototypeTags.size(); ++i)
|
||||
{
|
||||
if (_wstring::npos != m_ModelPrototypeTags[i].find(strPrototypeTag))
|
||||
if (_wstring::npos != m_ModelPrototypeTags[i].find(strPrototypeTag) && 5 > (m_ModelPrototypeTags[i].size() - strPrototypeTag.size()))
|
||||
LodModelIndices.push_back(i);
|
||||
}
|
||||
if (0 < LodModelIndices.size()) {
|
||||
@@ -839,6 +1066,16 @@ _bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, vector<_u
|
||||
// return true;
|
||||
}
|
||||
|
||||
_uint CMapObject_Manager::Get_KeyCount(_wstring strPrototypeTag)
|
||||
{
|
||||
auto iter = m_PartObjectKeyCount.find(strPrototypeTag);
|
||||
|
||||
if (iter == m_PartObjectKeyCount.end())
|
||||
return 0;
|
||||
|
||||
return iter->second++;
|
||||
}
|
||||
|
||||
|
||||
CMapObject_Manager* CMapObject_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags, vector<filesystem::path>& ModelPrototypePaths)
|
||||
{
|
||||
|
||||
@@ -254,13 +254,11 @@ void CMapObject_Static::Describe_Entity()
|
||||
_uint iNumMesh = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
CRigidBody::RIGIDBODY_DESC Desc{};
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
|
||||
for (_uint i = 0; i < iNumMesh; ++i)
|
||||
{ // RIGID_BODY
|
||||
Desc.tRigidStaticDesc.szMeshName = m_pModelCom->Get_MeshName(i);
|
||||
Desc.szMeshName = _string(m_pModelCom->Get_MeshName(i) + to_string(i)).c_str();
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(m_pModelCom->Get_MeshName(i)).c_str(), nullptr, &Desc))) {
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(Desc.szMeshName).c_str(), nullptr, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ HRESULT CModelParts::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,17 +101,18 @@ void CRootModelPart::Change_Model(_uint iIndex)
|
||||
pModel->Set_CurrentTrackPosition(m_fTrackPosition);
|
||||
pModel->Play_Animation(0.f);
|
||||
|
||||
|
||||
if (iIndex == ENUM_CLASS(PARTSTYPE::HEAD))
|
||||
if (iIndex == ENUM_CLASS(PARTSTYPE::BODY))
|
||||
{
|
||||
Set_MainModel(m_ModelParts[iIndex]->Get_Component<CModel>());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CRootModelPart::Set_Animation(_uint iAnimIndex)
|
||||
{
|
||||
m_pMainModel->Set_AnimationIndex(iAnimIndex);
|
||||
|
||||
m_pMainModel->Set_CurrentTrackPosition(0.f);
|
||||
m_pMainModel->Play_Animation(0.f);
|
||||
for (auto& PartObject : m_ModelParts)
|
||||
{
|
||||
CModel* pModel = PartObject->Get_Component<CModel>();
|
||||
@@ -119,6 +120,7 @@ void CRootModelPart::Set_Animation(_uint iAnimIndex)
|
||||
{
|
||||
pModel->Set_AnimationIndex(m_pMainModel->Get_AnimIndex());
|
||||
pModel->Set_CurrentTrackPosition(m_pMainModel->Get_CurrentTrackPosition());
|
||||
pModel->Play_Animation(0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,12 +141,12 @@ HRESULT CRootModelPart::Ready_PartObjects()
|
||||
|
||||
CModelParts* pModelPartsObject = { nullptr };
|
||||
|
||||
if (FAILED(Add_PartObject<CHead>("Human_Head", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast<CHead**>(&pModelPartsObject), &PartsDesc)))
|
||||
if (FAILED(Add_PartObject<CBody>("Human_Body", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast<CBody**>(&pModelPartsObject), &PartsDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_ModelParts.push_back(pModelPartsObject);
|
||||
|
||||
if (FAILED(Add_PartObject<CBody>("Human_Body", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast<CBody**>(&pModelPartsObject), &PartsDesc)))
|
||||
if (FAILED(Add_PartObject<CHead>("Human_Head", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast<CHead**>(&pModelPartsObject), &PartsDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_ModelParts.push_back(pModelPartsObject);
|
||||
|
||||
@@ -7,8 +7,6 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CBuildingContainer final : public CMapContainer
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBuildingContainer(const CBuildingContainer& rhs);
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CShader;
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDummy_Goblin final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_Goblin(const CDummy_Goblin& Prototype);
|
||||
virtual ~CDummy_Goblin() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CDummy_Goblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,47 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CShader;
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDummy_Goblin_Head final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CDummy_Goblin_Head(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_Goblin_Head(const CDummy_Goblin_Head& Prototype);
|
||||
virtual ~CDummy_Goblin_Head() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CDummy_Goblin_Head* 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
|
||||
@@ -33,8 +33,8 @@ class CDummy_PhysXBox final : public CGameObject
|
||||
private:
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
const PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
//CModel* m_pModelCom = { nullptr };
|
||||
//CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -14,11 +14,11 @@ NS_BEGIN(Editor)
|
||||
class CDummy_PhysXPlayable final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagBoxStartPos
|
||||
typedef struct tagPlayableStartPos
|
||||
{
|
||||
_float3 vPos = {};
|
||||
_float3 vRotRPY = {};
|
||||
}BOXSTARTPOS_DESC;
|
||||
}PlayableSTARTPOS_DESC;
|
||||
private:
|
||||
CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CInstance_Model;
|
||||
@@ -11,7 +11,7 @@ NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CEffectObject abstract : public CGameObject
|
||||
class CEffectObject abstract : public CPartObject
|
||||
{
|
||||
protected:
|
||||
CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -51,6 +51,13 @@ class CEffectObject abstract : public CGameObject
|
||||
_float2 m_vUVCutting = { 1.f ,1.f };
|
||||
_float2 m_vUVMaskCutting = { 1.f ,1.f };
|
||||
|
||||
_int m_iMaskMoveLerpOption = { 0 };
|
||||
_int m_iDiffuseMoveLerpOption = { 0 };
|
||||
_int m_iMaskNoiseMoveLerpOption = { 0 };
|
||||
_int m_iDiffuseNoiseMoveLerpOption = { 0 };
|
||||
_int m_iBlurWeight = { 0 };
|
||||
|
||||
|
||||
_bool m_isDiffuse = {};
|
||||
_bool m_isMasking = {};
|
||||
_bool m_isDissolve = {};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "EffectObject.h"
|
||||
#include "ContainerObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
@@ -10,7 +10,7 @@ NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CEffect_Editor final : public CEffectObject
|
||||
class CEffect_Editor final : public CContainerObject
|
||||
{
|
||||
private:
|
||||
CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -30,18 +30,24 @@ class CEffect_Editor final : public CEffectObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
private:
|
||||
void ReadMaterials(const char* pDirectoryName);
|
||||
void ReadMaterial(_wstring wstrFileName, const char* pFilePath);
|
||||
|
||||
private:
|
||||
CGameObject* m_pEditEffect = { nullptr };
|
||||
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
||||
_string m_strCurrentEffectName = {};
|
||||
_uint m_iNumPart = { 0 };
|
||||
class CEditEffect* m_pEditEffect = { nullptr };
|
||||
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
||||
|
||||
public:
|
||||
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
#include "Editor_Define.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
typedef class CInformation final : public CBase
|
||||
{
|
||||
DECLARE_SINGLETON(CInformation)
|
||||
public:
|
||||
HRESULT Initialize_Info(ID3D11Device* pDevice = nullptr, ID3D11DeviceContext* pContext = nullptr);
|
||||
HRESULT Release_Info();
|
||||
#pragma region WHOLEPART
|
||||
_bool strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents);
|
||||
_bool wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents);
|
||||
|
||||
#pragma endregion // Àü¿ª
|
||||
|
||||
#pragma region OBJECTVIEWER
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MAPVIEWER
|
||||
|
||||
#pragma endregion
|
||||
#pragma region EFFECTVIEWER
|
||||
|
||||
#pragma endregion
|
||||
#pragma region UIVIEWER
|
||||
|
||||
#pragma endregion
|
||||
#pragma region PHYSXVIEWER
|
||||
|
||||
#pragma endregion
|
||||
#pragma region COMBINEDVIEWER
|
||||
|
||||
#pragma endregion
|
||||
|
||||
public:
|
||||
#pragma region LOG
|
||||
void Log_Render();
|
||||
void Log_Push(const _char* pContents);
|
||||
void Log_Clear();
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
class CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
_string m_strLog = {};
|
||||
|
||||
|
||||
private:
|
||||
CInformation();
|
||||
virtual ~CInformation() = default;
|
||||
virtual void Free() override;
|
||||
}INFO;
|
||||
|
||||
NS_END
|
||||
@@ -34,9 +34,12 @@ class CLevel_ObjectViewer final : public CLevel
|
||||
void Category_PartsModelList(const _char* Category, const _char* Layer);
|
||||
void Show_AnimList();
|
||||
void Show_ObjectList();
|
||||
void Object_Setting();
|
||||
void Dummy_Object_Setting();
|
||||
void Parts_Object_Setting();
|
||||
void Save_LayerName(const _char* Layer);
|
||||
_wchar* Save_ModelName(const _char* Category);
|
||||
void Load_KeyFrame();
|
||||
|
||||
|
||||
private:
|
||||
vector<CGameObject*> m_Objects;
|
||||
@@ -44,8 +47,10 @@ class CLevel_ObjectViewer final : public CLevel
|
||||
class CRootModelPart* m_HumanRoot = { nullptr };
|
||||
_int m_iObjectIndex = { 0 };
|
||||
_int m_iPartsObjectIndex = { 0 };
|
||||
|
||||
_float m_fAnimFrame = {};
|
||||
_float m_fKeyFrame = {};
|
||||
vector<_float> m_KeyFrame;
|
||||
vector<_string> m_Events;
|
||||
_string m_strEvent;
|
||||
_char m_szName[MAX_PATH];
|
||||
_wchar m_wszName[MAX_PATH];
|
||||
_wchar m_wszLayer[MAX_PATH];
|
||||
|
||||
@@ -17,6 +17,10 @@ class CMapElement abstract : public CGameObject
|
||||
CMapElement(const CMapElement& rhs);
|
||||
virtual ~CMapElement() = default;
|
||||
|
||||
public:
|
||||
_uint Get_LodLevel() const{ return m_iMaxLodLevel; }
|
||||
const _wstring& Get_PrototypeTag(_uint iIndex);
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
|
||||
@@ -25,7 +25,8 @@ class CMapObject abstract : public CPartObject
|
||||
|
||||
public:
|
||||
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
|
||||
virtual _uint Get_LodLevel() { return m_iMaxLodLevel; }
|
||||
_uint Get_LodLevel();
|
||||
_uint Get_iKeyIndex() const { return m_iKeyIndex; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -39,6 +40,7 @@ class CMapObject abstract : public CPartObject
|
||||
protected:
|
||||
_bool m_bSelected = {};
|
||||
|
||||
_uint m_iKeyIndex = {};
|
||||
_uint m_iMaxLodLevel = {};
|
||||
|
||||
_float3 m_vPosition = {};
|
||||
|
||||
@@ -23,12 +23,14 @@ class CMapObject_LOD final : public CMapObject // LOD
|
||||
public:
|
||||
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
|
||||
HRESULT Add_LodModel(const _tchar* pModelPrototypeTag);
|
||||
void Set_KeyIndex(_uint iIndex) {
|
||||
m_iKeyIndex = iIndex;
|
||||
}
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<CModel*> m_pModelComs;
|
||||
|
||||
_uint m_iMaxLodLevel = {};
|
||||
_uint m_iLodIndex = {};
|
||||
|
||||
vector<_wstring> m_ModelPrototypeTags;
|
||||
|
||||
@@ -12,6 +12,8 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CMapObject_Manager final : public CGameObject
|
||||
{
|
||||
enum class ADD_TYPE {CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT};
|
||||
|
||||
private:
|
||||
CMapObject_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapObject_Manager(const CMapObject_Manager& Prototype);
|
||||
@@ -28,15 +30,20 @@ class CMapObject_Manager final : public CGameObject
|
||||
const filesystem::path Get_PrototypePath(_uint iModelIndex);
|
||||
|
||||
private:
|
||||
ADD_TYPE m_eType = {};
|
||||
|
||||
class CMapObject* m_pSelectObject = { nullptr };
|
||||
class CMapElement* m_pSelectElemnt = { nullptr };
|
||||
list<class CMapObject*> m_MapObjects = {};
|
||||
vector<_wstring> m_ModelPrototypeTags;
|
||||
map<_wstring, _uint> m_PartObjectKeyCount;
|
||||
vector<_wstring> m_LODModelPrototypeTags;
|
||||
vector<filesystem::path> m_ModelPrototypePaths;
|
||||
|
||||
_uint m_iContainerObjectIndex = {};
|
||||
|
||||
class CBuildingContainer* m_pContainer = { nullptr };
|
||||
_char m_szSaveFileName[MAX_PATH] = {};
|
||||
_char m_szSaveContainerName[MAX_PATH] = {};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
@@ -44,8 +51,9 @@ class CMapObject_Manager final : public CGameObject
|
||||
|
||||
#pragma region SAVE_LOAD
|
||||
HRESULT Save_MapData(const _char* pFileName);
|
||||
HRESULT Save_ContainerData(const _char* pFileName, const _char* pContainerName);
|
||||
HRESULT Load_MapData(const _char* pFileName);
|
||||
|
||||
HRESULT Save_ContainerData(const _char* pFileName, const _char* pContainerName);
|
||||
HRESULT Load_ContainerData(const _char* pFileName, const _char* pContainerName);
|
||||
#pragma endregion
|
||||
|
||||
@@ -54,8 +62,12 @@ class CMapObject_Manager final : public CGameObject
|
||||
void Update_Edit();
|
||||
void Update_ContainerObject();
|
||||
|
||||
_bool Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices);
|
||||
void Create_PartObject(_wstring& strPrototypeTag);
|
||||
void Create_Elemnt_Static(_wstring& strPrototypeTag);
|
||||
void Create_Elemnt_Interact(_wstring& strPrototypeTag);
|
||||
|
||||
_bool Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices);
|
||||
_uint Get_KeyCount(_wstring strPrototypeTag);
|
||||
public:
|
||||
static CMapObject_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags, vector<filesystem::path>& ModelPrototypePaths);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
|
||||
@@ -12,8 +12,7 @@ class CRootModelPart final : public CContainerObject
|
||||
{
|
||||
|
||||
public:
|
||||
enum class PARTSTYPE{HEAD,BODY,HAIR,END};
|
||||
|
||||
enum class PARTSTYPE{ BODY,HEAD,HAIR,END};
|
||||
public:
|
||||
void Set_PrototypeModelName(const _wchar* PrototypeModelName) { m_PrototypeModelName = PrototypeModelName; }
|
||||
void Set_ModelName(const _char* Name) { m_ModelName = Name; }
|
||||
|
||||
@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_BlurWeightTexture;
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
float g_fWeights[32] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
||||
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
//TODO 블러 조절 해보려햇는데 실패함..
|
||||
|
||||
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||
|
||||
//int iBlurMin;
|
||||
//int iBlurMax;
|
||||
|
||||
//if (iBlurWeight % 2 == 0)
|
||||
//{
|
||||
// iBlurMin = -1 * iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// iBlurMin = -iBlurWeight / 2;
|
||||
// iBlurMax = iBlurWeight / 2 + 1;
|
||||
//}
|
||||
|
||||
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == vColorTexture.a)
|
||||
{
|
||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -144,7 +144,8 @@ void CChannel::Update_TransformationMatirx(const vector<CBone*>& Bones, _float f
|
||||
}
|
||||
_matrix BoneTransformationMatrix = XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
|
||||
|
||||
Bones[m_iBoneIndex]->Set_TransformationMatrix(BoneTransformationMatrix);
|
||||
if(Bones.size()>m_iBoneIndex)
|
||||
Bones[m_iBoneIndex]->Set_TransformationMatrix(BoneTransformationMatrix);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,54 @@ CCharacter_Controller::CCharacter_Controller(const CCharacter_Controller& rhs)
|
||||
{
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CCharacter_Controller::Render()
|
||||
{
|
||||
_vector vPos = Get_Position();
|
||||
_float3 vVolume = Get_Volume();
|
||||
_matrix WorldMatrix = XMMatrixTranslationFromVector(vPos);
|
||||
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x2fc48000, 1.f);
|
||||
|
||||
switch (m_eBodyType)
|
||||
{
|
||||
case ACTOR::BOX:
|
||||
{
|
||||
// vVolume = half-extents(Hx,Hy,Hz) ¶ó°í °¡Á¤
|
||||
const _matrix ScaleMatrix =
|
||||
XMMatrixScaling(vVolume.x / 0.5f,
|
||||
vVolume.y / 0.5f,
|
||||
vVolume.z / 0.5f);
|
||||
m_pMainShape->Draw(ScaleMatrix * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
} break;
|
||||
case ACTOR::CAPSULE:
|
||||
{
|
||||
_float fHalf = vVolume.y;
|
||||
|
||||
_matrix ScaleMatrix =
|
||||
XMMatrixScaling(vVolume.x / 0.5f,
|
||||
fHalf / (2.f * 0.5f),
|
||||
vVolume.x / 0.5f);
|
||||
m_pMainShape->Draw(ScaleMatrix * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
|
||||
_matrix ScaleSphereMatrix = XMMatrixScaling(vVolume.x / 0.5f, vVolume.x / 0.5f, vVolume.x / 0.5f);
|
||||
|
||||
_matrix WorldUp = XMMatrixTranslation(0.f, +fHalf * 0.5f, 0.f);
|
||||
_matrix WorldDown = XMMatrixTranslation(0.f, -fHalf * 0.5f, 0.f);
|
||||
|
||||
m_pSubShape->Draw(ScaleSphereMatrix * WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
m_pSubShape->Draw(ScaleSphereMatrix * WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
void CCharacter_Controller::Modify_Volume(_float3 fVolume)
|
||||
{
|
||||
@@ -111,6 +159,12 @@ void CCharacter_Controller::Set_Position(_fvector vNewPos)
|
||||
m_pController->setPosition(pxLVec3NewPos);
|
||||
}
|
||||
|
||||
_vector CCharacter_Controller::Get_Position()
|
||||
{
|
||||
PSX::PxExtendedVec3 pxVPos = m_pController->getPosition();
|
||||
return XMVectorSet((_float)pxVPos.x, (_float)pxVPos.y, (_float)pxVPos.z, 1.f);
|
||||
}
|
||||
|
||||
_float3 CCharacter_Controller::Get_FootPosition()
|
||||
{
|
||||
PSX::PxExtendedVec3 pxLVecfootPos = m_pController->getFootPosition();
|
||||
@@ -143,8 +197,12 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
Desc.halfSideExtent = {};
|
||||
Desc.halfForwardExtent = {};
|
||||
Desc.contactOffset = pDesc->fContactOffset;
|
||||
Desc.material = m_pGameInstance->Get_Material(pDesc->fMaterial);
|
||||
Desc.material = m_pGameInstance->Get_Material(&pDesc->fMaterial);
|
||||
m_pController = m_pGameInstance->Add_BoxController(Desc);
|
||||
#ifdef _DEBUG
|
||||
_float3 vVolume = Get_Volume();
|
||||
m_pMainShape = (GeometricPrimitive::CreateBox(m_pContext, vVolume, false, false));
|
||||
#endif // _DEBUG
|
||||
} break;
|
||||
case Engine::ACTOR::CAPSULE:
|
||||
{
|
||||
@@ -153,8 +211,13 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
Desc.height = pDesc->tCapsuleInfo.fHeight;
|
||||
Desc.climbingMode = pDesc->tCapsuleInfo.eClimbingMode; // 񃧯 eEASY
|
||||
Desc.contactOffset = pDesc->fContactOffset;
|
||||
Desc.material = m_pGameInstance->Get_Material(pDesc->fMaterial);
|
||||
Desc.material = m_pGameInstance->Get_Material(&pDesc->fMaterial);
|
||||
m_pController = m_pGameInstance->Add_CapsuleController(Desc);
|
||||
#ifdef _DEBUG
|
||||
_float3 vVolume = Get_Volume();
|
||||
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, vVolume.x, 10, false, false));
|
||||
m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, vVolume.y, vVolume.x, 10, false));
|
||||
#endif // _DEBUG
|
||||
} break;
|
||||
default:
|
||||
assert(false); // PhysX¿¡¼ ºÒ°¡´É
|
||||
|
||||
@@ -345,6 +345,7 @@ void CComputeShader::Free()
|
||||
Safe_Release(m_pOutputUAV[i]);
|
||||
Safe_Release(m_pOutputBuffer[i]);
|
||||
Safe_Release(m_pOutputSRV[i]);
|
||||
Safe_Release(m_pOutputStagingBuffer[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
}
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Get_Material(_float3& vMatInfo)
|
||||
PSX::PxMaterial* CGameInstance::Get_Material(_float3* vMatInfo)
|
||||
{
|
||||
return m_pPhysX_Manager->Get_Material(vMatInfo);
|
||||
}
|
||||
@@ -569,10 +569,6 @@ void CGameInstance::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTr
|
||||
return m_pPhysX_Manager->RegistTriMesh(pName, pPxTriMesh);
|
||||
}
|
||||
|
||||
PSX::PxShape* CGameInstance::Create_Shape(ACTOR eType, _float3& vhalfGeometryInfo, PSX::PxMaterial& pxMaterial, _bool bExclusive, PSX::PxShapeFlags ePxShapeFlag)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_Shape(eType, vhalfGeometryInfo, pxMaterial, bExclusive, ePxShapeFlag);
|
||||
}
|
||||
const PSX::PxRigidDynamic* CGameInstance::Add_DynamicActor(CRigidBody& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_DynamicActor(RigidBody);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Mesh.h"
|
||||
#include "GameInstance.h"
|
||||
#include "ComputeShader.h"
|
||||
#include "Bone.h"
|
||||
|
||||
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CComponent{ pDevice , pContext }
|
||||
@@ -427,6 +428,9 @@ void CInstance_Model::Free()
|
||||
for (auto& pMesh : m_Meshes)
|
||||
Safe_Release(pMesh);
|
||||
|
||||
for (auto& pBone : m_Bones)
|
||||
Safe_Release(pBone);
|
||||
|
||||
Safe_Release(m_pComputeShader);
|
||||
Safe_Release(m_pConstantBuffer);
|
||||
Safe_Release(m_pParticleValueBuffer);
|
||||
|
||||
@@ -405,85 +405,6 @@ HRESULT CMaterial::Bind_SRV(CShader* pShader, const _char* pConstantName, _uint
|
||||
return pShader->Bind_SRV(pConstantName, m_SRVs[iType][iTextureIndex]);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CMaterial::Initialize(const _char* pModelFilePath, HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
for (int i = 0; i < AI_TEXTURE_TYPE_MAX; ++i) {
|
||||
_uint iNumSrv = { 0 };
|
||||
if (!ReadFile(hFile, &i, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &iNumSrv, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (iNumSrv == 0) {
|
||||
continue;
|
||||
}
|
||||
m_SRVs[i].reserve(iNumSrv);
|
||||
|
||||
ID3D11ShaderResourceView* pSRV = { nullptr };
|
||||
HRESULT hr = {};
|
||||
|
||||
for (_uint j = 0; j < iNumSrv; ++j) {
|
||||
_uint strLength = { 0 };
|
||||
if (!ReadFile(hFile, &strLength, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_char szTextureName[MAX_PATH] = {};
|
||||
if (!ReadFile(hFile, szTextureName, strLength, &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_char szTextureDir[MAX_PATH] = {};
|
||||
_char szDrive[MAX_PATH] = {};
|
||||
_char szDir[MAX_PATH] = {};
|
||||
_splitpath_s(pModelFilePath, szDrive, MAX_PATH, szDir, MAX_PATH, nullptr, 0, nullptr, 0);
|
||||
strcpy_s(szTextureDir, sizeof(_char) * MAX_PATH, szDrive);
|
||||
strcat_s(szTextureDir, sizeof(_char) * MAX_PATH, szDir);
|
||||
strcat_s(szTextureDir, sizeof(_char) * MAX_PATH, szTextureName);
|
||||
|
||||
|
||||
{
|
||||
_char szTextureFileName[MAX_PATH] = {};
|
||||
_char szTextureFilePath[MAX_PATH] = {};
|
||||
_char szDrive[MAX_PATH] = {};
|
||||
_char szDir[MAX_PATH] = {};
|
||||
_char szFileName[MAX_PATH] = {};
|
||||
_char szEXT[MAX_PATH] = {};
|
||||
_splitpath_s(szTextureDir, szDrive, MAX_PATH, szDir, MAX_PATH, szFileName, MAX_PATH, szEXT, MAX_PATH);
|
||||
strcpy_s(szTextureFileName, szDrive);
|
||||
strcat_s(szTextureFileName, szDir);
|
||||
strcat_s(szTextureFileName, szFileName);
|
||||
|
||||
strcat_s(szTextureFilePath, szTextureFileName);
|
||||
strcat_s(szTextureFilePath, ".dds");
|
||||
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV); // 일단 dds로 시도하고
|
||||
if (FAILED(hr)) {
|
||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||
strcat_s(szTextureFilePath, szTextureFileName);
|
||||
strcat_s(szTextureFilePath, szEXT);
|
||||
|
||||
if (false == strcmp(".tga", szEXT)) {
|
||||
assert(false); // trying to Load TGA
|
||||
hr = S_OK;
|
||||
}
|
||||
else {
|
||||
hr = CreateWICTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (FAILED(hr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_SRVs[i].push_back(pSRV);
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMaterial::Initialize(const _char* pModelFilePath, const SaveMaterial& _SaveMaterial)
|
||||
{
|
||||
for (size_t type = 0; type < 27; type++)
|
||||
@@ -524,19 +445,6 @@ HRESULT CMaterial::Initialize(const _char* pModelFilePath, const SaveMaterial& _
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CMaterial* CMaterial::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, HANDLE hFile, DWORD& dwByte) {
|
||||
CMaterial* pInstance = new CMaterial(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pModelFilePath, hFile, dwByte)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMaterial");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CMaterial* CMaterial::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, const SaveMaterial& _SaveMaterial)
|
||||
{
|
||||
CMaterial* pInstance = new CMaterial(pDevice, pContext);
|
||||
|
||||
@@ -607,7 +607,7 @@ HRESULT CMesh::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _fmatrix WorldMatrix)
|
||||
PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix)
|
||||
{
|
||||
PSX::PxTriangleMeshDesc tMeshDesc = {};
|
||||
vector<PSX::PxVec3> Vertices = {};
|
||||
@@ -616,7 +616,7 @@ PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam,
|
||||
tMeshDesc.points.count = m_iNumVertices;
|
||||
tMeshDesc.points.stride = sizeof(PSX::PxVec3);
|
||||
Vertices.resize(m_iNumVertices);
|
||||
XMVector3TransformCoordStream(reinterpret_cast<_float3*>(Vertices.data()), sizeof(PSX::PxVec3), (_float3*)m_pVertexPositions, sizeof(_float3), m_iNumVertices, WorldMatrix);
|
||||
memcpy(Vertices.data(), m_pVertexPositions, sizeof(PSX::PxVec3) * m_iNumVertices);
|
||||
tMeshDesc.points.data = Vertices.data();
|
||||
}
|
||||
{
|
||||
|
||||