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

◆ DrawTiles_GetLightOverride()

Color Terraria.GameContent.Drawing.TileDrawing.DrawTiles_GetLightOverride ( int j,
int i,
Tile tileCache,
ushort typeCache,
short tileFrameX,
short tileFrameY,
Color tileLight )
inlineprivate

Definition at line 5659 of file TileDrawing.cs.

5660 {
5661 if (tileCache.fullbrightBlock())
5662 {
5663 return Color.White;
5664 }
5665 switch (typeCache)
5666 {
5667 case 541:
5668 case 631:
5669 return Color.White;
5670 case 19:
5671 if (tileFrameY / 18 == 48)
5672 {
5673 return Color.White;
5674 }
5675 break;
5676 case 83:
5677 {
5678 int num = tileFrameX / 18;
5679 if (!IsAlchemyPlantHarvestable(num))
5680 {
5681 break;
5682 }
5683 if (num == 5)
5684 {
5685 tileLight.A = (byte)(Main.mouseTextColor / 2);
5686 tileLight.G = Main.mouseTextColor;
5687 tileLight.B = Main.mouseTextColor;
5688 }
5689 if (num == 6)
5690 {
5691 byte b6 = (byte)((Main.mouseTextColor + tileLight.G * 2) / 3);
5692 byte b7 = (byte)((Main.mouseTextColor + tileLight.B * 2) / 3);
5693 if (b6 > tileLight.G)
5694 {
5695 tileLight.G = b6;
5696 }
5697 if (b7 > tileLight.B)
5698 {
5699 tileLight.B = b7;
5700 }
5701 }
5702 break;
5703 }
5704 case 61:
5705 if (tileFrameX == 144)
5706 {
5707 byte b2 = (tileLight.B = (byte)(245f - (float)(int)Main.mouseTextColor * 1.5f));
5708 byte b4 = (tileLight.G = b2);
5709 byte a = (tileLight.R = b4);
5710 tileLight.A = a;
5711 }
5712 break;
5713 }
5714 return tileLight;
5715 }

References Microsoft.Xna.Framework.Color.B, Terraria.Tile.fullbrightBlock(), Microsoft.Xna.Framework.Color.G, Terraria.GameContent.Drawing.TileDrawing.IsAlchemyPlantHarvestable(), Terraria.Main.mouseTextColor, and Microsoft.Xna.Framework.Color.White.

Referenced by Terraria.GameContent.Drawing.TileDrawing.DrawAnyDirectionalGrass(), Terraria.GameContent.Drawing.TileDrawing.DrawGrass(), Terraria.GameContent.Drawing.TileDrawing.DrawMultiTileGrassInWind(), Terraria.GameContent.Drawing.TileDrawing.DrawMultiTileVinesInWind(), and Terraria.GameContent.Drawing.TileDrawing.DrawSingleTile().