From 33bc15b2f1275a94cefee16ee79d8d1a77b7d5dc Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 15 Oct 2022 19:20:14 -0500 Subject: [PATCH] Fix upscaling artifacts --- .../CodebreakerCommunicationUI.cs | 35 ++++++++++-------- UI/DraedonSummoning/DraedonContactPanel.png | Bin 526 -> 869 bytes UI/DraedonSummoning/DraedonDialogOutline.png | Bin 330 -> 527 bytes UI/DraedonSummoning/DraedonDialogRegistry.cs | 24 +++++++----- UI/DraedonSummoning/DraedonIconBorder.png | Bin 555 -> 668 bytes .../DraedonIconBorderInner.png | Bin 332 -> 509 bytes UI/DraedonSummoning/DraedonInquiryButton.png | Bin 258 -> 0 bytes .../DraedonSelectionOutline.png | Bin 223 -> 312 bytes 8 files changed, 34 insertions(+), 25 deletions(-) delete mode 100644 UI/DraedonSummoning/DraedonInquiryButton.png diff --git a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs b/UI/DraedonSummoning/CodebreakerCommunicationUI.cs index 87a122eca6..7a2b037188 100644 --- a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs +++ b/UI/DraedonSummoning/CodebreakerCommunicationUI.cs @@ -133,9 +133,9 @@ namespace CalamityMod.UI.DraedonSummoning // Draw the background panel. This pops up. float panelWidthScale = Utils.Remap(CommunicationPanelScale, 0f, 0.5f, 0.085f, 1f); float panelHeightScale = Utils.Remap(CommunicationPanelScale, 0.5f, 1f, 0.085f, 1f); - Vector2 panelScale = GeneralScale * new Vector2(panelWidthScale, panelHeightScale) * 2.4f; + Vector2 panelScale = GeneralScale * new Vector2(panelWidthScale, panelHeightScale) * 1.4f; Texture2D panelTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonContactPanel").Value; - float basePanelHeight = GeneralScale * panelTexture.Height * 2.4f; + float basePanelHeight = GeneralScale * panelTexture.Height * 1.4f; Vector2 panelCenter = new Vector2(Main.screenWidth * 0.5f, BackgroundCenter.Y + panelTexture.Height * panelScale.Y * 0.5f - basePanelHeight * 0.5f); Rectangle panelArea = Utils.CenteredRectangle(panelCenter, panelTexture.Size() * panelScale); @@ -176,14 +176,14 @@ namespace CalamityMod.UI.DraedonSummoning Texture2D iconTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonIconBorder").Value; Texture2D iconTextureInner = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonIconBorderInner").Value; float draedonIconDrawInterpolant = Utils.GetLerpValue(0.51f, 0.36f, DraedonScreenStaticInterpolant, true); - Vector2 draedonIconDrawTopRight = panelCenter + new Vector2(-128f, -84f) * panelScale; + Vector2 draedonIconDrawTopRight = panelCenter + new Vector2(-218f, -130f) * panelScale; draedonIconDrawTopRight += new Vector2(24f, 4f) * panelScale; Vector2 draedonIconScale = panelScale * 0.5f; Vector2 draedonIconCenter = draedonIconDrawTopRight + iconTexture.Size() * new Vector2(0.5f, 0.5f) * draedonIconScale; - Rectangle draedonIconArea = Utils.CenteredRectangle(draedonIconCenter, iconTexture.Size() * draedonIconScale * 0.95f); - draedonIconArea.Y += 4; - draedonIconArea.Height -= 8; + Rectangle draedonIconArea = Utils.CenteredRectangle(draedonIconCenter, iconTexture.Size() * draedonIconScale * 0.9f); + draedonIconArea.Y += 12; + draedonIconArea.Height -= 12; Main.spriteBatch.Draw(iconTexture, draedonIconDrawTopRight, null, Color.White * draedonIconDrawInterpolant, 0f, Vector2.Zero, draedonIconScale, 0, 0f); // Draw Draedon's face inside the panel. @@ -231,7 +231,7 @@ namespace CalamityMod.UI.DraedonSummoning // Display text options in the box. bool hoveringOverAnyOption = false; float opacity = DraedonTextOptionsOpacity * (1f - DraedonScreenStaticInterpolant); - Vector2 textTopLeft = selectionArea.TopLeft() + new Vector2(16f, 12f) * panelScale; + Vector2 textTopLeft = selectionArea.TopLeft() + new Vector2(20f, 12f) * panelScale; Texture2D markerTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonInquirySelector").Value; foreach (var dialog in DialogOptions.Where(d => d.Condition())) @@ -250,9 +250,9 @@ namespace CalamityMod.UI.DraedonSummoning continue; // Draw the text marker. - Vector2 markerScale = panelScale * 0.15f; - Vector2 markerDrawPosition = textTopLeft - Vector2.UnitX * markerTexture.Width * markerScale.X * 0.7f; - markerDrawPosition.Y += markerScale.Y * 16f; + Vector2 markerScale = panelScale * 0.24f; + Vector2 markerDrawPosition = textTopLeft - Vector2.UnitX * markerTexture.Width * markerScale.X * 0.52f; + markerDrawPosition.Y += markerScale.Y * 22f; Color textColor = Color.Cyan; Color markerColor = Color.White; @@ -273,7 +273,7 @@ namespace CalamityMod.UI.DraedonSummoning float scale = (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.05f + 0.26f; float rot = Main.GlobalTimeWrappedHourly * 0.5f; - Main.spriteBatch.Draw(bloomTex, markerDrawPosition, null, Color.SkyBlue * dialog.BloomOpacity * opacity, rot, new Vector2(123f, 124f), scale, 0, 0f); + Main.spriteBatch.Draw(bloomTex, markerDrawPosition, null, Color.SteelBlue * dialog.BloomOpacity * opacity, rot, new Vector2(123f, 124f), scale, 0, 0f); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, Matrix.Identity); @@ -374,7 +374,7 @@ namespace CalamityMod.UI.DraedonSummoning int entriesToPrune = 0; bool showNewEntries = CanDisplayLatestDialogEntries; var dialogEntries = DialogHistory.Where(d => !string.IsNullOrEmpty(d)); - Vector2 textTopLeft = dialogArea.TopLeft() + new Vector2(16f, 14f) * panelScale; + Vector2 textTopLeft = dialogArea.TopLeft() + new Vector2(20f, 14f) * panelScale; Texture2D markerTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonInquirySelector").Value; foreach (string entry in dialogEntries) { @@ -388,8 +388,8 @@ namespace CalamityMod.UI.DraedonSummoning bool textIsFromDraedon = textIndex % 2 == 0; Color dialogColor = Draedon.TextColor; Vector2 localTextTopLeft = textTopLeft; - Vector2 markerScale = panelScale * 0.15f; - Vector2 markerDrawPosition = textTopLeft - Vector2.UnitX * markerTexture.Width * markerScale.X; + Vector2 markerScale = panelScale * 0.24f; + Vector2 markerDrawPosition = textTopLeft - Vector2.UnitX * markerTexture.Width * markerScale.X * 0.6f; markerDrawPosition.Y += markerScale.Y * 24f; SpriteEffects markerDirection = SpriteEffects.None; if (!textIsFromDraedon) @@ -416,10 +416,10 @@ namespace CalamityMod.UI.DraedonSummoning ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, DialogFont, line, localTextTopLeft, dialogColor * dialogHistoryDrawInterpolant, 0f, Vector2.Zero, Vector2.One * GeneralScale * 0.76f); } - textTopLeft.Y += panelScale.Y * 6f; + textTopLeft.Y += panelScale.Y * 11f; lineIndex++; } - textTopLeft.Y += panelScale.Y * 12f; + textTopLeft.Y += panelScale.Y * 20f; if (textTopLeft.Y >= dialogArea.Bottom) entriesToPrune++; @@ -431,6 +431,9 @@ namespace CalamityMod.UI.DraedonSummoning { for (int i = 0; i < 2; i++) { + if (DialogHistory.Count <= 0) + break; + string text = DialogHistory[0]; if (text == DialogOptions[0].Inquiry) Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker = true; diff --git a/UI/DraedonSummoning/DraedonContactPanel.png b/UI/DraedonSummoning/DraedonContactPanel.png index fe308c0c5402d7c32bac41b9c2bd84c8b37d8144..8a5e54519bced6ffb26671eab16d2b3e2fc49c43 100644 GIT binary patch literal 869 zcmeAS@N?(olHy`uVBq!ia0y~yV0;V2Y8=c!kqTFfeL#w_ILO_JVcj{Imp~3nx}&cn z1H;CC?mvmFKt6wfPl&7h@Ba)3uL;R0%KiEW6no8|WeTKNOM?7@{{sQT?`?d+KmpDI zkH}&M2EP3u%xJ+Htir&+bk5VoF{C2y?Zu6}hYbW+9QPjmm%Ytl1Do`Pb1LoK-=j)a z#D2Q6FC$=g%JO+XKhzmp@4Usi{9EOoxwllarmu)yRMt7l7!3qEr-V(}=jR-seRjp& rjoItBPX5gP{ib|n(CWDxuZe#-7$d4hl)JJ@O~ zQUh+3r|q+ub#ppTRWbjrZgw`-<|fC33lahhG$cfLxJJ1+L*v_mnY(`&CttWIx8>Tt nBa2`6IjUC+sI$qg{mLw^Svg_dS+zsJxMA>g^>bP0l+XkK=%$@V diff --git a/UI/DraedonSummoning/DraedonDialogOutline.png b/UI/DraedonSummoning/DraedonDialogOutline.png index 5fd26081d996fd7fd957bb95113deefcdae32179..550c8b19cce10e845d9fae77242e8f9f63e8f8a2 100644 GIT binary patch literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^HyIch1vr?2EUpiVJwS@FILO_JVcj{Imp~3nx}&cn z1H;CC?mvmFKt5Z5Pl&7h@BcvNHnuz)AjMP?!gFRSJi@9Yn@TE@R^ zIcM#Rt-eKT`<};MP6+=Z&0)Pob@$^XX{X%|eXI9rn|eljX1LM%l(>_7CRM6__Ifsg z1$w9Lea$yHYTd<6m0SLbpEq2s8?_>H%j28NzFQstme`l!+ibOL@BX{)`wv&nvtP6O WzN}pH3BV(@hJb6Mw<&;$Tn_3u{z delta 256 zcmeBYImM*d8Q|y6%O%Cdz`(%k>ERLtr0aorJ_j?9e6Id&@kGUtdWQX;E{-7;ac?gM z^0g@NxCY+*zl=TOuG9RJb7n6%a6a=(D;fBxw6&&3~q{)wrvvll0V8-`u=zxltbzb5WmTz|ly zw_tzWUZL3U7iKbg?frDm&;P@ur}HjXsNR3RPJg*p$y#}PF0WY(tFJ!?dWyl*)z4*} HQ$iB}g^Phy diff --git a/UI/DraedonSummoning/DraedonDialogRegistry.cs b/UI/DraedonSummoning/DraedonDialogRegistry.cs index 472a3b2edd..68607153e5 100644 --- a/UI/DraedonSummoning/DraedonDialogRegistry.cs +++ b/UI/DraedonSummoning/DraedonDialogRegistry.cs @@ -3,20 +3,25 @@ public static class DraedonDialogRegistry { public static readonly DraedonDialogEntry WhoAreYou = new("Who are you?", "That is forever an ambitious question. I will allow you this much:\n\n" + - "I am, as I have said, not of this planet. I was born from machines, and I was... created. It may actually be false to say I was born.\n\n" + - "All I have known from the day I became aware of myself, is that I had to create, myself."); + "I am, as I have said, not of this planet. I was born from machines, and I was... created. It may actually be false to say I was born.\n\n" + + "All I have known from the day I became aware of myself, is that I had to create, myself."); - public static readonly DraedonDialogEntry CalamitasBeforeHerDefeat = new("Calamitas", "The witch? Ha! A walking weapon. Such powerful magic in a living being was destined to be. Just look at yourself now.", () => !DownedBossSystem.downedCalamitas); + public static readonly DraedonDialogEntry CalamitasBeforeHerDefeat = new("Calamitas", "The witch? Ha! A walking weapon. Such powerful magic in a living being was destined to be. Just look at yourself now.", () => !DownedBossSystem.downedSCal); - public static readonly DraedonDialogEntry CalamitasAfterHerDefeat = new("Calamitas", "Hm! She has mellowed, I've noticed. For you creatures so burdened by emotion and guilt, I wonder now, how she manages to live with herself.", () => DownedBossSystem.downedCalamitas); + public static readonly DraedonDialogEntry CalamitasAfterHerDefeat = new("Calamitas", "Hm! She has mellowed, I've noticed. For you creatures so burdened by emotion and guilt, I wonder now, how she manages to live with herself.", () => DownedBossSystem.downedSCal); public static readonly DraedonDialogEntry Plague = new("The Plague", "Fascinating, the speed at which nanotechnology and a virus can adapt. I consider it personally one of my greatest works.\n\n" + - "Nanotechnology that not only rivaled a cosmic mutation, but adapted with it to form something new.\n\n" + - "Nothing is more pleasing than a result that exceeds expectations.", () => DownedBossSystem.downedPlaguebringer); + "Nanotechnology that not only rivaled a cosmic mutation, but adapted with it to form something new.\n\n" + + "Nothing is more pleasing than a result that exceeds expectations.", () => DownedBossSystem.downedPlaguebringer); public static readonly DraedonDialogEntry SulphurousSea = new("The Sulphuric Sea", "I understand your concern for those fragile creatures. However, nothing is irreparable, and nothing is truly whole.\n\n" + - "The sea simply exists now in a different state than it once was, one that result out of the convenience of my work.\n\n" + - "Should I ever need to return to that sea? A pointless worry. I shall simply recreate it from the data I have gathered, from the bedrock up. It would be a shame as a creator should I not be able to do that."); + "The sea simply exists now in a different state than it once was, one that result out of the convenience of my work.\n\n" + + "Should I ever need to return to that sea? A pointless worry. I shall simply recreate it from the data I have gathered, from the bedrock up. It would be a shame as a creator should I not be able to do that."); + + public static readonly DraedonDialogEntry TheTyrant = new("The Tyrant", "My patron...\n" + + "He is not someone I have spoken to in a very long time.\n\n" + + "Oh? Is that such a surprise? I no longer needed him, and he withdrew himself from all. I suspect he retreated to that graveyard of dragons he spoke of...\n\n" + + "Should you locate him, I'll await the news of either his or your death. Perhaps I will collect the cadavar.", () => DownedBossSystem.downedSCal); public static DraedonDialogEntry[] DialogOptions => new DraedonDialogEntry[] { @@ -26,7 +31,8 @@ CalamitasBeforeHerDefeat, CalamitasAfterHerDefeat, Plague, - SulphurousSea + SulphurousSea, + TheTyrant }; } } diff --git a/UI/DraedonSummoning/DraedonIconBorder.png b/UI/DraedonSummoning/DraedonIconBorder.png index d88e83d5436b799c1ff4ed4be621ee5243be8ff0..27f6801dcdd16d816cb1c8db6b4f7a4def1903fb 100644 GIT binary patch literal 668 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5W^phB$wIZXqdX2G?s<$wMsJu79t;C*HV(+tK7yUm$>8?L4CGbG5d6vwC)DzG?+ zE4*TJkbGdl5b&Q{hMmF0k)edqf{Vd`@z@0xiNlP?GztS3uqTw=nOWWf^c;gHgS{x5 zgY<#dY#<&4C>&2^g0YclhrZJ+$b1;PL1sE9jEzED>ItLpVVt5EH3-w9!9MQ3yuqBu zMxEEWdJN+?EZ{g`?e?sV{Q%>+VBrJu>-ilRI?Np_8SaZNnXSNZywVHEY53fy)Nq}* zL9am)Xo>*C+LdMpzw-)aHoPukI=a7MdVMUz5zU4A6`!sz6`uNQ>4oj99WxpB8$S4W zG$#G!54H1?_Hr^AFvi_KFMo5}oJcKuZ8n9dCV8IZU3GC&kA=uA_^u!7=D727_MJ~4 OM|!&YxvXR3H*Cr}s*;>E)##a+F86eH>-`pcU0Aa9uCipWi~4RG zvDtC+`-8K*O%Kk}t`oAoyXM-Ah_#JZqvF|&HoAPf7csYO)_m`j5Eg8%<#xPFQksFs1Vz$3Dlfq`#7 z2s2u+2CD!K&GU3|45^5Fd&!Wm*+InF@xi}#zlnh^6NT5zm-e2YYxAh;m~g{9Uxr^( zUq6`f!;9gUXnucB=X#a}^*i(P`_I(Q{^`x|>xKOP_%nP846+TseMV_uI2VTLYtm!PC{xWt~$(69DCQtn>f? literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^(||aNgBeKXevOw0QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`*#dk*T!my5fy}VyE82k+Q%R6t@PCG<+YP*cJkA1-$YKTtzWpG~Xu%q+ z0u(&x>EalY;r#ZTA=hCCfujNM|LV_GQrb~CLAqLONg3Ne>uV>H?q8*|iKec(@9crZ^}AJ;UJX>gTe~DWM4f*-~+@ diff --git a/UI/DraedonSummoning/DraedonInquiryButton.png b/UI/DraedonSummoning/DraedonInquiryButton.png deleted file mode 100644 index 1f56e7b704876ddc6b746b9f19c54ee9e8a98a73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^lYrQkgBeH`zCX|oq!^2X+?^QKos)S9^91;WxXSS>1_DxIi{=Drz>Qx z-D{tG>-R3UNp;sJOz`qhT_P03xw0k1NlS4mLGDs-qf`IiPO_=kQ+AG-`?7s(Pp#B4 Ppw$eXu6{1-oD!M$NHG=%xjQkeJ16rJ$YDu$^mSxl z*x1kgCy^D%XAAHNah3o5AIRLsmS+Q`m`Z~Dg8wr--EQCo4nJ@a+d-Mhn(p z6`Zj0p&id cnwx4Y|0pd-Q2kD72+-jSp00i_>zopr0OzA}VE_OC delta 147 zcmdnNbe~bNGr-TCmrII^fq{Y7)59eQNap}?3 zGAQscY~1z#Qj@Wao!2IZw9TJ8brii%2yJR1f%>>bP0 Hl+XkKO_(y@