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

◆ RefreshStrip()

static void Terraria.WorldGen.RefreshStrip ( int xStart,
int yStart,
int xEnd,
int yEnd,
ref int totalEcho,
ref int totalFramed )
inlinestatic

Definition at line 70445 of file WorldGen.cs.

70446 {
70447 int num = xStart - 1;
70448 int num2 = yStart - 1;
70449 int num3 = xEnd - xStart;
70450 int num4 = yEnd - yStart;
70451 if (num4 > 50 || num3 > 200)
70452 {
70453 throw new IndexOutOfRangeException();
70454 }
70455 int num5 = 0;
70457 for (int i = 1; i <= num3; i++)
70458 {
70459 Bits64 value = default(Bits64);
70460 for (int j = 1; j <= num4; j++)
70461 {
70462 Tile tile = Main.tile[num + i, num2 + j];
70463 if (tile != null && (tile.invisibleBlock() || tile.invisibleWall()))
70464 {
70465 num5++;
70466 value[j] = true;
70467 }
70468 }
70470 }
70471 if (num5 == 0)
70472 {
70473 return;
70474 }
70475 vertical64BitStrips.Expand3x3();
70476 for (int k = 0; k < num3 + 2; k++)
70477 {
70479 if (bits.IsEmpty)
70480 {
70481 continue;
70482 }
70483 for (int l = 0; l < num4 + 2; l++)
70484 {
70485 if (bits[l])
70486 {
70487 totalFramed++;
70488 Reframe(num + k, num2 + l);
70489 }
70490 }
70491 }
70493 totalEcho += num5;
70494 }
static readonly Vertical64BitStrips bitStrip
Definition WorldGen.cs:1208
static void Reframe(int x, int y, bool resetFrame=false)

References System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), Terraria.Tile.invisibleBlock(), Terraria.Tile.invisibleWall(), Terraria.Utilities.Bits64.IsEmpty, Terraria.Main.tile, and System.value.