Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawInterface_18_DiagnoseVideo()

static void Terraria.Main.DrawInterface_18_DiagnoseVideo ( )
inlinestaticprivate

Definition at line 42572 of file Main.cs.

42573 {
42574 if (!drawDiag)
42575 {
42576 return;
42577 }
42579 {
42580 for (int i = 0; i < 2; i++)
42581 {
42582 string text = "";
42583 int num = 20;
42584 int num2 = 160;
42585 num2 += i * 16;
42586 if (i == 0)
42587 {
42588 text = "Gamepad Left Thumbstick : " + string.Format("{0,-10} , {1,-10}", PlayerInput.GamepadThumbstickLeft.X.ToString("P2"), PlayerInput.GamepadThumbstickLeft.Y.ToString("P2"));
42589 }
42590 if (i == 1)
42591 {
42592 text = "Gamepad Right Thumbstick: " + string.Format("{0,-10} , {1,-10}", PlayerInput.GamepadThumbstickRight.X.ToString("P2"), PlayerInput.GamepadThumbstickRight.Y.ToString("P2"));
42593 }
42595 }
42596 }
42597 for (int j = 0; j < 7; j++)
42598 {
42599 string text2 = "";
42600 int num3 = 20;
42601 int num4 = 220;
42602 num4 += j * 16;
42603 if (j == 0)
42604 {
42605 text2 = "Solid Tiles:";
42606 }
42607 if (j == 1)
42608 {
42609 text2 = "Misc. Tiles:";
42610 }
42611 if (j == 2)
42612 {
42613 text2 = "Walls Tiles:";
42614 }
42615 if (j == 3)
42616 {
42617 text2 = "Background Tiles:";
42618 }
42619 if (j == 4)
42620 {
42621 text2 = "Water Tiles:";
42622 }
42623 if (j == 5)
42624 {
42625 text2 = "Black Tiles:";
42626 }
42627 if (j == 6)
42628 {
42629 text2 = "Total Render:";
42630 }
42632 }
42633 for (int k = 0; k < 7; k++)
42634 {
42635 string text3 = "";
42636 int num5 = 180;
42637 int num6 = 220;
42638 num6 += k * 16;
42639 float num7 = ((k != 6) ? TimeLogger.GetDrawTime(k) : TimeLogger.GetDrawTotal());
42640 text3 = $"{num7:F2}ms";
42642 }
42643 for (int l = 0; l < 6; l++)
42644 {
42645 string text4 = "";
42646 int num8 = 20;
42647 int num9 = 346;
42648 num9 += l * 16;
42649 if (l == 0)
42650 {
42651 text4 = "Lighting Init:";
42652 }
42653 if (l == 1)
42654 {
42655 text4 = "Lighting Phase #1:";
42656 }
42657 if (l == 2)
42658 {
42659 text4 = "Lighting Phase #2:";
42660 }
42661 if (l == 3)
42662 {
42663 text4 = "Lighting Phase #3";
42664 }
42665 if (l == 4)
42666 {
42667 text4 = "Lighting Phase #4";
42668 }
42669 if (l == 5)
42670 {
42671 text4 = "Total Lighting:";
42672 }
42674 }
42675 for (int m = 0; m < 6; m++)
42676 {
42677 string text5 = "";
42678 int num10 = 180;
42679 int num11 = 346;
42680 num11 += m * 16;
42681 float num12 = ((m != 5) ? TimeLogger.GetLightingTime(m) : TimeLogger.GetLightingTotal());
42682 text5 = $"{num12:F2}ms";
42684 }
42685 int num13 = 5;
42686 for (int n = 0; n < num13; n++)
42687 {
42688 string text6 = "";
42689 int num14 = 20;
42690 int num15 = 456;
42691 num15 += n * 16;
42692 text6 = "Render #" + n + ":";
42694 }
42695 for (int num16 = 0; num16 < num13; num16++)
42696 {
42697 string text7 = "";
42698 int num17 = 180;
42699 int num18 = 456;
42700 num18 += num16 * 16;
42701 text7 = $"{TimeLogger.GetRenderTime(num16):F2}ms";
42703 }
42704 for (int num19 = 0; num19 < num13; num19++)
42705 {
42706 string text8 = "";
42707 int num20 = 230;
42708 int num21 = 456;
42709 num21 += num19 * 16;
42710 num20 += 10;
42711 text8 = $"{TimeLogger.GetRenderMax(num19):F2}ms";
42713 }
42714 string text9 = "";
42715 int num22 = 20;
42716 int num23 = 456 + 16 * num13 + 16;
42717 text9 = "Update:";
42719 text9 = "";
42720 num22 = 180;
42721 text9 = $"{upTimer:F2}ms";
42723 text9 = "";
42724 num22 = 240;
42725 text9 = $"{upTimerMax:F2}ms";
42727 }
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
static Asset< DynamicSpriteFont > MouseText
Definition FontAssets.cs:10
static Vector2 GamepadThumbstickLeft
static Vector2 GamepadThumbstickRight
static SpriteBatch spriteBatch
Definition Main.cs:974
static bool drawDiag
Definition Main.cs:590

References Terraria.Main.drawDiag, ReLogic.Graphics.DynamicSpriteFontExtensionMethods.DrawString(), Terraria.GameInput.PlayerInput.GamepadThumbstickLeft, Terraria.GameInput.PlayerInput.GamepadThumbstickRight, Terraria.TimeLogger.GetDrawTime(), Terraria.TimeLogger.GetDrawTotal(), Terraria.TimeLogger.GetLightingTime(), Terraria.TimeLogger.GetLightingTotal(), System.Text.RegularExpressions.i, Terraria.GameContent.FontAssets.MouseText, Terraria.Main.spriteBatch, System.text, Terraria.GameInput.PlayerInput.UsingGamepad, and Microsoft.Xna.Framework.Color.White.

Referenced by Terraria.Main.SetupDrawInterfaceLayers().