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

◆ SetDrawPositions()

static void Terraria.ModLoader.TileLoader.SetDrawPositions ( int i,
int j,
ref int width,
ref int offsetY,
ref int height,
ref short tileFrameX,
ref short tileFrameY )
inlinestatic

Definition at line 839 of file TileLoader.cs.

840 {
841 Tile tile = Main.tile[i, j];
842 if (tile.type < TileID.Count)
843 {
844 return;
845 }
847 if (tileData != null)
848 {
849 int partY = 0;
850 for (int remainingFrameY = tile.frameY % tileData.CoordinateFullHeight; partY < tileData.Height && remainingFrameY - tileData.CoordinateHeights[partY] + tileData.CoordinatePadding >= 0; partY++)
851 {
852 remainingFrameY -= tileData.CoordinateHeights[partY] + tileData.CoordinatePadding;
853 }
854 width = tileData.CoordinateWidth;
855 offsetY = tileData.DrawYOffset;
856 height = tileData.CoordinateHeights[partY];
857 }
858 GetTile(tile.type).SetDrawPositions(i, j, ref width, ref offsetY, ref height, ref tileFrameX, ref tileFrameY);
859 }
static readonly ushort Count
Definition TileID.cs:1928
static ModTile GetTile(int type)
Gets the ModTile instance with the given type. If no ModTile with the given type exists,...
static TileObjectData GetTileData(int type, int style, int alternate=0)

References Terraria.ID.TileID.Count, Terraria.Tile.frameY, Terraria.ModLoader.TileLoader.GetTile(), Terraria.ObjectData.TileObjectData.GetTileData(), Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.GameContent.Drawing.TileDrawing.GetTileDrawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: