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

◆ PlotTileTale()

static bool Terraria.Utils.PlotTileTale ( Vector2D start,
Vector2D end,
double width,
TileActionAttempt plot )
inlinestatic

Definition at line 2208 of file Utils.cs.

2209 {
2210 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
2211 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
2212 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
2213 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
2214 //IL_0096: Unknown result type (might be due to invalid IL or missing references)
2215 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
2216 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
2217 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
2218 double halfWidth = width / 2.0;
2219 Vector2D vector2D = end - start;
2220 Vector2D vector2D2 = vector2D / vector2D.Length();
2221 Vector2D perpOffset = new Vector2D(0.0 - vector2D2.Y, vector2D2.X);
2222 Point pointStart = start.ToTileCoordinates();
2223 Point point = end.ToTileCoordinates();
2224 int length = 0;
2225 PlotLine(pointStart.X, pointStart.Y, point.X, point.Y, delegate
2226 {
2227 length++;
2228 return true;
2229 });
2230 length--;
2231 int curLength = 0;
2232 return PlotLine(pointStart.X, pointStart.Y, point.X, point.Y, delegate(int x, int y)
2233 {
2234 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
2235 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
2236 //IL_0076: Unknown result type (might be due to invalid IL or missing references)
2237 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
2238 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
2239 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
2240 //IL_00a9: Unknown result type (might be due to invalid IL or missing references)
2241 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
2242 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
2243 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
2244 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)
2245 //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
2246 double num = 1.0 - (double)curLength / (double)length;
2247 curLength++;
2250 Point val3 = default(Point);
2251 ((Point)(ref val3))._002Ector(val.X - pointStart.X, val.Y - pointStart.Y);
2252 Point val4 = default(Point);
2253 ((Point)(ref val4))._002Ector(val2.X - pointStart.X, val2.Y - pointStart.Y);
2254 return PlotLine(x + val3.X, y + val3.Y, x + val4.X, y + val4.Y, plot, jump: false);
2255 });
2256 }
static Point ToTileCoordinates(this Vector2 vec)
Definition Utils.cs:1629
static bool PlotLine(Point16 p0, Point16 p1, TileActionAttempt plot, bool jump=true)
Definition Utils.cs:2054

References Terraria.Utils.PlotLine(), and Terraria.Utils.ToTileCoordinates().

Referenced by Terraria.WorldBuilding.Shapes.Tail.Perform().

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