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

◆ DrawSurfaceBG_Jungle()

void Terraria.Main.DrawSurfaceBG_Jungle ( double backgroundTopMagicNumber,
float bgGlobalScaleMultiplier,
int pushBGTopHack,
int[] bgTexIndexes )
inlineprivate

Definition at line 77261 of file Main.cs.

77262 {
77263 //IL_0183: Unknown result type (might be due to invalid IL or missing references)
77264 //IL_0192: Unknown result type (might be due to invalid IL or missing references)
77265 //IL_019e: Unknown result type (might be due to invalid IL or missing references)
77266 //IL_01a4: Unknown result type (might be due to invalid IL or missing references)
77267 //IL_0354: Unknown result type (might be due to invalid IL or missing references)
77268 //IL_0363: Unknown result type (might be due to invalid IL or missing references)
77269 //IL_036f: Unknown result type (might be due to invalid IL or missing references)
77270 //IL_0375: Unknown result type (might be due to invalid IL or missing references)
77271 //IL_0525: Unknown result type (might be due to invalid IL or missing references)
77272 //IL_0534: Unknown result type (might be due to invalid IL or missing references)
77273 //IL_0540: Unknown result type (might be due to invalid IL or missing references)
77274 //IL_0546: Unknown result type (might be due to invalid IL or missing references)
77276 bgScale = 1.25f;
77278 bgWidthScaled = (int)((float)backgroundWidth[bgTexIndexes[0]] * bgScale);
77279 bgParallax = 0.4;
77281 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
77282 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
77283 bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1660.0) + (int)scAdj + pushBGTopHack;
77285 if (gameMenu)
77286 {
77287 bgTopY = 320 + pushBGTopHack;
77288 }
77289 if (bgTexIndexes[0] == 59)
77290 {
77291 bgTopY -= 200;
77292 }
77295 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
77296 {
77297 for (int i = 0; i < bgLoops; i++)
77298 {
77299 spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float)(bgStartX + bgWidthScaled * i), (float)bgTopY), GetBackgroundRect(bgTexIndexes[0]), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
77300 }
77301 }
77303 bgScale = 1.31f;
77305 bgWidthScaled = (int)((float)backgroundWidth[bgTexIndexes[1]] * bgScale);
77306 bgParallax = 0.43;
77308 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
77309 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
77310 bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1840.0) + (int)scAdj + pushBGTopHack;
77312 if (gameMenu)
77313 {
77314 bgTopY = 400 + pushBGTopHack;
77315 bgStartX -= 80;
77316 }
77317 if (bgTexIndexes[1] == 60)
77318 {
77319 bgTopY -= 175;
77320 }
77323 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
77324 {
77325 for (int j = 0; j < bgLoops; j++)
77326 {
77327 spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float)(bgStartX + bgWidthScaled * j), (float)bgTopY), GetBackgroundRect(bgTexIndexes[1]), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, (SpriteEffects)1, 0f);
77328 }
77329 }
77330 bgScale = 1.34f;
77333 bgWidthScaled = (int)((float)backgroundWidth[bgTexIndexes[2]] * bgScale);
77334 bgParallax = 0.49;
77336 SkyManager.Instance.DrawToDepth(spriteBatch, 1f / (float)bgParallax);
77337 bgStartX = (int)(0.0 - Math.IEEERemainder((double)screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
77338 bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2060.0) + (int)scAdj + pushBGTopHack;
77340 if (gameMenu)
77341 {
77342 bgTopY = 480 + pushBGTopHack;
77343 bgStartX -= 120;
77344 }
77345 if (bgTexIndexes[2] == 61)
77346 {
77347 bgTopY -= 150;
77348 }
77351 if ((double)screenPosition.Y < worldSurface * 16.0 + 16.0)
77352 {
77353 for (int k = 0; k < bgLoops; k++)
77354 {
77355 spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float)(bgStartX + bgWidthScaled * k), (float)bgTopY), GetBackgroundRect(bgTexIndexes[2]), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, (SpriteEffects)0, 0f);
77356 }
77357 }
77358 }
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
void SetBackgroundOffsets(int backgroundID, double backgroundTopMagicNumber, int pushBGTopHack)
Definition Main.cs:76863
int bgLoops
Definition Main.cs:1029
int bgStartX
Definition Main.cs:1027
Rectangle? GetBackgroundRect(int backgroundTextureIndex)
Definition Main.cs:77586
int DrawSurfaceBG_GetLayerYOffset(int bgTextureIndex)
Definition Main.cs:76111
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.backgroundWidth, Terraria.Main.bgLoops, Terraria.Main.bgParallax, Terraria.Main.bgScale, Terraria.Main.bgStartX, Terraria.Main.bgTopY, Terraria.Main.bgWidthScaled, Terraria.Main.ColorOfSurfaceBackgroundsModified, Terraria.Main.DrawSurfaceBG_GetLayerYOffset(), Terraria.Main.gameMenu, Terraria.Main.GetBackgroundRect(), Terraria.Graphics.Effects.SkyManager.Instance, Terraria.Main.LoadBackground(), Terraria.Main.scAdj, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.SetBackgroundOffsets(), 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: