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

◆ DrawSimpleSurfaceBackground()

void Terraria.Main.DrawSimpleSurfaceBackground ( Vector2 areaPosition,
int areaWidth,
int areaHeight )
inline

Definition at line 72376 of file Main.cs.

72377 {
72378 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
72379 //IL_0026: Unknown result type (might be due to invalid IL or missing references)
72380 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
72381 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
72382 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
72383 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
72384 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
72385 //IL_0058: Unknown result type (might be due to invalid IL or missing references)
72386 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
72387 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
72388 //IL_0063: Unknown result type (might be due to invalid IL or missing references)
72389 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
72390 //IL_0079: Unknown result type (might be due to invalid IL or missing references)
72391 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
72392 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
72393 //IL_0087: Unknown result type (might be due to invalid IL or missing references)
72394 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
72395 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
72396 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
72397 //IL_0094: Unknown result type (might be due to invalid IL or missing references)
72398 //IL_0099: Unknown result type (might be due to invalid IL or missing references)
72399 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
72400 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
72401 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
72402 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
72403 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
72404 //IL_00c9: Unknown result type (might be due to invalid IL or missing references)
72405 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
72406 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
72407 //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
72408 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
72409 //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
72410 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
72411 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
72412 //IL_0120: Unknown result type (might be due to invalid IL or missing references)
72413 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
72414 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
72415 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
72416 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
72417 //IL_013f: Unknown result type (might be due to invalid IL or missing references)
72418 //IL_0144: Unknown result type (might be due to invalid IL or missing references)
72419 //IL_0162: Unknown result type (might be due to invalid IL or missing references)
72420 float num = (float)(worldSurface + 1.0) * 16f;
72421 float num2 = Math.Min(areaPosition.Y + (float)areaHeight, num) - areaPosition.Y;
72422 float y = areaPosition.Y;
72423 float num3 = areaPosition.Y + num2;
72424 Vector4 vector = ((Color)(ref ColorOfTheSkies)).ToVector4();
72425 Color val = new Color(53, 43, 243);
72426 Vector4 value = ((Color)(ref val)).ToVector4() * vector;
72427 val = new Color(132, 170, 248);
72428 Vector4 value2 = ((Color)(ref val)).ToVector4() * vector;
72429 Color color = default(Color);
72430 ((Color)(ref color))._002Ector(Vector4.Lerp(value, value2, y / num));
72431 Color color2 = default(Color);
72432 ((Color)(ref color2))._002Ector(Vector4.Lerp(value, value2, num3 / num));
72433 VertexColors colors = default(VertexColors);
72434 colors.TopLeftColor = color;
72435 colors.TopRightColor = color;
72436 colors.BottomLeftColor = color2;
72437 colors.BottomRightColor = color2;
72438 tileBatch.Draw(TextureAssets.BlackTile.Value, new Vector4(0f, 0f, (float)areaWidth, num2), colors);
72439 float num4 = (float)areaHeight - num2;
72440 if (num4 > 0f)
72441 {
72442 colors.TopLeftColor = Color.Black;
72443 colors.TopRightColor = Color.Black;
72444 colors.BottomLeftColor = Color.Black;
72445 colors.BottomRightColor = Color.Black;
72446 tileBatch.Draw(TextureAssets.BlackTile.Value, new Vector4(0f, num2, (float)areaWidth, num4), colors);
72447 }
72448 }
static Asset< Texture2D > BlackTile
static Color ColorOfTheSkies
Definition Main.cs:2660
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 TileBatch tileBatch
Definition Main.cs:1045

References Terraria.GameContent.TextureAssets.BlackTile, Terraria.Graphics.Light.Color, Terraria.Main.ColorOfTheSkies, Terraria.Main.tileBatch, and Terraria.Main.worldSurface.

Referenced by Terraria.Main.DrawCapture().

+ Here is the caller graph for this function: