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/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 69ee6ed7c..8b1dd71e2 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -2,25 +2,25 @@ - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define + 99.Define - 02.GameObjects\ReparoObject\99.Define + 99.Define - 02.GameObjects\ReparoObject\99.Define + 99.Define 00.MainApp @@ -146,7 +146,7 @@ 02.GameObjects\Environment\01.MapPartObject - 02.GameObjects\ReparoObject\99.Define + 99.Define 02.GameObjects\Environment\01.MapPartObject\Collision @@ -803,10 +803,10 @@ - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT @@ -1656,22 +1656,22 @@ {4fbbe0ec-6b65-49f1-a72d-fe73ddbf2b4d} - - {2899f7fc-0ed2-41c0-8e24-0d89f08ffc39} - - - {05a0db73-4fbf-456c-9137-bb605c632d68} - {2e3b9cee-41ee-4984-a1d0-3aaebbcf41a4} + + {2899f7fc-0ed2-41c0-8e24-0d89f08ffc39} + + + {05a0db73-4fbf-456c-9137-bb605c632d68} + - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT 00.MainApp @@ -2459,7 +2459,7 @@ - 02.GameObjects\ReparoObject\99.Define\00.DEFAULT + 99.Define\00.DEFAULT \ No newline at end of file diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index ce046d8cf..293dfb4bb 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -572,10 +572,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 @@ -704,10 +704,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/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 4ccaa1986..94866b298 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/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes/Temp.txt b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes/Temp.txt new file mode 100644 index 000000000..e69de29bb 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/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 60d2b6464..8cdbd6e10 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -215,6 +215,14 @@ call Update_Shaders.bat + + + + + + + + @@ -476,6 +484,14 @@ call Update_Shaders.bat + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 4a975a728..743514c2f 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} @@ -709,6 +673,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} @@ -1440,6 +1464,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 @@ -2179,6 +2227,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/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 1c0302774..38a5aa8c7 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" @@ -1212,11 +1221,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)))) { 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/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index a541f9785..034647049 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, 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