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

◆ DrawBackgroundBlackFill()

void Terraria.Main.DrawBackgroundBlackFill ( )
inlineprivate

Definition at line 77837 of file Main.cs.

77838 {
77839 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
77840 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
77841 float value = (float)(worldSurface + 2.0) * 16f - screenPosition.Y;
77842 float value2 = (float)maxTilesY * 16f - 2880f - (screenPosition.Y + (float)screenHeight);
77843 value = MathHelper.Clamp(value, 0f, (float)screenHeight);
77844 value2 = MathHelper.Clamp(value2, 0f, (float)screenHeight);
77845 if (value2 - value > 0f)
77846 {
77847 spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, (int)value, screenWidth, (int)(value2 - value)), Color.Black);
77848 }
77849 }
static Asset< Texture2D > BlackTile
static int maxTilesY
The height of the currently-loaded world in tiles.
Definition Main.cs:1191
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 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
static int screenWidth
Definition Main.cs:1868

References Terraria.GameContent.TextureAssets.BlackTile, Terraria.Main.maxTilesY, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.spriteBatch, and Terraria.Main.worldSurface.

Referenced by Terraria.Main.DoDraw().

+ Here is the caller graph for this function: