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

◆ DrawSurfaceBG()

void Terraria.Main.DrawSurfaceBG ( )
inlineprotected

Definition at line 75602 of file Main.cs.

75603 {
75604 //IL_0030: Unknown result type (might be due to invalid IL or missing references)
75605 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
75606 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
75607 //IL_038c: Unknown result type (might be due to invalid IL or missing references)
75608 //IL_0392: Unknown result type (might be due to invalid IL or missing references)
75609 //IL_015e: Unknown result type (might be due to invalid IL or missing references)
75610 //IL_0163: Unknown result type (might be due to invalid IL or missing references)
75611 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
75612 //IL_0292: Unknown result type (might be due to invalid IL or missing references)
75613 //IL_02c9: Unknown result type (might be due to invalid IL or missing references)
75614 //IL_02d3: Unknown result type (might be due to invalid IL or missing references)
75615 //IL_02d7: Unknown result type (might be due to invalid IL or missing references)
75616 //IL_0327: Unknown result type (might be due to invalid IL or missing references)
75617 //IL_0341: Unknown result type (might be due to invalid IL or missing references)
75618 //IL_1296: Unknown result type (might be due to invalid IL or missing references)
75619 //IL_129f: Unknown result type (might be due to invalid IL or missing references)
75620 //IL_12a4: Unknown result type (might be due to invalid IL or missing references)
75621 //IL_0d43: Unknown result type (might be due to invalid IL or missing references)
75622 //IL_0d44: Unknown result type (might be due to invalid IL or missing references)
75623 //IL_0a43: Unknown result type (might be due to invalid IL or missing references)
75624 //IL_0a48: Unknown result type (might be due to invalid IL or missing references)
75625 //IL_0a4d: Unknown result type (might be due to invalid IL or missing references)
75626 //IL_163f: Unknown result type (might be due to invalid IL or missing references)
75627 //IL_1646: Unknown result type (might be due to invalid IL or missing references)
75628 //IL_1650: Unknown result type (might be due to invalid IL or missing references)
75629 //IL_1655: Unknown result type (might be due to invalid IL or missing references)
75630 //IL_1697: Unknown result type (might be due to invalid IL or missing references)
75631 //IL_169c: Unknown result type (might be due to invalid IL or missing references)
75632 //IL_0a5b: Unknown result type (might be due to invalid IL or missing references)
75633 //IL_0a62: Unknown result type (might be due to invalid IL or missing references)
75634 //IL_0a67: Unknown result type (might be due to invalid IL or missing references)
75635 //IL_067d: Unknown result type (might be due to invalid IL or missing references)
75636 //IL_0680: Unknown result type (might be due to invalid IL or missing references)
75637 //IL_0685: Unknown result type (might be due to invalid IL or missing references)
75638 //IL_1090: Unknown result type (might be due to invalid IL or missing references)
75639 //IL_1095: Unknown result type (might be due to invalid IL or missing references)
75640 //IL_109a: Unknown result type (might be due to invalid IL or missing references)
75641 //IL_0e44: Unknown result type (might be due to invalid IL or missing references)
75642 //IL_0e5b: Unknown result type (might be due to invalid IL or missing references)
75643 //IL_0e65: Unknown result type (might be due to invalid IL or missing references)
75644 //IL_0e6e: Unknown result type (might be due to invalid IL or missing references)
75645 //IL_0e74: Unknown result type (might be due to invalid IL or missing references)
75646 //IL_0eb8: Unknown result type (might be due to invalid IL or missing references)
75647 //IL_0ecf: Unknown result type (might be due to invalid IL or missing references)
75648 //IL_0ed9: Unknown result type (might be due to invalid IL or missing references)
75649 //IL_0ee2: Unknown result type (might be due to invalid IL or missing references)
75650 //IL_0ee8: Unknown result type (might be due to invalid IL or missing references)
75651 //IL_10a8: Unknown result type (might be due to invalid IL or missing references)
75652 //IL_10af: Unknown result type (might be due to invalid IL or missing references)
75653 //IL_10b4: Unknown result type (might be due to invalid IL or missing references)
75654 //IL_0b56: Unknown result type (might be due to invalid IL or missing references)
75655 //IL_0b8d: Unknown result type (might be due to invalid IL or missing references)
75656 //IL_0b97: Unknown result type (might be due to invalid IL or missing references)
75657 //IL_0b9b: Unknown result type (might be due to invalid IL or missing references)
75658 //IL_0beb: Unknown result type (might be due to invalid IL or missing references)
75659 //IL_0c05: Unknown result type (might be due to invalid IL or missing references)
75660 //IL_06da: Unknown result type (might be due to invalid IL or missing references)
75661 //IL_06fb: Unknown result type (might be due to invalid IL or missing references)
75662 //IL_0705: Unknown result type (might be due to invalid IL or missing references)
75663 //IL_070c: Unknown result type (might be due to invalid IL or missing references)
75664 //IL_0718: Unknown result type (might be due to invalid IL or missing references)
75665 //IL_071e: Unknown result type (might be due to invalid IL or missing references)
75666 //IL_0760: Unknown result type (might be due to invalid IL or missing references)
75667 //IL_0763: Unknown result type (might be due to invalid IL or missing references)
75668 //IL_0768: Unknown result type (might be due to invalid IL or missing references)
75669 //IL_11a3: Unknown result type (might be due to invalid IL or missing references)
75670 //IL_11da: Unknown result type (might be due to invalid IL or missing references)
75671 //IL_11e4: Unknown result type (might be due to invalid IL or missing references)
75672 //IL_11e8: Unknown result type (might be due to invalid IL or missing references)
75673 //IL_1238: Unknown result type (might be due to invalid IL or missing references)
75674 //IL_1252: Unknown result type (might be due to invalid IL or missing references)
75675 //IL_0940: Unknown result type (might be due to invalid IL or missing references)
75676 //IL_0961: Unknown result type (might be due to invalid IL or missing references)
75677 //IL_096b: Unknown result type (might be due to invalid IL or missing references)
75678 //IL_0972: Unknown result type (might be due to invalid IL or missing references)
75679 //IL_097e: Unknown result type (might be due to invalid IL or missing references)
75680 //IL_0984: Unknown result type (might be due to invalid IL or missing references)
75681 bool flag = false;
75682 if ((!remixWorld || (gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
75683 {
75684 flag = true;
75685 }
75686 if (mapFullscreen)
75687 {
75688 flag = false;
75689 }
75691 int num = 30;
75692 if (gameMenu)
75693 {
75694 num = 0;
75695 }
75696 if (WorldGen.drunkWorldGen)
75697 {
75698 num = -180;
75699 }
75700 float num12 = (float)worldSurface;
75701 if (num12 == 0f)
75702 {
75703 num12 = 1f;
75704 }
75705 _ = screenPosition;
75706 float num17 = screenPosition.Y + (float)(screenHeight / 2) - 600f;
75707 double num18 = (num17 - screenOff / 2f) / (num12 * 16f);
75708 num18 = 0f - MathHelper.Lerp((float)num18, 1f, 0f);
75709 num18 = (0f - num17 + screenOff / 2f) / (num12 * 16f);
75710 float num19 = 2f;
75711 int num20 = 0;
75712 float num21 = SkyManager.Instance.ProcessCloudAlpha() * atmo;
75713 if (flag && (double)screenPosition.Y < worldSurface * 16.0 + 16.0)
75714 {
75715 for (int i = 0; i < 200; i++)
75716 {
75717 if (cloud[i].active && cloud[i].scale < 1f)
75718 {
75719 Color color = cloud[i].cloudColor(ColorOfTheSkies);
75720 float num22 = cloud[i].scale * 0.8f;
75721 float num23 = (cloud[i].scale + 1f) / 2f * 0.9f;
75722 ((Color)(ref color)).R = (byte)((float)(int)((Color)(ref color)).R * num22);
75723 ((Color)(ref color)).G = (byte)((float)(int)((Color)(ref color)).G * num23);
75724 float num2 = cloud[i].position.Y * ((float)screenHeight / 600f);
75725 num2 = cloud[i].position.Y + (float)(int)(num18 * 750.0 + 830.0) + (float)(int)scAdj + (float)num20;
75726 spriteBatch.Draw(TextureAssets.Cloud[cloud[i].type].Value, new Vector2(cloud[i].position.X + (float)TextureAssets.Cloud[cloud[i].type].Width() * 0.5f, num2 + (float)TextureAssets.Cloud[cloud[i].type].Height() * 0.5f), (Rectangle?)new Rectangle(0, 0, TextureAssets.Cloud[cloud[i].type].Width(), TextureAssets.Cloud[cloud[i].type].Height()), color * num21, cloud[i].rotation, new Vector2((float)TextureAssets.Cloud[cloud[i].type].Width() * 0.5f, (float)TextureAssets.Cloud[cloud[i].type].Height() * 0.5f), cloud[i].scale, cloud[i].spriteDir, 0f);
75727 }
75728 }
75729 }
75730 if (invasionType == 4 && !SkyManager.Instance["Martian"].IsActive())
75731 {
75732 SkyManager.Instance.Activate("Martian", default(Vector2));
75733 }
75734 else if (invasionType != 4 && SkyManager.Instance["Martian"].IsActive())
75735 {
75736 SkyManager.Instance.Deactivate("Martian");
75737 }
75738 SkyManager.Instance.ResetDepthTracker();
75739 bgParallax = 0.15;
75740 int num3 = -180;
75741 bool flag2 = true;
75742 int num4 = 0;
75743 if (gameMenu)
75744 {
75745 num4 -= num3;
75746 }
75747 num20 = num4;
75748 num20 += num;
75749 if (!WorldGen.drunkWorldGen && flag && (double)(screenPosition.Y / 16f) <= worldSurface + 10.0)
75750 {
75752 {
75753 if (cloudBGActive > 0f)
75754 {
75755 cloudBGAlpha += 0.0005f * (float)desiredWorldEventsUpdateRate;
75756 if (cloudBGAlpha > 1f)
75757 {
75758 cloudBGAlpha = 1f;
75759 }
75760 }
75761 else
75762 {
75763 cloudBGAlpha -= 0.0005f * (float)desiredWorldEventsUpdateRate;
75764 if (cloudBGAlpha < 0f)
75765 {
75766 cloudBGAlpha = 0f;
75767 }
75768 }
75769 if (cloudBGAlpha > 0f)
75770 {
75773 float num5 = cloudBGAlpha;
75774 if (num5 > 1f)
75775 {
75776 num5 = 1f;
75777 }
75778 bgScale = 1.65f;
75779 bgParallax = 0.09000000357627869;
75780 if (((Game)this).IsActive && !gamePaused)
75781 {
75783 }
75784 if (cloudBGX[0] > (float)backgroundWidth[cloudBG[0]] * bgScale)
75785 {
75786 cloudBGX[0] -= (float)backgroundWidth[cloudBG[0]] * bgScale;
75787 }
75788 if (cloudBGX[0] < (float)(-backgroundWidth[cloudBG[0]]) * bgScale)
75789 {
75790 cloudBGX[0] += (float)backgroundWidth[cloudBG[0]] * bgScale;
75791 }
75792 float num6 = (float)backgroundWidth[cloudBG[0]] * bgScale;
75793 bgTopY = (int)(num18 * 900.0 + 600.0) + (int)scAdj + num20;
75794 if (gameMenu)
75795 {
75796 bgTopY = -150 + num20;
75797 }
75798 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, num6) - (double)(num6 / 2f) - (double)num6);
75799 bgStartX += (int)cloudBGX[0];
75800 bgLoops = screenWidth / (int)num6 + 2 + 2;
75802 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
75803 for (int j = 0; j < bgLoops; j++)
75804 {
75805 spriteBatch.Draw(TextureAssets.Background[cloudBG[0]].Value, new Vector2((float)bgStartX + num6 * (float)j, (float)bgTopY), (Rectangle?)new Rectangle(0, 0, backgroundWidth[cloudBG[0]], backgroundHeight[cloudBG[0]]), ColorOfSurfaceBackgroundsModified * num21, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
75806 }
75807 num5 = cloudBGAlpha * 1.5f;
75808 if (num5 > 1f)
75809 {
75810 num5 = 1f;
75811 }
75813 bgScale = 1.85f;
75814 bgParallax = 0.12;
75815 if (((Game)this).IsActive && !gamePaused)
75816 {
75818 }
75819 if (cloudBGX[1] > (float)backgroundWidth[cloudBG[1]] * bgScale)
75820 {
75821 cloudBGX[1] -= (float)backgroundWidth[cloudBG[1]] * bgScale;
75822 }
75823 if (cloudBGX[1] < (float)(-backgroundWidth[cloudBG[1]]) * bgScale)
75824 {
75825 cloudBGX[1] += (float)backgroundWidth[cloudBG[1]] * bgScale;
75826 }
75827 num6 = (float)backgroundWidth[cloudBG[1]] * bgScale;
75828 bgTopY = (int)(num18 * 1100.0 + 750.0) + (int)scAdj + num20;
75829 if (gameMenu)
75830 {
75831 bgTopY = -50 + num20;
75832 }
75833 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, num6) - (double)(num6 / 2f) - (double)num6);
75834 bgStartX += (int)cloudBGX[1];
75835 bgLoops = screenWidth / (int)num6 + 2 + 2;
75836 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
75837 for (int k = 0; k < bgLoops; k++)
75838 {
75839 spriteBatch.Draw(TextureAssets.Background[cloudBG[1]].Value, new Vector2((float)bgStartX + num6 * (float)k, (float)bgTopY), (Rectangle?)new Rectangle(0, 0, backgroundWidth[cloudBG[1]], backgroundHeight[cloudBG[1]]), ColorOfSurfaceBackgroundsModified * num21, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
75840 }
75841 }
75843 }
75844 cTop = bgTopY - 50;
75845 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
75846 {
75847 for (int l = 0; l < 200; l++)
75848 {
75849 if (cloud[l].active && (double)cloud[l].scale < 1.15 && cloud[l].scale >= 1f)
75850 {
75851 Color color2 = cloud[l].cloudColor(ColorOfTheSkies);
75852 if (atmo < 1f)
75853 {
75854 color2 *= atmo;
75855 }
75856 float num7 = cloud[l].position.Y * ((float)screenHeight / 600f);
75857 float num8 = (float)((double)(screenPosition.Y / 16f - 24f) / worldSurface);
75858 if (num8 < 0f)
75859 {
75860 num8 = 0f;
75861 }
75862 if (num8 > 1f)
75863 {
75864 num8 = 1f;
75865 }
75866 if (gameMenu)
75867 {
75868 num8 = 1f;
75869 }
75870 spriteBatch.Draw(TextureAssets.Cloud[cloud[l].type].Value, new Vector2(cloud[l].position.X + (float)TextureAssets.Cloud[cloud[l].type].Width() * 0.5f, num7 + (float)TextureAssets.Cloud[cloud[l].type].Height() * 0.5f + cTop + 200f), (Rectangle?)new Rectangle(0, 0, TextureAssets.Cloud[cloud[l].type].Width(), TextureAssets.Cloud[cloud[l].type].Height()), color2 * num21, cloud[l].rotation, new Vector2((float)TextureAssets.Cloud[cloud[l].type].Width() * 0.5f, (float)TextureAssets.Cloud[cloud[l].type].Height() * 0.5f), cloud[l].scale, cloud[l].spriteDir, 0f);
75871 }
75872 }
75873 }
75874 if (SceneMetrics.HolyTileCount > 0 && BackgroundEnabled)
75875 {
75876 bgParallax = 0.17;
75877 bgScale = 1.1f;
75878 bgTopY = (int)(num18 * 1400.0 + 900.0) + (int)scAdj + num20;
75880 bgScale *= num19;
75881 bgWidthScaled = (int)((double)(2100f * bgScale) * 1.05);
75882 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
75884 if (gameMenu)
75885 {
75886 bgTopY = 230 + num20;
75887 bgStartX -= 500;
75888 }
75889 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
75891 float num9 = (float)(SceneMetrics.HolyTileCount - SceneMetrics.HallowTileThreshold) / (float)(SceneMetrics.HallowTileMax - SceneMetrics.HallowTileThreshold);
75892 if (num9 > 0.5f)
75893 {
75894 num9 = 0.5f;
75895 }
75896 else if (num9 < 0f)
75897 {
75898 num9 = 0f;
75899 }
75900 ((Color)(ref color3)).R = (byte)((float)(int)((Color)(ref color3)).R * num9);
75901 ((Color)(ref color3)).G = (byte)((float)(int)((Color)(ref color3)).G * num9);
75902 ((Color)(ref color3)).B = (byte)((float)(int)((Color)(ref color3)).B * num9);
75903 ((Color)(ref color3)).A = (byte)((float)(int)((Color)(ref color3)).A * num9 * 0.8f);
75904 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
75905 {
75906 LoadBackground(18);
75907 LoadBackground(19);
75908 for (int m = 0; m < bgLoops; m++)
75909 {
75910 spriteBatch.Draw(TextureAssets.Background[18].Value, new Vector2((float)(bgStartX + bgWidthScaled * m), (float)bgTopY), (Rectangle?)new Rectangle(0, 0, backgroundWidth[18], backgroundHeight[18]), color3, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
75911 spriteBatch.Draw(TextureAssets.Background[19].Value, new Vector2((float)(bgStartX + bgWidthScaled * m + 1900), (float)(bgTopY + 100)), (Rectangle?)new Rectangle(0, 0, backgroundWidth[19], backgroundHeight[19]), color3, 0f, default(Vector2), bgScale * 0.9f, (SpriteEffects)0, 0f);
75912 }
75913 }
75914 }
75915 if (treeMntBGSet1[1] > -1)
75916 {
75918 bgParallax = 0.2;
75919 bgScale = 1.15f;
75920 bgScale *= num19;
75922 if (num10 == 0)
75923 {
75924 num10 = 1;
75925 }
75926 bgWidthScaled = (int)((float)num10 * bgScale);
75927 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
75929 if (treeMntBGSet1[1] == 172)
75930 {
75931 bgLoops++;
75932 }
75933 bgTopY = (int)(num18 * 1400.0 + 1260.0) + (int)scAdj + num20;
75934 }
75936 {
75938 }
75939 cTop = (float)bgTopY * 1.01f - 150f;
75940 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
75941 {
75942 for (int n = 0; n < 200; n++)
75943 {
75944 if (cloud[n].active && cloud[n].scale >= 1.15f)
75945 {
75946 Color color4 = cloud[n].cloudColor(ColorOfTheSkies);
75947 if (atmo < 1f)
75948 {
75949 color4 *= atmo;
75950 }
75951 float num11 = cloud[n].position.Y * ((float)screenHeight / 600f) - 100f;
75952 float num13 = (float)((double)(screenPosition.Y / 16f - 24f) / worldSurface);
75953 if (num13 < 0f)
75954 {
75955 num13 = 0f;
75956 }
75957 if (num13 > 1f)
75958 {
75959 num13 = 1f;
75960 }
75961 if (gameMenu)
75962 {
75963 num13 = 1f;
75964 }
75965 spriteBatch.Draw(TextureAssets.Cloud[cloud[n].type].Value, new Vector2(cloud[n].position.X + (float)TextureAssets.Cloud[cloud[n].type].Width() * 0.5f, num11 + (float)TextureAssets.Cloud[cloud[n].type].Height() * 0.5f + cTop), (Rectangle?)new Rectangle(0, 0, TextureAssets.Cloud[cloud[n].type].Width(), TextureAssets.Cloud[cloud[n].type].Height()), color4 * num21, cloud[n].rotation, new Vector2((float)TextureAssets.Cloud[cloud[n].type].Width() * 0.5f, (float)TextureAssets.Cloud[cloud[n].type].Height() * 0.5f), cloud[n].scale, cloud[n].spriteDir, 0f);
75966 }
75967 }
75968 }
75969 }
75970 if (flag2)
75971 {
75972 num20 += num3;
75973 }
75974 if (flag)
75975 {
75976 for (int num14 = 0; num14 < bgAlphaFrontLayer.Length; num14++)
75977 {
75979 {
75981 if (bgAlphaFrontLayer[num14] > 0f && num14 == 0)
75982 {
75985 }
75986 if (bgAlphaFrontLayer[num14] > 0f && num14 == 10)
75987 {
75990 }
75991 if (bgAlphaFrontLayer[num14] > 0f && num14 == 11)
75992 {
75995 }
75996 if (bgAlphaFrontLayer[num14] > 0f && num14 == 12)
75997 {
76000 }
76001 if (bgAlphaFrontLayer[num14] > 0f && num14 == 1)
76002 {
76003 int[] bgTexIndexes = corruptBG;
76006 }
76007 if (bgAlphaFrontLayer[num14] > 0f && num14 == 2)
76008 {
76009 int[] bgTexIndexes2 = desertBG;
76012 }
76013 if (bgAlphaFrontLayer[num14] > 0f && num14 == 3)
76014 {
76015 int[] bgTexIndexes3 = jungleBG;
76018 }
76019 if (bgAlphaFrontLayer[num14] > 0f && num14 == 4)
76020 {
76022 }
76023 if (bgAlphaFrontLayer[num14] > 0f && num14 == 5)
76024 {
76027 }
76028 if (bgAlphaFrontLayer[num14] > 0f && num14 == 6)
76029 {
76030 int[] bgTexIndexes4 = hallowBG;
76033 }
76034 if (bgAlphaFrontLayer[num14] > 0f && num14 == 7)
76035 {
76036 int[] bgTexIndexes5 = snowBG;
76039 }
76040 if (bgAlphaFrontLayer[num14] > 0f && num14 == 8)
76041 {
76042 int[] bgTexIndexes6 = crimsonBG;
76045 }
76046 if (bgAlphaFrontLayer[num14] > 0f && num14 == 9)
76047 {
76048 int[] bgTexIndexes7 = mushroomBG;
76051 }
76052 if (num14 >= 14)
76053 {
76054 LoaderManager.Get<SurfaceBackgroundStylesLoader>().DrawCloseBackground(num14);
76055 }
76056 }
76057 }
76058 }
76059 if (flag2)
76060 {
76061 num20 -= num3;
76062 }
76064 if (flag && num15 > 0f && !gameMenu && (double)screenPosition.Y < worldSurface * 16.0 + 16.0)
76065 {
76066 bgParallax = 0.1;
76067 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, backgroundWidth[background]) - (double)(backgroundWidth[background] / 2));
76069 bgStartY = 0;
76070 bgLoopsY = 0;
76071 bgTopY = (int)((double)(0f - screenPosition.Y) / (worldSurface * 16.0 - 600.0) * 200.0);
76072 Texture2D value = TextureAssets.Background[49].Value;
76073 for (int num16 = 0; num16 < bgLoops; num16++)
76074 {
76075 bgStartX = 0;
76076 Color color5 = ColorOfTheSkies * num15 * atmo;
76077 int height = Math.Max(screenHeight + 210, value.Height);
76078 spriteBatch.Draw(value, new Rectangle(bgStartX + value.Width * num16, bgTopY, value.Width, height), color5);
76079 }
76080 }
76081 if (!mapFullscreen)
76082 {
76083 SkyManager.Instance.DrawRemainingDepth(spriteBatch);
76084 }
76085 }
static Asset< Texture2D >[] Background
static Asset< Texture2D >[] Cloud
void DrawSurfaceBG_BackMountainsStep1(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack)
Definition Main.cs:76172
static Cloud[] cloud
Definition Main.cs:1471
static SceneMetrics SceneMetrics
Definition Main.cs:1441
float scAdj
Definition Main.cs:2668
double bgParallax
Definition Main.cs:1025
float screenOff
Definition Main.cs:2666
static float windSpeedCurrent
Definition Main.cs:1457
static int[] treeBGSet1
Definition Main.cs:668
static int bgWidthScaled
Definition Main.cs:2658
void DrawSurfaceBG_Corrupt(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:77467
static int[] treeBGSet3
Definition Main.cs:672
void DrawSurfaceBG_Crimson(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:76662
static float cloudBGAlpha
Definition Main.cs:654
static Color ColorOfSurfaceBackgroundsBase
Definition Main.cs:2662
static Color ColorOfTheSkies
Definition Main.cs:2660
void LoadBackground(int i)
Definition Main.cs:75357
static float DrawSurfaceBG_GetFogPower()
Definition Main.cs:76087
static Color ColorOfSurfaceBackgroundsModified
Definition Main.cs:2664
static SpriteBatch spriteBatch
Definition Main.cs:1043
static double worldSurface
The y-coordinate of the top of the dirt layer, in tile coordinates. Corresponds to 0' on the Depth Me...
Definition Main.cs:1351
static double desiredWorldEventsUpdateRate
Definition Main.cs:2724
static float[] cloudBGX
Definition Main.cs:652
static int[] crimsonBG
Definition Main.cs:686
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
void DrawSurfaceBG_Desert(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:77360
static int[] corruptBG
Definition Main.cs:676
static int[] backgroundWidth
Definition Main.cs:1810
void SetBackgroundOffsets(int backgroundID, double backgroundTopMagicNumber, int pushBGTopHack)
Definition Main.cs:76863
static bool BackgroundEnabled
Definition Main.cs:871
static float atmo
Definition Main.cs:2654
static int[] hallowBG
Definition Main.cs:684
void DrawSurfaceBG_Snow(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:76766
float cTop
Definition Main.cs:2670
int bgLoops
Definition Main.cs:1029
static int[] treeMntBGSet1
Definition Main.cs:660
int bgLoopsY
Definition Main.cs:1033
static float[] bgAlphaFrontLayer
Definition Main.cs:881
int bgStartX
Definition Main.cs:1027
void DrawSurfaceBG_GoodEvilDesert(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack)
Definition Main.cs:77206
static int[] treeBGSet2
Definition Main.cs:670
static int invasionType
Definition Main.cs:2120
int bgStartY
Definition Main.cs:1031
static int[] backgroundHeight
Definition Main.cs:1812
void DrawSurfaceBG_BackMountainsStep2(int pushBGTopHack)
Definition Main.cs:76279
static float bgScale
Definition Main.cs:2656
static int[] mushroomBG
Definition Main.cs:690
static int[] desertBG
Definition Main.cs:688
static int screenWidth
Definition Main.cs:1868
static float cloudBGActive
Definition Main.cs:656
static int[] cloudBG
Definition Main.cs:658
static int[] snowBG
Definition Main.cs:682
void DrawSurfaceBG_Jungle(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:77261
void DrawSurfaceBG_Hallow(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:77115
void DrawSurfaceBG_DrawChangeOverlay(int backgroundAreaId)
Definition Main.cs:77454
void DrawSurfaceBG_Mushroom(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:76417
static bool gameMenu
Definition Main.cs:2076
static int[] jungleBG
Definition Main.cs:678
static bool mapFullscreen
Definition Main.cs:1001
static bool gamePaused
Definition Main.cs:1141
void DrawSurfaceBG_Forest(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
Definition Main.cs:77636
static int background
Definition Main.cs:1339
static int[] treeBGSet4
Definition Main.cs:674
static bool remixWorld
Definition Main.cs:377

References Terraria.Main.atmo, Terraria.GameContent.TextureAssets.Background, Terraria.Main.background, Terraria.Main.BackgroundEnabled, Terraria.Main.backgroundHeight, Terraria.Main.backgroundWidth, Terraria.Main.bgAlphaFrontLayer, Terraria.Main.bgLoops, Terraria.Main.bgLoopsY, Terraria.Main.bgParallax, Terraria.Main.bgScale, Terraria.Main.bgStartX, Terraria.Main.bgStartY, Terraria.Main.bgTopY, Terraria.Main.bgWidthScaled, Terraria.GameContent.TextureAssets.Cloud, Terraria.Main.cloud, Terraria.Main.cloudBG, Terraria.Main.cloudBGActive, Terraria.Main.cloudBGAlpha, Terraria.Main.cloudBGX, Terraria.Graphics.Light.Color, Terraria.Main.ColorOfSurfaceBackgroundsBase, Terraria.Main.ColorOfSurfaceBackgroundsModified, Terraria.Main.ColorOfTheSkies, Terraria.Main.corruptBG, Terraria.Main.crimsonBG, Terraria.Main.cTop, Terraria.Main.desertBG, Terraria.Main.desiredWorldEventsUpdateRate, Terraria.Main.DrawSurfaceBG_BackMountainsStep1(), Terraria.Main.DrawSurfaceBG_BackMountainsStep2(), Terraria.Main.DrawSurfaceBG_Corrupt(), Terraria.Main.DrawSurfaceBG_Crimson(), Terraria.Main.DrawSurfaceBG_Desert(), Terraria.Main.DrawSurfaceBG_DrawChangeOverlay(), Terraria.Main.DrawSurfaceBG_Forest(), Terraria.Main.DrawSurfaceBG_GetFogPower(), Terraria.Main.DrawSurfaceBG_GoodEvilDesert(), Terraria.Main.DrawSurfaceBG_Hallow(), Terraria.Main.DrawSurfaceBG_Jungle(), Terraria.Main.DrawSurfaceBG_Mushroom(), Terraria.Main.DrawSurfaceBG_Snow(), Terraria.WorldGen.drunkWorldGen, Terraria.Main.gameMenu, Terraria.Main.gamePaused, Terraria.Main.hallowBG, Terraria.SceneMetrics.HallowTileMax, Terraria.SceneMetrics.HallowTileThreshold, Terraria.SceneMetrics.HolyTileCount, Terraria.Graphics.Effects.SkyManager.Instance, Terraria.Main.invasionType, Terraria.Main.jungleBG, Terraria.Main.LoadBackground(), Terraria.Main.mapFullscreen, Terraria.Main.mushroomBG, Terraria.Main.remixWorld, Terraria.WorldGen.remixWorldGen, Terraria.Main.scAdj, Terraria.Main.screenHeight, Terraria.Main.screenOff, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.SetBackgroundOffsets(), Terraria.Main.snowBG, Terraria.Main.spriteBatch, Terraria.Main.treeBGSet1, Terraria.Main.treeBGSet2, Terraria.Main.treeBGSet3, Terraria.Main.treeBGSet4, Terraria.Main.treeMntBGSet1, Terraria.Main.windSpeedCurrent, and Terraria.Main.worldSurface.

Referenced by Terraria.Main.DrawBG(), and Terraria.Main.DrawCapture().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: