181 int num = rectangle.Height * 2 + 2;
183 for (
int i = rectangle.
X; i < rectangle.X + rectangle.
Width; i++)
185 for (
int j = rectangle.
Y; j < rectangle.Y + rectangle.
Height; j++)
192 ptr2->
LiquidLevel = (float)(
int)tile.liquid / 255f;
197 ptr2->
HasWall = tile.wall != 0;
209 for (
int k = 2; k < rectangle.Width - 2; k++)
211 for (
int l = 2; l < rectangle.Height - 2; l++)
226 num2 = liquidCache.LiquidLevel + liquidCache2.
LiquidLevel;
247 for (
int m = 0; m < rectangle.
Width; m++)
249 for (
int n = 0; n < rectangle.Height - 10; n++)
260 if (ptr2[num5].IsSolid)
284 for (
int num6 = 2; num6 < rectangle.Width - 2; num6++)
286 for (
int num7 = 2; num7 < rectangle.Height - 2; num7++)
308 num10 += liquidCache2.VisibleLiquidLevel * (1f - visibleLiquidLevel);
312 num11 -= liquidCache.VisibleLiquidLevel * (1f - visibleLiquidLevel);
316 num8 += liquidCache4.VisibleLiquidLevel * (1f - visibleLiquidLevel);
320 num9 -= liquidCache3.VisibleLiquidLevel * (1f - visibleLiquidLevel);
327 ptr2->
HasTopEdge = (!liquidCache.HasVisibleLiquid && !liquidCache.
IsSolid) || num10 != 0f;
329 ptr2->
HasLeftEdge = (!liquidCache3.HasVisibleLiquid && !liquidCache3.
IsSolid) || num8 != 0f;
330 ptr2->
HasRightEdge = (!liquidCache4.HasVisibleLiquid && !liquidCache4.
IsSolid) || num9 != 1f;
374 for (
int num12 = 2; num12 < rectangle.Width - 2; num12++)
376 for (
int num13 = 2; num13 < rectangle.Height - 2; num13++)
417 for (
int num14 = 2; num14 < rectangle.Width - 2; num14++)
419 for (
int num15 = 2; num15 < rectangle.Height - 2; num15++)
460 for (
int num16 = 2; num16 < rectangle.Width - 2; num16++)
462 for (
int num17 = 2; num17 < rectangle.Height - 2; num17++)
504 for (
int num18 = 2; num18 < rectangle.Width - 2; num18++)
506 for (
int num19 = 2; num19 < rectangle.Height - 2; num19++)
526 byte g = (ptr6->
R = (byte)(b >> 1));
541 byte g2 = (ptr6->
R = (byte)(b3 >> 1));
555 for (
int num25 = rectangle.
X; num25 < rectangle.X + rectangle.
Width; num25++)
557 for (
int num26 = rectangle.
Y; num26 < rectangle.Y + rectangle.
Height; num26++)
587 for (
int num28 = 2; num28 < rectangle.Width - 2; num28++)
589 for (
int num29 = 2; num29 < rectangle.Height - 2; num29++)
612 if (this.WaveFilters !=
null)
625 for (
int i = drawArea.
X; i < drawArea.X + drawArea.
Width; i++)
627 for (
int j = drawArea.
Y; j < drawArea.Y + drawArea.
Height; j++)
634 sourceRectangle.Y = 1280;
642 int num2 = ptr2->
Type;
655 vertices.BottomLeftColor *= num;
656 vertices.BottomRightColor *= num;
657 vertices.TopLeftColor *= num;
658 vertices.TopRightColor *= num;
677 for (
int i = 0; i < num; i++)
686 sourceRectangle.Y = 1280;
693 float val = ptr2->
Opacity * (isBackgroundDraw ? 1f : 0.75f);
696 int num3 = ptr2->
X + drawArea.X - 2;
697 int num4 = ptr2->
Y + drawArea.Y - 2;
703 bool flag = sourceRectangle.X != 16 || sourceRectangle.Y % 80 != 48;
704 if (flag || (num3 + num4) % 2 == 0)
706 sourceRectangle.X += 48;
736 colors.BottomLeftColor *= opacity;
737 colors.BottomRightColor *= opacity;
738 colors.TopLeftColor *= opacity;
739 colors.TopRightColor *= opacity;