73242 {
73243
73244
73245
73246
73247
73248
73249
73250
73251
73252
73253
73254
73255
73256
73257
73258
73259
73260
73261
73262
73263
73264
73265
73266
73267
73268
73269
73270
73271
73272
73273
73274
73275
73276
73277
73278
73279
73280
73281
73282
73283
73284
73285
73286
73287
73288
73289
73290
73291
73292
73293
73294
73295
73296
73297
73298
73299
73300
73301
73302
73303
73304
73305
73306
73307
73308
73309
73310
73311
73312
73313
73314
73315
73316
73317
73318
73319
73320
73321
73322
73323
73324
73325
73326
73327
73328
73329
73330
73331
73332
73333
73334
73335
73336
73337
73338
73339
73340
73341
73342
73343
73344
73345
73346
73347
73348
73349
73350
73351
73352
73353
73354
73355
73356
73357
73358
73359
73360
73361
73362
73363
73364
73365
73366
73367
73368
73369
73370
73371
73372
73373
73374
73375
73376
73377
73378
73379
73380
73381
73382
73383
73384
73385
73386
73387
73388
73389
73390
73391
73392
73393
73394
73395
73396
73397
73398
73399
73400
73401
73402
73403
73404
73405
73406
73407
73413 Vector2
vector =
default(Vector2);
73416 {
73418 }
73428 {
73430 }
73432 {
73434 }
73436 {
73438 }
73440 {
73442 }
73443 Vector2
vector2 =
default(Vector2);
73444 Rectangle value = default(Rectangle);
73447 {
73449 {
73450 if (
tile[
j, i] ==
null)
73451 {
73453 }
73455 {
73456 continue;
73457 }
73458 Color color = Lighting.GetColor(
j, i);
73463 if (
tile[
j, i].lava())
73464 {
73466 {
73467 continue;
73468 }
73472 {
73476 {
73478 }
73479 }
73481 {
73484 }
73486 {
73488 num28 = i * 16 + 8;
73489 }
73491 }
73492 else if (
tile[
j, i].honey())
73493 {
73495 }
73496 else if (
tile[
j, i].shimmer())
73497 {
73500 }
73502 {
73504 }
73506 {
73507 continue;
73508 }
73511 {
73513 }
73515 {
73517 }
73523 {
73527 if ((
double)
num9 > 0.55)
73528 {
73530 }
73531 if ((
double)
num9 < 0.35)
73532 {
73534 }
73537 {
73539 {
73540 continue;
73541 }
73543 {
73546 }
73548 {
73552 }
73554 {
73557 }
73558 else
73559 {
73562 }
73563 }
73564 else
73565 {
73568 }
73569 }
73571 {
73572 ((Rectangle)(
ref value)).
_002Ector(0, 4, value.Width, value.Height);
73573 }
73575 {
73578 }
73579 else
73580 {
73582 {
73584 {
73586 break;
73587 }
73588 }
73590 {
73593 }
73595 {
73596 ((Rectangle)(
ref value)).
_002Ector(0, 2, value.Width, value.Height);
73597 }
73598 }
73599 if ((((Color)(
ref color)).R > 20 || ((
Color)(
ref color)).B > 20 || ((Color)(
ref color)).G > 20) && value.Y < 4)
73600 {
73602 if (((Color)(
ref color)).G >
num13)
73603 {
73605 }
73606 if (((Color)(
ref color)).B >
num13)
73607 {
73609 }
73612 {
73614 if (
tile[
j, i].honey())
73615 {
73617 }
73620 obj.velocity *= 0
f;
73621 }
73622 }
73623 if (
tile[
j, i].honey())
73624 {
73627 {
73629 }
73630 }
73631 if (
tile[
j, i].lava())
73632 {
73635 {
73637 }
73638 if (((
Game)
this).IsActive && !
gamePaused && Dust.lavaBubbles < 200)
73639 {
73641 {
73642 Dust.NewDust(
new Vector2((
float)(
j * 16), (
float)(i * 16)), 16, 16, 35);
73643 }
73644 if (value.Y == 0 &&
rand.Next(350) == 0)
73645 {
73646 int num15 = Dust.NewDust(
new Vector2((
float)(
j * 16), (
float)(i * 16) +
num3 * 2
f - 8
f), 16, 8, 35, 0
f, 0
f, 50,
default(Color), 1.5f);
73648 obj2.velocity *= 0.8f;
73651 if (
rand.Next(10) == 0)
73652 {
73654 }
73656 }
73657 }
73658 }
73665 {
73667 }
73668 if (Lighting.NotRetro && !
bg)
73669 {
73672 {
73673 for (
int l = 0;
l < 4;
l++)
73674 {
73677 int width = 8;
73678 int height = 8;
73680 Color
color4 = Lighting.GetColor(
j, i);
73682 {
73683 color4 = Lighting.GetColor(
j - 1, i - 1);
73684 if (value.Height < 8)
73685 {
73686 height = value.Height;
73687 }
73688 }
73690 {
73691 color4 = Lighting.GetColor(
j + 1, i - 1);
73693 if (value.Height < 8)
73694 {
73695 height = value.Height;
73696 }
73697 }
73699 {
73700 color4 = Lighting.GetColor(
j - 1, i + 1);
73702 height = 8 - (16 - value.Height);
73703 }
73705 {
73706 color4 = Lighting.GetColor(
j + 1, i + 1);
73709 height = 8 - (16 - value.Height);
73710 }
73721 {
73723 }
73724 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
new Vector2((
float)
num20, (float)
num21) +
vector, (Rectangle?)
new Rectangle(value.X +
num20, value.Y +
num21, width, height),
color3, 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73726 {
73727 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
new Vector2((
float)
num20, (float)
num21) +
vector, (Rectangle?)
new Rectangle(value.X +
num20, value.Y +
num21 + 36, width, height),
LiquidRenderer.
GetShimmerGlitterColor(
flag2,
j, i), 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73728 }
73729 }
73730 }
73731 else
73732 {
73735 {
73736 value.Y += 36;
73737 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)value,
LiquidRenderer.
GetShimmerGlitterColor(
flag2,
j, i), 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73738 }
73739 }
73740 }
73741 else
73742 {
73743 if (value.Y < 4)
73744 {
73745 value.X += (int)(
wFrame * 18
f);
73746 }
73749 {
73750 value.Y += 36;
73751 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)value,
LiquidRenderer.
GetShimmerGlitterColor(
flag2,
j, i), 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73752 }
73753 }
73754 if (!
tile[
j, i + 1].halfBrick())
73755 {
73756 continue;
73757 }
73758 color = Lighting.GetColor(
j, i + 1);
73765 {
73767 }
73769 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)
new Rectangle(0, 4, 16, 8), color, 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73771 {
73772 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)
new Rectangle(0, 40, 16, 8),
LiquidRenderer.
GetShimmerGlitterColor(
flag2,
j, i), 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73773 }
73775 float num24 = 0.75f;
73777 {
73780 }
73781 for (
int m = 0; (float)
m <
num22;
m++)
73782 {
73785 {
73786 break;
73787 }
73791 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)
new Rectangle(0, 18, 16, 16), color *
num26, 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73793 {
73794 spriteBatch.Draw(
TextureAssets.
Liquid[
num4].Value,
vector2 -
screenPosition +
vector, (Rectangle?)
new Rectangle(0, 54, 16, 16),
LiquidRenderer.
GetShimmerGlitterColor(
flag2,
j, i) *
num26, 0
f,
default(Vector2), 1
f, (SpriteEffects)0, 0
f);
73795 }
73796 }
73797 }
73798 }
73800 {
73804 }
73806 }
static Vector4 GetShimmerBaseColor(float worldPositionX, float worldPositionY)
static Color GetShimmerGlitterColor(bool top, float worldPositionX, float worldPositionY)
static Asset< Texture2D >[] Liquid
static int maxTilesY
The height of the currently-loaded world in tiles.
static bool[] tileSolidTop
static float ambientLavaStrength
static SpriteBatch spriteBatch
static float ambientLavaY
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
static int maxTilesX
The width of the currently-loaded world in tiles.
static int offScreenRange
static float ambientLavaX
static UnifiedRandom rand
static void DrawTileInWater(Vector2 drawOffset, int x, int y)