diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 36b3df004..bd54db0ff 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -53,6 +53,7 @@ float4 g_fImagesUV[4]; float4 g_fImageSipos1; float4 g_fImageSipos2; float4 g_fImageSipos3; +float4 g_fImageSipos4; Texture2D g_Texture; Texture2D g_Texture1; @@ -95,7 +96,7 @@ struct VS_OUT VS_OUT VS_MAIN(VS_IN In) { - VS_OUT Out = (VS_OUT)0; + VS_OUT Out = (VS_OUT) 0; matrix matWV, matWVP; @@ -121,7 +122,7 @@ struct PS_OUT PS_OUT PS_MAIN(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -132,7 +133,7 @@ PS_OUT PS_MAIN(PS_IN In) PS_OUT PS_Texture_Color(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord); @@ -146,7 +147,7 @@ PS_OUT PS_Texture_Color(PS_IN In) PS_OUT PS_Logo(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -167,7 +168,7 @@ PS_OUT PS_Logo(PS_IN In) PS_OUT PS_Logo_Text(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -193,7 +194,7 @@ PS_OUT PS_Logo_Text(PS_IN In) PS_OUT PS_Logo_Glow(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -214,7 +215,7 @@ PS_OUT PS_Logo_Glow(PS_IN In) PS_OUT PS_AlphaBlend(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -229,7 +230,7 @@ PS_OUT PS_AlphaBlend(PS_IN In) PS_OUT PS_Clamp(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -244,7 +245,7 @@ PS_OUT PS_Clamp(PS_IN In) PS_OUT PS_Cursor(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); @@ -294,7 +295,7 @@ PS_OUT PS_Cursor(PS_IN In) PS_OUT PS_Key_Hold_Rotation(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -367,7 +368,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In) PS_OUT PS_Mission(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); @@ -389,7 +390,7 @@ PS_OUT PS_Mission(PS_IN In) PS_OUT PS_Sptire_Sheet(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); float2 UV = In.vTexcoord; @@ -424,7 +425,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In) PS_OUT PS_QuestType(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float3 Color = float3(253.f, 207.f, 11.f) / 255.f; float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -445,7 +446,7 @@ PS_OUT PS_QuestType(PS_IN In) PS_OUT PS_Spell_Anim(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -471,7 +472,7 @@ PS_OUT PS_Spell_Anim(PS_IN In) PS_OUT PS_NineSlice(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -535,7 +536,7 @@ PS_OUT PS_NineSlice(PS_IN In) PS_OUT PS_Rotation(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(0.f, 0.f, 0.f, 0.f); @@ -563,7 +564,7 @@ PS_OUT PS_Rotation(PS_IN In) PS_OUT PS_Slot(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float2 center = float2(0.5f, 0.5f); @@ -585,7 +586,7 @@ PS_OUT PS_Slot(PS_IN In) PS_OUT PS_SpellAnim(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; @@ -687,7 +688,7 @@ PS_OUT PS_SpellAnim(PS_IN In) PS_OUT PS_HpBar(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); @@ -784,7 +785,7 @@ PS_OUT PS_HpBar(PS_IN In) PS_OUT PS_Magic_Meter(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float3 Blue = float3(41.f, 165.f, 255.f) / 255.f; @@ -815,7 +816,7 @@ PS_OUT PS_Magic_Meter(PS_IN In) PS_OUT PS_Magic_Icon(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -851,7 +852,7 @@ PS_OUT PS_Magic_Icon(PS_IN In) PS_OUT PS_RemapUV(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -874,7 +875,7 @@ PS_OUT PS_RemapUV(PS_IN In) PS_OUT PS_Revelio(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -913,7 +914,7 @@ PS_OUT PS_Revelio(PS_IN In) PS_OUT PS_Potion(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f); @@ -956,7 +957,7 @@ PS_OUT PS_Potion(PS_IN In) PS_OUT PS_Magic_Item(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(1.f, 1.f, 1.f, 1.f); @@ -1080,7 +1081,7 @@ PS_OUT PS_Magic_Item(PS_IN In) PS_OUT PS_Spell_Preview(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1155,7 +1156,7 @@ PS_OUT PS_Spell_Preview(PS_IN In) PS_OUT PS_Spell_Header(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1201,7 +1202,7 @@ PS_OUT PS_Spell_Header(PS_IN In) PS_OUT PS_Spell_Header_Line(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1263,7 +1264,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In) PS_OUT PS_Spell_Drag(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1292,7 +1293,7 @@ PS_OUT PS_Spell_Drag(PS_IN In) PS_OUT PS_Camera_LockOn(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1334,7 +1335,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In) PS_OUT PS_Loding_Screen(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1365,7 +1366,7 @@ PS_OUT PS_Loding_Screen(PS_IN In) PS_OUT PS_Enemy_HpBer(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1451,7 +1452,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In) PS_OUT PS_Boss_HpBer(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1523,7 +1524,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In) PS_OUT PS_Quest_Border(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1590,7 +1591,7 @@ PS_OUT PS_Quest_Border(PS_IN In) PS_OUT PS_Quest_Info(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1653,7 +1654,7 @@ PS_OUT PS_Quest_Info(PS_IN In) PS_OUT PS_Quest_Status(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1724,7 +1725,7 @@ PS_OUT PS_Quest_Status(PS_IN In) PS_OUT PS_Broomstick(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(1.f, 1.f, 1.f, 1.f); @@ -1777,7 +1778,7 @@ PS_OUT PS_Broomstick(PS_IN In) PS_OUT PS_SpellLearn(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1798,7 +1799,7 @@ PS_OUT PS_SpellLearn(PS_IN In) PS_OUT PS_SpellLearnColor(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1870,7 +1871,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In) PS_OUT PS_SpellLearnBooster(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1914,7 +1915,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In) PS_OUT PS_NPCInteraction(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1987,7 +1988,7 @@ PS_OUT PS_NPCInteraction(PS_IN In) PS_OUT PS_CanvasFade(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(0.f, 0.f, 0.f, 1.f); @@ -2060,7 +2061,7 @@ PS_OUT PS_BroomCircle(PS_IN In) } } - if(g_iFinish == 0) + if (g_iFinish == 0) { float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; @@ -2079,6 +2080,181 @@ PS_OUT PS_BroomCircle(PS_IN In) return Out; } +PS_OUT PS_Ride_info_Key(PS_IN In) +{ + PS_OUT Out; + + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(ClampSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + + float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f); + if (inside2) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + +PS_OUT PS_Ride_Info(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex = g_Texture.Sample(ClampSampler, Finaluv); + + Color = tex; + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float4 tex1 = g_Texture1.Sample(ClampSampler, Imagelocal1); + Color = lerp(Color, tex1, tex1.a); + } + + float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f); + if (inside2) + { + float4 tex2 = g_Texture2.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex2, tex2.a); + } + + float2 Imagetexpos3 = g_fImageSipos3.xy / g_fCurrent_Size; + float2 Imagetexsize3 = g_fImageSipos3.zw / g_fCurrent_Size; + float2 Imagelocal3 = (In.vTexcoord - Imagetexpos3) / Imagetexsize3; + bool inside3 = all(Imagelocal3 >= 0.0f && Imagelocal3 <= 1.0f); + if (inside3) + { + float4 tex3 = g_Texture3.Sample(ClampSampler, Imagelocal3); + Color = lerp(Color, tex3, tex3.a); + } + + float2 Imagetexpos4 = g_fImageSipos4.xy / g_fCurrent_Size; + float2 Imagetexsize4 = g_fImageSipos4.zw / g_fCurrent_Size; + float2 Imagelocal4 = (In.vTexcoord - Imagetexpos4) / Imagetexsize4; + bool inside4 = all(Imagelocal4 >= 0.0f && Imagelocal4 <= 1.0f); + if (inside4) + { + float4 tex4 = g_Texture4.Sample(ClampSampler, Imagelocal4); + Color = lerp(Color, tex4, tex4.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + return Out; +} + +PS_OUT PS_Ride_HpSlot(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float2 center = float2(0.5f, 0.5f); + float2 BGuv = In.vTexcoord - center; + float2 Rotation = In.vTexcoord; + BGuv *= sqrt(2.0f); + Rotation.x = BGuv.x * cos(g_fAngle) - BGuv.y * sin(g_fAngle); + Rotation.y = BGuv.x * sin(g_fAngle) + BGuv.y * cos(g_fAngle); + Rotation += center; + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation); + + Color = tex1; + Color = lerp(tex1, tex2, tex2.a); + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal1); + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2125,7 +2301,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) PS_OUT PS_Enemy_Detection(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); @@ -2273,7 +2449,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In) PS_OUT PS_Interaction_Object(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); @@ -2291,7 +2467,7 @@ PS_OUT PS_Interaction_Object(PS_IN In) PS_OUT PS_Interaction_Npc(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -2381,7 +2557,7 @@ PS_OUT PS_BroomGateTarget(PS_IN In) technique11 PosTexTechnique11 { - pass Default + pass Default //0 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2471,7 +2647,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Sptire_Sheet(); } - pass Key_Hold_Rotation + pass Key_Hold_Rotation// 9 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2531,7 +2707,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Rotation(); } - pass Slot + pass Slot//15 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2579,7 +2755,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Magic_Icon(); } - pass RemapUV + pass RemapUV//20 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2629,7 +2805,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Preview(); } - pass Spell_Header + pass Spell_Header//25 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2679,7 +2855,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Loding_Screen(); } - pass Enemy_HpBer + pass Enemy_HpBer//30 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2729,7 +2905,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Status(); } - pass Broomstick + pass Broomstick//35 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2779,7 +2955,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_NPCInteraction(); } - pass CanvasFade + pass CanvasFade//40 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2809,6 +2985,36 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_BroomCircle(); } + pass Ride_info_Key + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_info_Key(); + } + + pass Ride_Info + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_Info(); + } + + pass Ride_HpSlot//45 + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_HpSlot(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); @@ -2839,7 +3045,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Interaction_Npc(); } - pass BroomGateTarget + pass BroomGateTarget//49 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_None, 0); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index f7e74c29a..a029d75bb 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -201,7 +201,6 @@ HRESULT CLevel_GamePlay::Ready_Lights() Desc.vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f); } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc))) { return E_FAIL; } @@ -306,7 +305,11 @@ HRESULT CLevel_GamePlay::Ready_Background() if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Land_Desc))) return E_FAIL; - + /* 물 오브젝트 */ + if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) { + return E_FAIL; + } + // --------------------------------- // >> M A P Configuration << // 맵 로드할지 안할지 bool 설정 @@ -367,11 +370,6 @@ HRESULT CLevel_GamePlay::Ready_Background() if (FAILED(Ready_Layer_Hogwart())) return E_FAIL; } - - /* 물 오브젝트 */ - if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) { - return E_FAIL; - } #endif if (FAILED(Ready_IntstanceProp())) diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index a92cf6d3f..4de85f7c0 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -575,10 +575,10 @@ HRESULT CLoader::Loading_For_GamePlay() )); } { /* BLDG_Potions */ - jobMapModels.emplace_back(Deferred_FolderLoad( + /*jobMapModels.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes", ".bin", false - )); + ));*/ jobMapModels.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions", ".bin", false @@ -707,10 +707,10 @@ HRESULT CLoader::Loading_For_GamePlay() )); } { /* SUB_HogsHead */ - jobMapModels.emplace_back(Deferred_FolderLoad( + /*jobMapModels.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_HogsHead/SUB_HogsHead_EXTLOD/ProxyAssets", ".bin", false - )); + ));*/ /* SUB_PippensPotions */ jobMapModels.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_PippensPotions/SUB_Pippens_EXTLOD/ProxyAssets", diff --git a/Jusin154_Team3D/Client/Private/MapElement_Lake.cpp b/Jusin154_Team3D/Client/Private/MapElement_Lake.cpp index e473bf5a8..123e89c9b 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Lake.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Lake.cpp @@ -94,6 +94,9 @@ HRESULT CMapElement_Lake::Render() if (FAILED(m_pModelComs[0]->Render(0))) { return E_FAIL; } + if (FAILED(m_pShallowModels[0]->Render(0))) { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index dfbf525d5..defd41fdd 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -20,7 +20,7 @@ namespace Client SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE, - FLAGWAVE, BROOMCIRCLE, + FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE,END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.bin index c8dd09079..a1a1073ca 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a425f685254b0d133c6350fd0f020e4f526efac9cdccfed91c6944313da3b34 +oid sha256:1db07c9f76accbd123a54079fada22e054faeb39de5d139a0e118a217c473256 size 67108864 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap.bin index 624d8db9d..c83e18247 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70a00e80f048ff149ec44044d738d5bbbbbc7e3d6adf4877de62ab209bc4dea2 +oid sha256:5d1403c26882c44252bc1a63ed0528c901904c7233bae4d4628f98bf4b2bfee2 size 1052676 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap2.bin deleted file mode 100644 index 624d8db9d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_HeightMap2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70a00e80f048ff149ec44044d738d5bbbbbc7e3d6adf4877de62ab209bc4dea2 -size 1052676 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_AlphaMap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_AlphaMap.bin index 12b3c5bdb..c450837ca 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_AlphaMap.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_AlphaMap.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ede88dfe51b7df9ba8c5b31cdac05271b4563a0706b9c61a8dc8910cc26c991 +oid sha256:a20876a27b9c0d56d8821ca63e6c35a30b13d84d94c681c44501faeb7c44291a size 83886080 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap.bin index 52a4d9956..cb940bcd3 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96f348613e941630ef113e523868c7e9fe043b3c24c1d0a66b428fddbb3663ad +oid sha256:d9c73a5d48022ff413f70ceb6c1dfca636b2515898175121c1057b9d66a0d0b9 size 1315332 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap1211.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap1211.bin new file mode 100644 index 000000000..52a4d9956 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogwart_HeightMap1211.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96f348613e941630ef113e523868c7e9fe043b3c24c1d0a66b428fddbb3663ad +size 1315332 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Water/Element_Water_Info.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Water/Element_Water_Info.xml index 61081ef62..34c1f1e0e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Water/Element_Water_Info.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Water/Element_Water_Info.xml @@ -22,12 +22,12 @@ Prototype_Component_Hogwart_Lake Prototype_Component_Hogwart_LakeSurFace - - + + - + @@ -35,7 +35,7 @@ - - + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes/Temo.txt b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes/Temo.txt new file mode 100644 index 000000000..e69de29bb diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 36b3df004..bd54db0ff 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -53,6 +53,7 @@ float4 g_fImagesUV[4]; float4 g_fImageSipos1; float4 g_fImageSipos2; float4 g_fImageSipos3; +float4 g_fImageSipos4; Texture2D g_Texture; Texture2D g_Texture1; @@ -95,7 +96,7 @@ struct VS_OUT VS_OUT VS_MAIN(VS_IN In) { - VS_OUT Out = (VS_OUT)0; + VS_OUT Out = (VS_OUT) 0; matrix matWV, matWVP; @@ -121,7 +122,7 @@ struct PS_OUT PS_OUT PS_MAIN(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -132,7 +133,7 @@ PS_OUT PS_MAIN(PS_IN In) PS_OUT PS_Texture_Color(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord); @@ -146,7 +147,7 @@ PS_OUT PS_Texture_Color(PS_IN In) PS_OUT PS_Logo(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -167,7 +168,7 @@ PS_OUT PS_Logo(PS_IN In) PS_OUT PS_Logo_Text(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -193,7 +194,7 @@ PS_OUT PS_Logo_Text(PS_IN In) PS_OUT PS_Logo_Glow(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -214,7 +215,7 @@ PS_OUT PS_Logo_Glow(PS_IN In) PS_OUT PS_AlphaBlend(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -229,7 +230,7 @@ PS_OUT PS_AlphaBlend(PS_IN In) PS_OUT PS_Clamp(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -244,7 +245,7 @@ PS_OUT PS_Clamp(PS_IN In) PS_OUT PS_Cursor(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); @@ -294,7 +295,7 @@ PS_OUT PS_Cursor(PS_IN In) PS_OUT PS_Key_Hold_Rotation(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -367,7 +368,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In) PS_OUT PS_Mission(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); @@ -389,7 +390,7 @@ PS_OUT PS_Mission(PS_IN In) PS_OUT PS_Sptire_Sheet(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(0.f, 0.f, 0.f, 0.f); float2 UV = In.vTexcoord; @@ -424,7 +425,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In) PS_OUT PS_QuestType(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float3 Color = float3(253.f, 207.f, 11.f) / 255.f; float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); @@ -445,7 +446,7 @@ PS_OUT PS_QuestType(PS_IN In) PS_OUT PS_Spell_Anim(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -471,7 +472,7 @@ PS_OUT PS_Spell_Anim(PS_IN In) PS_OUT PS_NineSlice(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -535,7 +536,7 @@ PS_OUT PS_NineSlice(PS_IN In) PS_OUT PS_Rotation(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(0.f, 0.f, 0.f, 0.f); @@ -563,7 +564,7 @@ PS_OUT PS_Rotation(PS_IN In) PS_OUT PS_Slot(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float2 center = float2(0.5f, 0.5f); @@ -585,7 +586,7 @@ PS_OUT PS_Slot(PS_IN In) PS_OUT PS_SpellAnim(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; @@ -687,7 +688,7 @@ PS_OUT PS_SpellAnim(PS_IN In) PS_OUT PS_HpBar(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); @@ -784,7 +785,7 @@ PS_OUT PS_HpBar(PS_IN In) PS_OUT PS_Magic_Meter(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float3 Blue = float3(41.f, 165.f, 255.f) / 255.f; @@ -815,7 +816,7 @@ PS_OUT PS_Magic_Meter(PS_IN In) PS_OUT PS_Magic_Icon(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -851,7 +852,7 @@ PS_OUT PS_Magic_Icon(PS_IN In) PS_OUT PS_RemapUV(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -874,7 +875,7 @@ PS_OUT PS_RemapUV(PS_IN In) PS_OUT PS_Revelio(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -913,7 +914,7 @@ PS_OUT PS_Revelio(PS_IN In) PS_OUT PS_Potion(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f); @@ -956,7 +957,7 @@ PS_OUT PS_Potion(PS_IN In) PS_OUT PS_Magic_Item(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(1.f, 1.f, 1.f, 1.f); @@ -1080,7 +1081,7 @@ PS_OUT PS_Magic_Item(PS_IN In) PS_OUT PS_Spell_Preview(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1155,7 +1156,7 @@ PS_OUT PS_Spell_Preview(PS_IN In) PS_OUT PS_Spell_Header(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1201,7 +1202,7 @@ PS_OUT PS_Spell_Header(PS_IN In) PS_OUT PS_Spell_Header_Line(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1263,7 +1264,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In) PS_OUT PS_Spell_Drag(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1292,7 +1293,7 @@ PS_OUT PS_Spell_Drag(PS_IN In) PS_OUT PS_Camera_LockOn(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1334,7 +1335,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In) PS_OUT PS_Loding_Screen(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1365,7 +1366,7 @@ PS_OUT PS_Loding_Screen(PS_IN In) PS_OUT PS_Enemy_HpBer(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1451,7 +1452,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In) PS_OUT PS_Boss_HpBer(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1523,7 +1524,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In) PS_OUT PS_Quest_Border(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1590,7 +1591,7 @@ PS_OUT PS_Quest_Border(PS_IN In) PS_OUT PS_Quest_Info(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1653,7 +1654,7 @@ PS_OUT PS_Quest_Info(PS_IN In) PS_OUT PS_Quest_Status(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1724,7 +1725,7 @@ PS_OUT PS_Quest_Status(PS_IN In) PS_OUT PS_Broomstick(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 color = float4(1.f, 1.f, 1.f, 1.f); @@ -1777,7 +1778,7 @@ PS_OUT PS_Broomstick(PS_IN In) PS_OUT PS_SpellLearn(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1798,7 +1799,7 @@ PS_OUT PS_SpellLearn(PS_IN In) PS_OUT PS_SpellLearnColor(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1870,7 +1871,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In) PS_OUT PS_SpellLearnBooster(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); @@ -1914,7 +1915,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In) PS_OUT PS_NPCInteraction(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -1987,7 +1988,7 @@ PS_OUT PS_NPCInteraction(PS_IN In) PS_OUT PS_CanvasFade(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(0.f, 0.f, 0.f, 1.f); @@ -2060,7 +2061,7 @@ PS_OUT PS_BroomCircle(PS_IN In) } } - if(g_iFinish == 0) + if (g_iFinish == 0) { float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; @@ -2079,6 +2080,181 @@ PS_OUT PS_BroomCircle(PS_IN In) return Out; } +PS_OUT PS_Ride_info_Key(PS_IN In) +{ + PS_OUT Out; + + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(ClampSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + + float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f); + if (inside2) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + +PS_OUT PS_Ride_Info(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex = g_Texture.Sample(ClampSampler, Finaluv); + + Color = tex; + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float4 tex1 = g_Texture1.Sample(ClampSampler, Imagelocal1); + Color = lerp(Color, tex1, tex1.a); + } + + float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f); + if (inside2) + { + float4 tex2 = g_Texture2.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex2, tex2.a); + } + + float2 Imagetexpos3 = g_fImageSipos3.xy / g_fCurrent_Size; + float2 Imagetexsize3 = g_fImageSipos3.zw / g_fCurrent_Size; + float2 Imagelocal3 = (In.vTexcoord - Imagetexpos3) / Imagetexsize3; + bool inside3 = all(Imagelocal3 >= 0.0f && Imagelocal3 <= 1.0f); + if (inside3) + { + float4 tex3 = g_Texture3.Sample(ClampSampler, Imagelocal3); + Color = lerp(Color, tex3, tex3.a); + } + + float2 Imagetexpos4 = g_fImageSipos4.xy / g_fCurrent_Size; + float2 Imagetexsize4 = g_fImageSipos4.zw / g_fCurrent_Size; + float2 Imagelocal4 = (In.vTexcoord - Imagetexpos4) / Imagetexsize4; + bool inside4 = all(Imagelocal4 >= 0.0f && Imagelocal4 <= 1.0f); + if (inside4) + { + float4 tex4 = g_Texture4.Sample(ClampSampler, Imagelocal4); + Color = lerp(Color, tex4, tex4.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + return Out; +} + +PS_OUT PS_Ride_HpSlot(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float2 center = float2(0.5f, 0.5f); + float2 BGuv = In.vTexcoord - center; + float2 Rotation = In.vTexcoord; + BGuv *= sqrt(2.0f); + Rotation.x = BGuv.x * cos(g_fAngle) - BGuv.y * sin(g_fAngle); + Rotation.y = BGuv.x * sin(g_fAngle) + BGuv.y * cos(g_fAngle); + Rotation += center; + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation); + + Color = tex1; + Color = lerp(tex1, tex2, tex2.a); + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal1); + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2125,7 +2301,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) PS_OUT PS_Enemy_Detection(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); @@ -2273,7 +2449,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In) PS_OUT PS_Interaction_Object(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); @@ -2291,7 +2467,7 @@ PS_OUT PS_Interaction_Object(PS_IN In) PS_OUT PS_Interaction_Npc(PS_IN In) { - PS_OUT Out = (PS_OUT)0; + PS_OUT Out = (PS_OUT) 0; float Alpha = g_fAlpha; float4 Color = float4(1.f, 1.f, 1.f, 1.f); float2 uv = In.vTexcoord; @@ -2381,7 +2557,7 @@ PS_OUT PS_BroomGateTarget(PS_IN In) technique11 PosTexTechnique11 { - pass Default + pass Default //0 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2471,7 +2647,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Sptire_Sheet(); } - pass Key_Hold_Rotation + pass Key_Hold_Rotation// 9 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2531,7 +2707,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Rotation(); } - pass Slot + pass Slot//15 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2579,7 +2755,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Magic_Icon(); } - pass RemapUV + pass RemapUV//20 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2629,7 +2805,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Preview(); } - pass Spell_Header + pass Spell_Header//25 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2679,7 +2855,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Loding_Screen(); } - pass Enemy_HpBer + pass Enemy_HpBer//30 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2729,7 +2905,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Status(); } - pass Broomstick + pass Broomstick//35 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2779,7 +2955,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_NPCInteraction(); } - pass CanvasFade + pass CanvasFade//40 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2809,6 +2985,36 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_BroomCircle(); } + pass Ride_info_Key + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_info_Key(); + } + + pass Ride_Info + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_Info(); + } + + pass Ride_HpSlot//45 + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Ride_HpSlot(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); @@ -2839,7 +3045,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Interaction_Npc(); } - pass BroomGateTarget + pass BroomGateTarget//49 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_None, 0); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl index 1bb9ad1ec..124415419 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl @@ -737,7 +737,7 @@ PS_OUT PS_LAKE(PS_IN In) float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 30.f); float3 vNoise = (g_NoiseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord + g_fTime * 0.1f).rgb - 0.5f) * 0.3f; - float4 vCaustics = g_CausticsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 30.f + vNoise.g); + float4 vCaustics = g_CausticsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 10.f + vNoise.g); float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, vUV + vNoise.g); float3 vNormalLarge = DecodeNormalFromRG(g_NormalLargeTexture, AnisoTropy_BLUR_Sampler, vUVLarge + vNoise.r); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_BroomHUDIcon.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_BroomHUDIcon.png new file mode 100644 index 000000000..efced2c4e Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_BroomHUDIcon.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_CreatureHappiness_Positive.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_CreatureHappiness_Positive.png new file mode 100644 index 000000000..ca1ac0494 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_CreatureHappiness_Positive.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_DropShadow.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_DropShadow.png new file mode 100644 index 000000000..636c049ab Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_DropShadow.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_BorderOrnament_Left.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_BorderOrnament_Left.png new file mode 100644 index 000000000..7b9b77f7c Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_BorderOrnament_Left.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_DpadOrnament.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_DpadOrnament.png new file mode 100644 index 000000000..242b94f8e Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_MissionBanner_DpadOrnament.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_Plus.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_Plus.png new file mode 100644 index 000000000..d2044851a Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/BroomFlight/UI_T_Plus.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index fac2ba32b..d51883785 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -218,6 +218,14 @@ call Update_Shaders.bat + + + + + + + + @@ -482,6 +490,14 @@ call Update_Shaders.bat + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 662e247c0..e9f8aad21 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -370,33 +370,6 @@ {62f1bdfb-9162-434a-a462-b63f5e763277} - - {9c21aba5-00c1-4b4c-8a82-dac7a156fd9b} - - - {a56502cb-b0b8-4ea7-bc5e-5482b416fef9} - - - {8a70232d-f917-4ff6-b617-302e325996ae} - - - {dac78c4e-b898-45dc-8740-794899de0c69} - - - {d5681f71-af29-4418-bf3a-a1486c6ba171} - - - {029a22c4-ab06-4db0-9527-4e3cfa1a2e0d} - - - {b017e167-f48d-4417-a924-765ab802cff5} - - - {904a7ae5-33fe-49a1-9f31-27443acc9e1a} - - - {0b8cac41-419f-48ce-87bc-805b8962b4df} - {99125f58-acb9-4e9c-af15-87bf4e09c9b1} @@ -622,9 +595,6 @@ {d9382839-c0b8-4b3d-9227-6dcf65fba44f} - - {eef1db06-8a9f-42b4-93e2-cc29de2b275d} - {6e769435-83c4-4f64-b306-1b8c5f2d228d} @@ -652,12 +622,6 @@ {7f9672aa-71b3-4b77-9c3b-790014eccdba} - - {ed83440e-f038-4fe2-b005-4ba4093e8462} - - - {0a3dcff9-5567-4984-a8e7-b1d2ee8d6bce} - {0c039454-c5e4-4fbc-832e-06acb0f86f43} @@ -712,6 +676,66 @@ {cbb99946-a4d6-4ad8-842c-e67ca5de3f3a} + + {d60155b8-01ad-4234-825c-0041caf965ce} + + + {34d67344-ac98-41d4-aea3-9fa1bac8624a} + + + {9c21aba5-00c1-4b4c-8a82-dac7a156fd9b} + + + {a56502cb-b0b8-4ea7-bc5e-5482b416fef9} + + + {0a3dcff9-5567-4984-a8e7-b1d2ee8d6bce} + + + {8a70232d-f917-4ff6-b617-302e325996ae} + + + {dac78c4e-b898-45dc-8740-794899de0c69} + + + {d5681f71-af29-4418-bf3a-a1486c6ba171} + + + {029a22c4-ab06-4db0-9527-4e3cfa1a2e0d} + + + {b017e167-f48d-4417-a924-765ab802cff5} + + + {904a7ae5-33fe-49a1-9f31-27443acc9e1a} + + + {0b8cac41-419f-48ce-87bc-805b8962b4df} + + + {eef1db06-8a9f-42b4-93e2-cc29de2b275d} + + + {ed83440e-f038-4fe2-b005-4ba4093e8462} + + + {50d8b575-674f-4bff-84bd-3bdb4b22e6ab} + + + {8ada79e8-727c-40c3-95dc-ce34b8924e69} + + + {906987cf-14ce-4676-8ca7-a68b6b2c29b6} + + + {d26ffa70-5843-4e91-8a54-907abcc35a77} + + + {12d83369-3413-478f-920e-c3c0ddeabfe8} + + + {353f9458-6fe9-4159-a1c6-1f3a85cffda9} + {1402a2f4-a28b-4f95-b4ec-249a840fa819} @@ -1452,6 +1476,30 @@ 50.UI\GamePlay_Canvas\Broom_Panel\Broom_Trophy + + 50.UI\GamePlay_Canvas\Ride_Panel + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Info + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot + 02.GameObjects\Env\06.InstancedProp\Light @@ -2200,6 +2248,30 @@ 50.UI\GamePlay_Canvas\Broom_Panel\Broom_Trophy + + 50.UI\GamePlay_Canvas\Ride_Panel + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Info + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot + 02.GameObjects\Env\06.InstancedProp\Light diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp index 2973511e7..a1027340f 100644 --- a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp @@ -56,7 +56,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) Magic_Meter_UV(); Magic_Meter_Visible(1, true); Magic_Meter_Visible(5, true); - Visible(true); + Visible(false); ElementAllVisible(true); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Broom_Fiish.cpp b/Jusin154_Team3D/Editor/Private/Broom_Fiish.cpp index 47c32e737..aed7aa01b 100644 --- a/Jusin154_Team3D/Editor/Private/Broom_Fiish.cpp +++ b/Jusin154_Team3D/Editor/Private/Broom_Fiish.cpp @@ -237,7 +237,7 @@ CGameObject* CBroom_Finish::Clone(void* pArg, CGameObject* pOwner) } void CBroom_Finish::Free() -{ +{ __super::Free(); SAFE_RELEASE(m_pDiffuse_TextureCom); diff --git a/Jusin154_Team3D/Editor/Private/Broom_Panel.cpp b/Jusin154_Team3D/Editor/Private/Broom_Panel.cpp index 713e235b0..ce72872dd 100644 --- a/Jusin154_Team3D/Editor/Private/Broom_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Broom_Panel.cpp @@ -49,7 +49,7 @@ HRESULT CBroom_Panel::Initialize(void* pArg) return E_FAIL; } - Visible(true); + Visible(false); ElementAllVisible(true); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp index d65b6c305..f6a3e43d5 100644 --- a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp @@ -9,6 +9,7 @@ #include "Mouse_Cursor.h" #include "Enemy_Panel.h" #include "Broom_Panel.h" +#include "Ride_Panel.h" CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CCanvasObject(pDevice, pContext) @@ -130,6 +131,12 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg) } Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Ride_Panel"), m_pRide_Panel); + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp index 33d66d872..9e7c0d4b3 100644 --- a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp @@ -51,7 +51,7 @@ HRESULT CLevel_MapViewer::Initialize() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함! + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Z_Layer_EffectPool")))) //플레이어보다 먼저 생성해야함! { return E_FAIL; } @@ -189,31 +189,31 @@ HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag) CMapElement_Lake::MAPOBJECT_LAKE_DESC Lake_Desc = {}; - //vector<_wstring> ModelPrototypeTags; - //vector<_wstring> ShallowModelPrototypeTags; - //ModelPrototypeTags.push_back(TEXT("Prototype_Component_Hogwart_Lake")); - //ShallowModelPrototypeTags.push_back(TEXT("Prototype_Component_Hogwart_LakeSurFace")); - //Lake_Desc.bEdit = false; - //Lake_Desc.iMaxLodLevel = 0; - //Lake_Desc.iRenderType = 4; - //Lake_Desc.vPosition = _float3(-144.f, -61.9f, -115.f); - //Lake_Desc.vRotation = _float3(0.f, 0.f, 0.f); - //Lake_Desc.vScale = _float3(1.f, 1.f, 1.f); - //Lake_Desc.fTimeSpeed = _float(0.02f); - //Lake_Desc.fRefractionStrength = _float(); - //Lake_Desc.fRefractionPow = _float(); - //Lake_Desc.fUVValue1 = _float(); - //Lake_Desc.fUVValue2 = _float(); - //Lake_Desc.fUVValue3 = _float(); - //Lake_Desc.vUVSpeed = _float2(); - //Lake_Desc.vLargeUVSpeed = _float2(); - //Lake_Desc.vSubUVSpeed3 = _float2(); - //Lake_Desc.vRefractionColor = _float4(); - //Lake_Desc.vSurfaceColor = _float4(); - //Lake_Desc.ModelPrototypeTags = ModelPrototypeTags; - //Lake_Desc.ShallowModelPrototypeTags = ShallowModelPrototypeTags; - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Lake_Desc))) - // return E_FAIL; + vector<_wstring> ModelPrototypeTags; + vector<_wstring> ShallowModelPrototypeTags; + ModelPrototypeTags.push_back(TEXT("Prototype_Component_Hogwart_Lake")); + ShallowModelPrototypeTags.push_back(TEXT("Prototype_Component_Hogwart_LakeSurFace")); + Lake_Desc.bEdit = false; + Lake_Desc.iMaxLodLevel = 0; + Lake_Desc.iRenderType = 4; + Lake_Desc.vPosition = _float3(-89.2f, -61.6f, -657.8f); + Lake_Desc.vRotation = _float3(0.f, 0.f, 0.f); + Lake_Desc.vScale = _float3(1.3f, 1.f, 1.3f); + Lake_Desc.fTimeSpeed = _float(0.02f); + Lake_Desc.fRefractionStrength = 0.08f; + Lake_Desc.fRefractionPow = 1.5f; + Lake_Desc.fUVValue1 = 10.f; + Lake_Desc.fUVValue2 = 20.f; + Lake_Desc.fUVValue3 = 20.f; + Lake_Desc.vUVSpeed = _float2(0.1f, 0.f); + Lake_Desc.vLargeUVSpeed = _float2(0.3f, 0.1f); + Lake_Desc.vSubUVSpeed3 = _float2(10.f, 0.f); + Lake_Desc.vRefractionColor = _float4(0.35f, 0.35f, 0.35f, 1.f); + Lake_Desc.vSurfaceColor = _float4(0.25f, 0.f, 1.f, 1.f); + Lake_Desc.ModelPrototypeTags = ModelPrototypeTags; + Lake_Desc.ShallowModelPrototypeTags = ShallowModelPrototypeTags; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Lake_Desc))) + return E_FAIL; return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 0a5501432..daedf2f67 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -135,6 +135,15 @@ #include "Broom_Exit.h" #include "broom_Trophy.h" +#include "Ride_Panel.h" +#include "Ride_Info_Key.h" +#include "Ride_Info.h" +#include "Ride_InfoBG.h" +#include "Ride_Bbooster_Slot.h" +#include "Ride_BboosterBar.h" +#include "Ride_HpBar.h" +#include "Ride_HpSlot.h" + #include "NPCInteraction.h" #include "Dialogue.h" @@ -1216,11 +1225,45 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } - - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNPCInteraction::Create(m_pDevice, m_pContext)))) + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Panel::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Info_Key::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Info::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_InfoBG::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_HpSlot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_HpBar::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + if(FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNPCInteraction::Create(m_pDevice, m_pContext)))) + { + + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDialogue::Create(m_pDevice, m_pContext)))) { @@ -2905,7 +2948,7 @@ HRESULT CLoader::Loading_For_MapViewer() #pragma endregion -_bool bLoadHogsmeade = false; +_bool bLoadHogsmeade = true; if (bLoadHogsmeade) { #pragma region HOGSMEADE_OBJECT @@ -3292,10 +3335,10 @@ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Sanctum_Dungeon\\Mes vector> jobFutures; -_uint iLoadCount = 46; +_uint iLoadCount = 44; vector*> Contents(iLoadCount); -_bool isLoad_Map = { false }; +_bool isLoad_Map = { true }; if(isLoad_Map) { { /* Terrain */ @@ -3374,11 +3417,6 @@ if(isLoad_Map) )); } { /* BLDG_HogsheadInn */ - jobFutures.emplace_back(Deferred_FolderLoad( - "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes", - ".bin", false, - &Contents[jobFutures.size()] - )); jobFutures.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision", ".bin", false, @@ -3446,11 +3484,6 @@ if(isLoad_Map) )); } { /* BLDG_Potions */ - jobFutures.emplace_back(Deferred_FolderLoad( - "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes", - ".bin", false, - &Contents[jobFutures.size()] - )); jobFutures.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions", ".bin", false, diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp index 2f30f1ed7..4fa233b29 100644 --- a/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp +++ b/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp @@ -51,8 +51,21 @@ HRESULT CMapElement_Lake::Initialize(void* pArg) m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z)); #endif // _DEBUG - m_vRefractionColor = _float4(1.f, 1.f, 1.f, 1.f); - m_vSurfaceColor = _float4(1.f, 1.f, 1.f, 1.f); + m_fTimeSpeed = pDesc->fTimeSpeed; + + m_fRefractionStrength = pDesc->fRefractionStrength; + m_fRefractionPow = pDesc->fRefractionPow; + + m_fUVValue1 = pDesc->fUVValue1; + m_fUVValue2 = pDesc->fUVValue2; + m_fUVValue3 = pDesc->fUVValue3; + + m_vUVSpeed = pDesc->vUVSpeed; + m_vLargeUVSpeed = pDesc->vLargeUVSpeed; + m_vSubUVSpeed3 = pDesc->vSubUVSpeed3; + + memcpy(&m_vRefractionColor, &pDesc->vRefractionColor, sizeof(_float4)); + memcpy(&m_vSurfaceColor, &pDesc->vSurfaceColor, sizeof(_float4)); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp index e22ff2076..103ece47a 100644 --- a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp +++ b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp @@ -120,7 +120,7 @@ void CMapObject_LOD::Late_Update(_float fTimeDelta) m_fCamDepth = XMVectorGetX(XMVector3LengthSq(vCamPosition - XMLoadFloat4(&m_vExtentPosition))); - m_iLodIndex = min(m_iMaxLodLevel, (_uint)(m_fCamDepth / (fRaius * fRaius + 40000.f))); + m_iLodIndex = min(m_iMaxLodLevel, (_uint)(m_fCamDepth / (fRaius * fRaius + 10000.f))); if (m_pGameInstance->Key_Pressing(DIK_Z)) m_iLodIndex = 0; diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp index e543244bb..0bf64b28c 100644 --- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp @@ -65,8 +65,8 @@ HRESULT CMapObject_Manager::Initialize(void* pArg) m_iContainerObjectIndex = 99; - //if (FAILED(Load_MapData("Hogsmeade_MapContainer_Data", LAYER_HOGSMEADE))) - // return E_FAIL; + if (FAILED(Load_MapData("Hogsmeade_MapContainer_Data", LAYER_HOGSMEADE))) + return E_FAIL; //m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object(); diff --git a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp new file mode 100644 index 000000000..6805dd903 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp @@ -0,0 +1,221 @@ +#include "pch.h" +#include "Ride_BboosterBar.h" +#include "GameInstance.h" + +CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_BboosterBar::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_BboosterBar::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = -140.f; + Desc.fSizeX = 1920.f; + Desc.fSizeY = 1080.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + return S_OK; +} + +void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_BboosterBar::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + + __super::Update(fTimeDelta); +} + +void CRide_BboosterBar::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_BboosterBar::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_BboosterBar::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_BboosterBar::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + 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_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_BboosterBar::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Finish"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_BboosterBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_BboosterBar::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_BboosterBar::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp new file mode 100644 index 000000000..4710d7fee --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp @@ -0,0 +1,247 @@ +#include "pch.h" +#include "Ride_Bbooster_Slot.h" +#include "GameInstance.h" + +CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +{ + return S_OK; +} +HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 100.f; + Desc.fY = -150.f; + Desc.fSizeX = 80.f; + Desc.fSizeY = 80.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 3.f; + m_fAngle = XMConvertToRadians(-130.f); + m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + return S_OK; +} + +void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} +void CRide_Bbooster_Slot::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + + __super::Update(fTimeDelta); +} + +void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_Bbooster_Slot::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_Bbooster_Slot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + 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_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Bbooster_Slot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_Bbooster_Slot::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp new file mode 100644 index 000000000..6f371f282 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp @@ -0,0 +1,250 @@ +#include "pch.h" +#include "Ride_HpBar.h" +#include "GameInstance.h" + +CRide_HpBar::CRide_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_HpBar::CRide_HpBar(const CRide_HpBar& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_HpBar::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_HpBar::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 170.f; + Desc.fY = -180.f; + Desc.fSizeX = 80.f; + Desc.fSizeY = 80.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 3.f; + m_fAngle = XMConvertToRadians(-130.f); + m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + return S_OK; +} + +void CRide_HpBar::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_HpBar::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + + __super::Update(fTimeDelta); +} + +void CRide_HpBar::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_HpBar::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_HpBar::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_HpBar::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + 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_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_HpBar::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_HpBar* CRide_HpBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_HpBar* pInstance = new CRide_HpBar(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_HpBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_HpBar::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_HpBar* pInstance = new CRide_HpBar(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_HpBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_HpBar::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + + +void CRide_HpBar::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_HpSlot.cpp b/Jusin154_Team3D/Editor/Private/Ride_HpSlot.cpp new file mode 100644 index 000000000..f6d344024 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_HpSlot.cpp @@ -0,0 +1,249 @@ +#include "pch.h" +#include "Ride_HpSlot.h" +#include "GameInstance.h" + +CRide_HpSlot::CRide_HpSlot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_HpSlot::CRide_HpSlot(const CRide_HpSlot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_HpSlot::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_HpSlot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 170.f; + Desc.fY = -180.f; + Desc.fSizeX = 80.f; + Desc.fSizeY = 80.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 3.f; + m_fAngle = XMConvertToRadians(-130.f); + m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + return S_OK; +} + +void CRide_HpSlot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_HpSlot::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CRide_HpSlot::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_HpSlot::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_HpSlot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_HpSlot::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + 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_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_HpSlot::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_CreatureHappiness_Positive"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_HpSlot* CRide_HpSlot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_HpSlot* pInstance = new CRide_HpSlot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_HpSlot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_HpSlot::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_HpSlot* pInstance = new CRide_HpSlot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_HpSlot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_HpSlot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + + +void CRide_HpSlot::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_Info.cpp b/Jusin154_Team3D/Editor/Private/Ride_Info.cpp new file mode 100644 index 000000000..b0e20298a --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_Info.cpp @@ -0,0 +1,303 @@ +#include "pch.h" +#include "Ride_Info.h" +#include "GameInstance.h" + +CRide_Info::CRide_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Info::CRide_Info(const CRide_Info& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Info::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Info::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = -0.f; + Desc.fSizeX = 256.f; + Desc.fSizeY = 128.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + m_vNine_Slice = _float4(256.f, 500.f, 80.f, 150.f); + SizeUpX(500.f); + SizeUpY(400.f); + MoveX(210); + MoveY(20); + return S_OK; +} + +void CRide_Info::Set_Posi() +{ + m_vImagePosi1 = _float4(65.f, 70.f, 32.f, 32.f); + m_vImagePosi2 = _float4(50.f, 137.5f, 32.f, 32.f); + m_vImagePosi3 = _float4(50.f, 192.5f, 32.f, 32.f); + m_vImagePosi4 = _float4(90.f, 192.5f, 32.f, 32.f); +} + +void CRide_Info::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Info::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + Set_Posi(); + m_fTime += fTimeDelta * m_fTimeMult; + + __super::Update(fTimeDelta); +} + +void CRide_Info::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_Info::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_INFO)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("빗자루 컨트롤"), _float2(1480.f + m_fX, 585.f + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("스피드 버스트"), _float2(1500.f + m_fX, 635.f + m_fY)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("(전환)비행 가속"), _float2(1490.f + m_fX, 700.f + m_fY)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("하강 / 상승"), _float2(1525.f + m_fX, 755.f + m_fY)); + + return S_OK; +} + +_vector CRide_Info::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + + +HRESULT CRide_Info::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0))) + { + 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_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImagePosi1, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos2", &m_vImagePosi2, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos3", &m_vImagePosi3, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos4", &m_vImagePosi4, sizeof(_float4)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_Info::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_MissionBanner_BorderOrnament_Left"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_Shift"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_Control"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_Space"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Info* CRide_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Info* pInstance = new CRide_Info(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Info"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Info::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Info* pInstance = new CRide_Info(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBroom_Finish"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Info::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_Info::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp b/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp new file mode 100644 index 000000000..b6221fe71 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp @@ -0,0 +1,220 @@ +#include "pch.h" +#include "Ride_InfoBG.h" +#include "GameInstance.h" + +CRide_InfoBG::CRide_InfoBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_InfoBG::CRide_InfoBG(const CRide_InfoBG& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_InfoBG::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_InfoBG::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 80.f; + Desc.fY = 100.f; + Desc.fSizeX = 400.f; + Desc.fSizeY = 370.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + return S_OK; +} + +void CRide_InfoBG::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_InfoBG::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + + __super::Update(fTimeDelta); +} + +void CRide_InfoBG::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_InfoBG::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} +_vector CRide_InfoBG::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_InfoBG::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + 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_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_InfoBG::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_DropShadow"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_InfoBG* CRide_InfoBG::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_InfoBG* pInstance = new CRide_InfoBG(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_InfoBG"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_InfoBG::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_InfoBG* pInstance = new CRide_InfoBG(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_InfoBG"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_InfoBG::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_InfoBG::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_Info_Key.cpp b/Jusin154_Team3D/Editor/Private/Ride_Info_Key.cpp new file mode 100644 index 000000000..4539cf8d0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_Info_Key.cpp @@ -0,0 +1,289 @@ +#include "pch.h" +#include "Ride_Info_Key.h" +#include "GameInstance.h" + +CRide_Info_Key::CRide_Info_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Info_Key::CRide_Info_Key(const CRide_Info_Key& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Info_Key::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Info_Key::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 130.f; + Desc.fY = -50.f; + Desc.fSizeX = 170.f; + Desc.fSizeY = 80.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 150.f; + m_fAlpha = 1.f; + m_fAlphaTime = 1.f; + m_vUV = Compute_UV('Q'); + return S_OK; +} + +_float4 CRide_Info_Key::Compute_UV(_tchar Alphabet) +{ + _uint Number = CMyTools::AlphabetToInt(Alphabet); + + _float2 fImage_Size = { 320.f, 384.f }; + + _uint iXCount = 5; + _uint iYCount = 6; + + _float frameWidth = 64.f; + _float frameHeight = 64.f; + + _uint iframeX = Number % iXCount; + _uint iframeY = Number / iXCount; + + _float2 UVStart; + UVStart.x = iframeX * frameWidth / fImage_Size.x; + UVStart.y = iframeY * frameHeight / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (frameWidth / fImage_Size.x); + UVEnd.y = UVStart.y + (frameHeight / fImage_Size.y); + + return _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y); +} + +void CRide_Info_Key::Set_Posi() +{ + m_vImagePosi1 = _float4(110.f, 20.f, 40.f, 40.f); + m_vImagePosi2 = _float4(40.f, 20.f, 40.f, 40.f); +} + +void CRide_Info_Key::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Info_Key::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + Set_Posi(); + + __super::Update(fTimeDelta); +} + +void CRide_Info_Key::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_Info_Key::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_INFO_KEY)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_Info_Key::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Info_Key::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + 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_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImagePosi1, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos2", &m_vImagePosi2, sizeof(_float4)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRide_Info_Key::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_MissionBanner_DpadOrnament"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Info_Key* CRide_Info_Key::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Info_Key* pInstance = new CRide_Info_Key(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Info_Key"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Info_Key::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Info_Key* pInstance = new CRide_Info_Key(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Info_Key"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Info_Key::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_Info_Key::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp new file mode 100644 index 000000000..f0244e20f --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp @@ -0,0 +1,200 @@ +#include "pch.h" +#include "Ride_Panel.h" +#include "GameInstance.h" +#include "Ride_Info_Key.h" +#include "Ride_Info.h" +#include "Ride_InfoBG.h" +#include "Ride_Bbooster_Slot.h" +#include "Ride_BboosterBar.h" +#include "Ride_HpBar.h" +#include "Ride_HpSlot.h" + +CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CRide_Panel::CRide_Panel(const CRide_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CRide_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 1650.f; + Desc.fY = -800.f; + Desc.fSizeX = 500.f; + Desc.fSizeY = 500.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + + m_fCanvasAlpha = 1.f; + Visible(true); + ElementAllVisible(true); + return S_OK; +} + +void CRide_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CRide_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); + +} + +HRESULT CRide_Panel::Render() +{ + + return S_OK; +} + +_vector CRide_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Panel::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CRide_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRide_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Info"), m_pRide_Info); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_HpSlot"), m_pRide_HpSlot); + + return S_OK; +} + +CRide_Panel* CRide_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Panel* pInstance = new CRide_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Panel* pInstance = new CRide_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CRide_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Terrain.cpp b/Jusin154_Team3D/Editor/Private/Terrain.cpp index e0fc616a2..c6ba187c0 100644 --- a/Jusin154_Team3D/Editor/Private/Terrain.cpp +++ b/Jusin154_Team3D/Editor/Private/Terrain.cpp @@ -83,7 +83,7 @@ void CTerrain::Update(_float fTimeDelta) { if (m_isEdit) Describe_Entity(); - + //m_pVIBufferCom->Culling(m_pTransformCom->Get_XMWorldMatrix()); if(m_pGameInstance->Key_Down(DIK_LCONTROL) && m_pGameInstance->Key_Down(DIK_W)) @@ -182,23 +182,25 @@ HRESULT CTerrain::Bind_ShaderResources() return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))) { return E_FAIL; } - - if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))){ + if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))) { return E_FAIL; } - if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))){ - return E_FAIL; - } - if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))){ + if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))) { return E_FAIL; } if (FAILED(m_pShaderCom->Bind_SRV("g_MaskTexture", m_pAlphaMap->Get_SRV()))) { 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_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float)))) return E_FAIL; @@ -315,24 +317,24 @@ void CTerrain::Describe_Entity() if (GUI::Button("Load", ImVec2(100.f, 30.f))) { m_pAlphaMap->Load_ToFile("Hogwart_AlphaMap.bin"); - } + } - - //GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f); + m_iMaskRange = max(1, m_iMaskRange); + GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f); if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) { if (m_pGameInstance->isPicking(&m_vPickingPosition)) { - if (m_pGameInstance->Key_Pressing(DIK_PERIOD)) - m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue); - if (m_pGameInstance->Key_Pressing(DIK_COMMA)) - m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f); + //if (m_pGameInstance->Key_Pressing(DIK_PERIOD)) + // m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue, m_vPickingPosition, m_iMaskRange); + //if (m_pGameInstance->Key_Pressing(DIK_COMMA)) + // m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f, m_vPickingPosition, m_iMaskRange); XMStoreFloat3(&m_vPickingPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vPickingPosition), m_pTransformCom->Get_WorldMatrixInv())); - - m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange); + if(m_pGameInstance->Key_Pressing(DIK_M)) + m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange); } } @@ -341,9 +343,9 @@ void CTerrain::Describe_Entity() #pragma region HEIGHT MAP HRESULT hr = {}; if(GUI::Button("Save HeightMap")) - hr = m_pVIBufferCom->Save_HeightMap("Hogwart_Height.bin"); + hr = m_pVIBufferCom->Save_HeightMap("Hogwart_HeightMap.bin"); if(GUI::Button("Load HeightMap")) - hr = m_pVIBufferCom->Load_HeightMap("Hogwart_Height.bin"); + hr = m_pVIBufferCom->Load_HeightMap("Hogwart_HeightMap.bin"); #pragma endregion _float4 vPos = {}; diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index ccfe5a1a7..78263bcfb 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -38,8 +38,8 @@ namespace Editor SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE, - FLAGWAVE, BROOMCIRCLE, - ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, END + FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, + ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION , NONPOS , NONPOS_BLUR, BLUR_MESH, BLUR_CULLING , BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING , DEFAULT_NONPOS , NONWB_NONPOS, DECAL, DECAL_WB, DECAL_BLUR, BLEND_CULLING, END}; diff --git a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h index 4ad937cc1..038feb886 100644 --- a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h +++ b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h @@ -41,6 +41,7 @@ class CGamePlay_Canvas final : public CCanvasObject CGameObject* m_pAction_Panel = { nullptr }; CGameObject* m_pEnemy_Panel = { nullptr }; CGameObject* m_pBroom_Panel = { nullptr }; + CGameObject* m_pRide_Panel = { nullptr }; public: static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h new file mode 100644 index 000000000..0e8e32ace --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_BboosterBar final : public CElementObject +{ +private: + CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BboosterBar(const CRide_BboosterBar& rhs); + virtual ~CRide_BboosterBar() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h new file mode 100644 index 000000000..a558437ce --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_Bbooster_Slot final : public CElementObject +{ +private: + CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); + virtual ~CRide_Bbooster_Slot() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_fImagePosi{}; +public: + static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_HpBar.h b/Jusin154_Team3D/Editor/Public/Ride_HpBar.h new file mode 100644 index 000000000..adcc5dcef --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_HpBar.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_HpBar final : public CElementObject +{ +private: + CRide_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_HpBar(const CRide_HpBar& rhs); + virtual ~CRide_HpBar() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_fImagePosi{}; + +public: + static CRide_HpBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_HpSlot.h b/Jusin154_Team3D/Editor/Public/Ride_HpSlot.h new file mode 100644 index 000000000..34ad7e9df --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_HpSlot.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_HpSlot final : public CElementObject +{ +private: + CRide_HpSlot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_HpSlot(const CRide_HpSlot& rhs); + virtual ~CRide_HpSlot() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_fImagePosi{}; + +public: + static CRide_HpSlot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_Info.h b/Jusin154_Team3D/Editor/Public/Ride_Info.h new file mode 100644 index 000000000..a1c020e74 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_Info.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_Info final : public CElementObject +{ +private: + CRide_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Info(const CRide_Info& rhs); + virtual ~CRide_Info() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + void Set_Posi(); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CTexture* m_pDiffuse_TextureCom4 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vImagePosi1{}; + _float4 m_vImagePosi2{}; + _float4 m_vImagePosi3{}; + _float4 m_vImagePosi4{}; +public: + static CRide_Info* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h b/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h new file mode 100644 index 000000000..6cd7a5e98 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_InfoBG final : public CElementObject +{ +private: + CRide_InfoBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_InfoBG(const CRide_InfoBG& rhs); + virtual ~CRide_InfoBG() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CRide_InfoBG* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_Info_Key.h b/Jusin154_Team3D/Editor/Public/Ride_Info_Key.h new file mode 100644 index 000000000..028dab852 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_Info_Key.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CRide_Info_Key final : public CElementObject +{ +private: + CRide_Info_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Info_Key(const CRide_Info_Key& rhs); + virtual ~CRide_Info_Key() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + _float4 Compute_UV(_tchar Alphabet); + void Set_Posi(); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vUV{}; + _float4 m_vImagePosi1{}; + _float4 m_vImagePosi2{}; +public: + static CRide_Info_Key* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ride_Panel.h b/Jusin154_Team3D/Editor/Public/Ride_Panel.h new file mode 100644 index 000000000..6bb34e0e5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ride_Panel.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Editor) + +class CRide_Panel final : public CPanelObject +{ +private: + CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Panel(const CRide_Panel& rhs); + virtual ~CRide_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Element(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pRide_Info_Key = { nullptr }; + CGameObject* m_pRide_InfoBG = { nullptr }; + CGameObject* m_pRide_Info = { nullptr }; + CGameObject* m_pRide_Bbooster_Slot = { nullptr }; + CGameObject* m_pRide_BboosterBar = { nullptr }; + CGameObject* m_pRide_HpBar = { nullptr }; + CGameObject* m_pRide_HpSlot = { nullptr }; +public: + static CRide_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp index a4624b6ac..0c3f1443f 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp @@ -1,4 +1,4 @@ -#include "pch.h" + #include "pch.h" #include "VIBuffer_Terrain.h" #include "GameInstance.h" #include "QuadTree.h" @@ -455,31 +455,106 @@ void CVIBuffer_Terrain::Culling(_fmatrix WorldMatrix) m_iNumIndices = iNumIndices; } -void CVIBuffer_Terrain::FitY(_fmatrix WorldMatrix, _float fY) +void CVIBuffer_Terrain::FitY(_fmatrix WorldMatrix, _float fY, _float3 vPickingPos, _uint iRange) { m_pGameInstance->Transform_Frustum_ToLocalSpace(XMMatrixInverse(nullptr, WorldMatrix)); - D3D11_MAPPED_SUBRESOURCE SubResource{}; + //D3D11_MAPPED_SUBRESOURCE SubResource{}; - m_pContext->Map(m_pVB, 0, D3D11_MAP_READ_WRITE, 0, &SubResource); + //m_pContext->Map(m_pVB, 0, D3D11_MAP_READ_WRITE, 0, &SubResource); - VTXNORTEX* pVertices = static_cast(SubResource.pData); + //VTXNORTEX* pVertices = static_cast(SubResource.pData); + //_matrix WorldInv = XMMatrixInverse(nullptr, WorldMatrix); + + + + //m_pQuadTree->Set_Y(m_pGameInstance, m_pVertexPositions, pVertices, WorldMatrix, fY); + + //for (_uint i = 0; i < m_iNumVertices; ++i) + //{ + // memcpy(&m_pVertexPositions[i], &pVertices[i].vPosition, sizeof(_float3)); + //} + _float3 Out{}; + _float3 vLocalPosition = {}; _matrix WorldInv = XMMatrixInverse(nullptr, WorldMatrix); - m_pGameInstance->Ray_WorldToLocal(&WorldInv); + XMStoreFloat3(&vLocalPosition, XMVector3TransformCoord(XMVectorSetW(XMLoadFloat3(&vPickingPos), 1.f), WorldInv)); + _uint iIndex = static_cast<_uint>(vLocalPosition.x) + static_cast<_uint>(vLocalPosition.z) * m_iNumVerticesX; - m_pQuadTree->Set_Y(m_pGameInstance, m_pVertexPositions, pVertices, WorldMatrix, fY); - - for (_uint i = 0; i < m_iNumVertices; ++i) - { - memcpy(&m_pVertexPositions[i], &pVertices[i].vPosition, sizeof(_float3)); - } + _uint iIndices[4] = { + iIndex + m_iNumVerticesX, + iIndex + m_iNumVerticesX + 1, + iIndex + 1, + iIndex + }; + D3D11_MAPPED_SUBRESOURCE SubResource{}; + m_pContext->Map(m_pVB, 0, D3D11_MAP_READ_WRITE, 0, &SubResource); + VTXNORTEX* pVertices = static_cast(SubResource.pData); + Add_Y(pVertices, iIndex, fY); + Add_NeighborY(pVertices, static_cast<_uint>(vLocalPosition.x), static_cast<_uint>(vLocalPosition.z), fY, iRange); m_pContext->Unmap(m_pVB, 0); } +void CVIBuffer_Terrain::Add_NeighborY(VTXNORTEX* pVertices, _uint iX, _uint iZ, _float fY, _uint iRange) +{ + _int Range = iRange; // 이웃 범위 설정 + + for (_int dz = -Range; dz <= Range; ++dz) + { + for (_int dx = -Range; dx <= Range; ++dx) + { + _int nx = iX + dx; + _int nz = iZ + dz; + + // 범위 체크 (0 ~ m_iNumVerticesX/Z-1) + if (nx < 0 || nz < 0 || + nx >= (_int)m_iNumVerticesX || + nz >= (_int)m_iNumVerticesZ) + continue; + + _uint iNeighborIndex = + static_cast<_uint>(nx) + + static_cast<_uint>(nz) * m_iNumVerticesX; + + Add_Y(pVertices, iNeighborIndex, fY); + } + } + +} + +void CVIBuffer_Terrain::Add_Y(VTXNORTEX* pVertices, _uint iIndex, _float fY) +{ + _uint iIndices[4] = { + iIndex + m_iNumVerticesX, + iIndex + m_iNumVerticesX + 1, + iIndex + 1, + iIndex + }; + + for (_uint i = 0; i < 4; i++) + { + if (0 > iIndices[i] || m_iNumVertices <= iIndices[i]) + return; + } + _float fHieght = { }; + _float fAvgHieght = { }; + for (_uint i = 0; i < 4; i++) + { + fHieght += pVertices[iIndices[i]].vPosition.y; + } + + fAvgHieght = fHieght / 4.f; + + for (_uint i = 0; i < 4; i++) + { + pVertices[iIndices[i]].vPosition.y = fAvgHieght + fY; + memcpy(&m_pVertexPositions[iIndices[i]], &pVertices[iIndices[i]].vPosition, sizeof(_float3)); + } +} + HRESULT CVIBuffer_Terrain::Load_HeightMap(const _char* pFilePath) { diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_Terrain.h b/Jusin154_Team3D/Engine/Public/VIBuffer_Terrain.h index 6c02deb16..a31f25905 100644 --- a/Jusin154_Team3D/Engine/Public/VIBuffer_Terrain.h +++ b/Jusin154_Team3D/Engine/Public/VIBuffer_Terrain.h @@ -28,8 +28,9 @@ class ENGINE_DLL CVIBuffer_Terrain final : public CVIBuffer _bool Picking(_fmatrix WorldMatrix, _float3* pOut); void Culling(_fmatrix WorldMatrix); - void FitY(_fmatrix WorldMatrix, _float fY); - + void FitY(_fmatrix WorldMatrix, _float fY, _float3 vPickingPos, _uint iRange); + void Add_NeighborY(VTXNORTEX* pVertices, _uint iX, _uint iZ, _float fY, _uint iRange); + void Add_Y(VTXNORTEX* pVertices, _uint iIndex, _float fY); HRESULT Load_HeightMap(const _char* pFilePath); #ifdef EDITOR_PROJECT