56272 {
56273 bool flag = false;
56275 {
56276 flag = true;
56277 }
56279 {
56280 flag = false;
56281 }
56283 int num = 30;
56285 {
56286 num = 0;
56287 }
56289 {
56290 num = -180;
56291 }
56294 {
56296 }
56305 if (flag && (
double)screenPosition.Y <
worldSurface * 16.0 + 16.0)
56306 {
56307 for (
int i = 0;
i < 200;
i++)
56308 {
56310 {
56313 float num9 = (
cloud[
i].scale + 1f) / 2f * 0.9f;
56314 color.R = (byte)((
float)(int)color.
R *
num8);
56315 color.G = (byte)((
float)(int)color.
G *
num9);
56318 spriteBatch.Draw(
TextureAssets.
Cloud[
cloud[
i].type].Value,
new Vector2(
cloud[
i].position.X + (
float)
TextureAssets.
Cloud[
cloud[
i].type].Width() * 0.5f,
num10 + (float)
TextureAssets.
Cloud[
cloud[
i].type].Height() * 0.5f),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Cloud[
cloud[
i].type].Width(),
TextureAssets.
Cloud[
cloud[
i].type].Height()), color *
num7,
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);
56319 }
56320 }
56321 }
56323 {
56325 }
56327 {
56329 }
56336 {
56338 }
56342 {
56344 {
56346 {
56349 {
56351 }
56352 }
56353 else
56354 {
56357 {
56359 }
56360 }
56362 {
56367 {
56369 }
56373 {
56375 }
56377 {
56379 }
56381 {
56383 }
56387 {
56389 }
56396 {
56397 spriteBatch.Draw(
TextureAssets.
Background[
cloudBG[0]].Value,
new Vector2((
float)
bgStartX +
num14 * (float)
j,
bgTopY),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
backgroundWidth[
cloudBG[0]],
backgroundHeight[
cloudBG[0]]),
ColorOfSurfaceBackgroundsModified *
num7, 0f,
default(
Vector2),
bgScale,
SpriteEffects.None, 0f);
56398 }
56401 {
56403 }
56408 {
56410 }
56412 {
56414 }
56416 {
56418 }
56422 {
56424 }
56430 {
56431 spriteBatch.Draw(
TextureAssets.
Background[
cloudBG[1]].Value,
new Vector2((
float)
bgStartX +
num14 * (float)
k,
bgTopY),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
backgroundWidth[
cloudBG[1]],
backgroundHeight[
cloudBG[1]]),
ColorOfSurfaceBackgroundsModified *
num7, 0f,
default(
Vector2),
bgScale,
SpriteEffects.None, 0f);
56432 }
56433 }
56435 }
56438 {
56439 for (
int l = 0;
l < 200;
l++)
56440 {
56442 {
56445 {
56447 }
56451 {
56453 }
56455 {
56457 }
56459 {
56461 }
56462 spriteBatch.Draw(
TextureAssets.
Cloud[
cloud[
l].type].Value,
new Vector2(
cloud[
l].position.X + (
float)
TextureAssets.
Cloud[
cloud[
l].type].Width() * 0.5f,
num15 + (float)
TextureAssets.
Cloud[
cloud[
l].type].Height() * 0.5f +
cTop + 200f),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Cloud[
cloud[
l].type].Width(),
TextureAssets.
Cloud[
cloud[
l].type].Height()),
color2 *
num7,
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);
56463 }
56464 }
56465 }
56467 {
56477 {
56480 }
56485 {
56487 }
56488 else if (
num17 < 0f)
56489 {
56491 }
56495 color3.A = (byte)((
float)(int)
color3.A *
num17 * 0.8f);
56496 if ((
double)screenPosition.Y <
worldSurface * 16.0 + 16.0)
56497 {
56501 {
56502 spriteBatch.Draw(
TextureAssets.
Background[18].Value,
new Vector2(
bgStartX +
bgWidthScaled *
m,
bgTopY),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
backgroundWidth[18],
backgroundHeight[18]),
color3, 0f,
default(
Vector2),
bgScale,
SpriteEffects.None, 0f);
56503 spriteBatch.Draw(
TextureAssets.
Background[19].Value,
new Vector2(
bgStartX +
bgWidthScaled *
m + 1900,
bgTopY + 100),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
backgroundWidth[19],
backgroundHeight[19]),
color3, 0f,
default(
Vector2),
bgScale * 0.9f,
SpriteEffects.None, 0f);
56504 }
56505 }
56506 }
56508 {
56515 {
56517 }
56522 {
56524 }
56526 }
56528 {
56530 }
56532 if ((
double)screenPosition.Y <
worldSurface * 16.0 + 16.0)
56533 {
56534 for (
int n = 0;
n < 200;
n++)
56535 {
56537 {
56540 {
56542 }
56546 {
56548 }
56550 {
56552 }
56554 {
56556 }
56557 spriteBatch.Draw(
TextureAssets.
Cloud[
cloud[
n].type].Value,
new Vector2(
cloud[
n].position.X + (
float)
TextureAssets.
Cloud[
cloud[
n].type].Width() * 0.5f,
num19 + (float)
TextureAssets.
Cloud[
cloud[
n].type].Height() * 0.5f +
cTop),
new Microsoft.
Xna.
Framework.
Rectangle(0, 0,
TextureAssets.
Cloud[
cloud[
n].type].Width(),
TextureAssets.
Cloud[
cloud[
n].type].Height()),
color4 *
num7,
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);
56558 }
56559 }
56560 }
56561 }
56563 {
56565 }
56566 if (flag)
56567 {
56569 {
56571 {
56574 {
56577 }
56579 {
56582 }
56584 {
56587 }
56589 {
56592 }
56594 {
56598 }
56600 {
56604 }
56606 {
56610 }
56612 {
56614 }
56616 {
56619 }
56621 {
56625 }
56627 {
56631 }
56633 {
56637 }
56639 {
56643 }
56644 }
56645 }
56646 }
56648 {
56650 }
56653 {
56662 {
56667 }
56668 }
56670 {
56672 }
56673 }
static float Lerp(float value1, float value2, float amount)
static double IEEERemainder(double x, double y)
static byte Max(byte val1, byte val2)
static Asset< Texture2D >[] Background
static Asset< Texture2D >[] Cloud
static SkyManager Instance
static Microsoft.Xna.Framework.Color ColorOfTheSkies
void DrawSurfaceBG_BackMountainsStep1(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack)
static SceneMetrics SceneMetrics
static float windSpeedCurrent
void DrawSurfaceBG_Corrupt(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
void DrawSurfaceBG_Crimson(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
static float cloudBGAlpha
void LoadBackground(int i)
static float DrawSurfaceBG_GetFogPower()
static SpriteBatch spriteBatch
static double worldSurface
static Vector2 screenPosition
void DrawSurfaceBG_Desert(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
static int[] backgroundWidth
void SetBackgroundOffsets(int backgroundID, double backgroundTopMagicNumber, int pushBGTopHack)
static bool BackgroundEnabled
void DrawSurfaceBG_Snow(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
static int[] treeMntBGSet1
static float[] bgAlphaFrontLayer
void DrawSurfaceBG_GoodEvilDesert(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack)
static Microsoft.Xna.Framework.Color ColorOfSurfaceBackgroundsModified
static int[] backgroundHeight
void DrawSurfaceBG_BackMountainsStep2(int pushBGTopHack)
static Microsoft.Xna.Framework.Color ColorOfSurfaceBackgroundsBase
static float cloudBGActive
void DrawSurfaceBG_Jungle(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
void DrawSurfaceBG_Hallow(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
void DrawSurfaceBG_DrawChangeOverlay(int backgroundAreaId)
void DrawSurfaceBG_Mushroom(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)
static bool mapFullscreen
void DrawSurfaceBG_Forest(double backgroundTopMagicNumber, float bgGlobalScaleMultiplier, int pushBGTopHack, int[] bgTexIndexes)