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

◆ DrawSurfaceBG_GoodEvilDesert()

void Terraria.Main.DrawSurfaceBG_GoodEvilDesert ( double backgroundTopMagicNumber,
float bgGlobalScaleMultiplier,
int pushBGTopHack )
inlineprivate

Definition at line 77206 of file Main.cs.

77207 {
77208 //IL_0134: Unknown result type (might be due to invalid IL or missing references)
77209 //IL_014b: Unknown result type (might be due to invalid IL or missing references)
77210 //IL_0155: Unknown result type (might be due to invalid IL or missing references)
77211 //IL_0161: Unknown result type (might be due to invalid IL or missing references)
77212 //IL_0167: Unknown result type (might be due to invalid IL or missing references)
77213 //IL_02c8: Unknown result type (might be due to invalid IL or missing references)
77214 //IL_02df: Unknown result type (might be due to invalid IL or missing references)
77215 //IL_02e9: Unknown result type (might be due to invalid IL or missing references)
77216 //IL_02f5: Unknown result type (might be due to invalid IL or missing references)
77217 //IL_02fb: Unknown result type (might be due to invalid IL or missing references)
77218 LoadBackground(26);
77219 bgScale = 1.25f;
77221 bgWidthScaled = (int)((float)backgroundWidth[26] * bgScale);
77222 bgParallax = 0.37;
77223 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
77224 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
77225 bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1750.0) + (int)scAdj + pushBGTopHack;
77226 if (gameMenu)
77227 {
77228 bgTopY = 320 + pushBGTopHack;
77229 }
77231 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
77232 {
77233 for (int i = 0; i < bgLoops; i++)
77234 {
77235 spriteBatch.Draw(TextureAssets.Background[26].Value, new Vector2((float)(bgStartX + bgWidthScaled * i), (float)bgTopY), (Rectangle?)new Rectangle(0, 0, backgroundWidth[26], backgroundHeight[26]), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
77236 }
77237 }
77238 bgScale = 1.34f;
77240 LoadBackground(27);
77241 bgWidthScaled = (int)((float)backgroundWidth[27] * bgScale);
77242 bgParallax = 0.49;
77243 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
77244 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
77245 bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2150.0) + (int)scAdj + pushBGTopHack;
77246 if (gameMenu)
77247 {
77248 bgTopY = 480 + pushBGTopHack;
77249 bgStartX -= 120;
77250 }
77252 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
77253 {
77254 for (int j = 0; j < bgLoops; j++)
77255 {
77256 spriteBatch.Draw(TextureAssets.Background[27].Value, new Vector2((float)(bgStartX + bgWidthScaled * j), (float)bgTopY), (Rectangle?)new Rectangle(0, 0, backgroundWidth[27], backgroundHeight[27]), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
77257 }
77258 }
77259 }
static Asset< Texture2D >[] Background
float scAdj
Definition Main.cs:2668
double bgParallax
Definition Main.cs:1025
static int bgWidthScaled
Definition Main.cs:2658
void LoadBackground(int i)
Definition Main.cs:75357
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 Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static int[] backgroundWidth
Definition Main.cs:1810
int bgLoops
Definition Main.cs:1029
int bgStartX
Definition Main.cs:1027
static int[] backgroundHeight
Definition Main.cs:1812
static float bgScale
Definition Main.cs:2656
static int screenWidth
Definition Main.cs:1868
static bool gameMenu
Definition Main.cs:2076

References Terraria.GameContent.TextureAssets.Background, Terraria.Main.backgroundHeight, Terraria.Main.backgroundWidth, Terraria.Main.bgLoops, Terraria.Main.bgParallax, Terraria.Main.bgScale, Terraria.Main.bgStartX, Terraria.Main.bgTopY, Terraria.Main.bgWidthScaled, Terraria.Main.ColorOfSurfaceBackgroundsModified, Terraria.Main.gameMenu, Terraria.Graphics.Effects.SkyManager.Instance, Terraria.Main.LoadBackground(), Terraria.Main.scAdj, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.spriteBatch, and Terraria.Main.worldSurface.

Referenced by Terraria.Main.DrawSurfaceBG().

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