13using Microsoft.Xna.Framework.Graphics.PackedVector;
14using Microsoft.Xna.Framework.Input;
78 return (x & (x - 1)) == 0;
108 for (
int i = 0;
i <
args.Length;
i++)
110 if (
args[
i].Length == 0)
175 return 2f -
value * 2f;
182 float num = 1f / ((float)
floats.Length - 1f);
253 result2.InterceptionHappens =
true;
255 result2.InterceptionTime = 0f;
264 float num =
value.Length();
275 float c = (0f - num) * num;
295 result.InterceptionHappens =
true;
308 float num =
b *
b - 4f *
a * c;
359 return 4.5f + (float)(
Main.
time / 54000.0) * 15f;
361 return 19.5f + (float)(
Main.
time / 32400.0) * 9f;
411 for (
int i = 1;
i <
args.Length;
i++)
413 if (result.CompareTo(
args[
i]) < 0)
446 for (
int j = 0;
j < array2.Length - 1;
j++)
483 bool flag =
num4 == 0;
640 for (
int i = 0;
i <
inv.Length;
i++)
642 if (!
list.Contains(
i))
650 num += (long)
inv[
i].stack * 100
L;
653 num += (long)
inv[
i].stack * 10000
L;
656 num += (long)
inv[
i].stack * 1000000
L;
667 int[]
array =
new int[4];
669 long num2 = 1000000
L;
685 if (num >= 999999999)
698 for (
int i = 0;
i < num;
i++)
704 for (
int j = 0;
j < 10;
j++)
707 obj.position +=
new Vector2(5f);
720 .TrimStart(
'0',
' ') +
"%";
744 if (
match.Groups[1].Length != 0)
748 string name =
match.Groups[2].ToString();
782 UseShellExecute =
true,
783 CreateNoWindow =
true
795 byte[]
array =
new byte[str.Length * 2];
802 return (
float)
r.NextDouble();
807 return (
float)
r.NextDouble() * 2f - 1f;
812 return random.NextFloat() * (range.Maximum -
range.Minimum) +
range.Minimum;
837 return new Vector2((
float)
rect.X +
r.NextFloat() * (
float)
rect.Width, (
float)
rect.Y +
r.NextFloat() * (
float)
rect.Height);
861 return asset.Value.Width;
870 return asset.Value.Height;
885 rect.Height +=
ySize;
895 return tex.Value.Size();
909 origin.X = (float)
rect.Width - origin.
X;
913 origin.Y = (float)
rect.Height - origin.
Y;
943 return new Color(
bb.ReadByte(),
bb.ReadByte(),
bb.ReadByte());
948 return new Vector2(
bb.ReadSingle(),
bb.ReadSingle());
954 halfVector.PackedValue =
bb.ReadUInt32();
965 return new Vector2(
r.X +
r.Width,
r.Y +
r.Height / 2);
975 return new Vector2(
r.X +
r.Width / 2,
r.Y +
r.Height);
1000 return new Vector2(
r.X +
r.Width / 2,
r.Y +
r.Height / 2);
1014 if (point.
X >= (
float)
r.Left && point.
X <= (
float)
r.Right)
1016 if (point.
Y < (
float)
r.Top)
1018 return (
float)r.Top - point.
Y;
1020 return point.Y - (float)
r.Bottom;
1022 if (point.
Y >= (
float)
r.Top && point.
Y <= (
float)
r.Bottom)
1024 if (point.
X < (
float)
r.Left)
1026 return (
float)r.Left - point.
X;
1028 return point.X - (float)
r.Right;
1030 if (point.
X < (
float)
r.Left)
1032 if (point.
Y < (
float)
r.Top)
1038 if (point.
Y < (
float)
r.Top)
1048 if (result.
X < (
float)
r.Left)
1052 if (result.
X > (
float)
r.Right)
1056 if (result.
Y < (
float)
r.Top)
1060 if (result.
Y > (
float)
r.Bottom)
1062 result.Y =
r.Bottom;
1137 result.X += vector.X * num - vector.Y *
num2;
1138 result.Y += vector.X *
num2 + vector.Y * num;
1159 result.X += val.X * num - val.Y *
num2;
1160 result.Y += val.X *
num2 + val.Y * num;
1178 if (!
float.IsNaN(
vec.X))
1180 return float.IsNaN(
vec.Y);
1207 return new Vector2D((
double)p.
X, (
double)p.
Y);
1213 return new Vector2D((
double)p.
X, (
double)p.
Y);
1250 return new Point((
int)
vec.X >> 4, (
int)
vec.Y >> 4);
1257 return new Point((
int)
vec.X >> 4, (
int)
vec.Y >> 4);
1262 return new Point((
int)v.
X, (
int)v.
Y);
1269 return new Point((
int)v.
X, (
int)v.
Y);
1275 return new Vector2D((
double)v.
X, (
double)v.
Y);
1291 float num =
vector.LengthSquared();
1319 for (
int i = 0;
i <
array.Length;
i++)
1408 return (color.
R.ToString(
"X2") + color.
G.ToString(
"X2") + color.
B.ToString(
"X2")).ToLower();
1413 return (color.
R.ToString(
"X2") + color.
G.ToString(
"X2") + color.
B.ToString(
"X2") + color.
A.ToString(
"X2")).ToLower();
1505 for (
int i = 0;
i <
array.Length;
i++)
1522 return list.Distinct().ToList();
1528 foreach (T x
in arr)
1540 if (!
kb.IsKeyDown(Keys.LeftShift))
1542 return kb.IsKeyDown(Keys.RightShift);
1549 if (!
kb.IsKeyDown(Keys.LeftControl))
1551 return kb.IsKeyDown(Keys.RightControl);
1559 for (
int i = 0;
i <
array.Length;
i++)
1635 return (
int)(
seed >> 48 - bits);
1640 return (
seed * 25214903917
L + 11) & 0xFFFFFFFFFFFF
uL;
1661 while (num -
num2 + (
max - 1) < 0);
1699 double num = width / 2.0;
1709 return PlotLine(
point3.X,
point3.Y,
point4.X,
point4.Y, (
int x,
int y) =>
PlotLine(x +
lineMinOffset.X, y +
lineMinOffset.Y, x +
lineMaxOffset.X, y +
lineMaxOffset.Y,
plot, jump:
false));
1734 Point point = end.ToTileCoordinates();
1780 while (
list.Count > 0)
1820 return (
int)
Math.
Log(1.0 - random, 1.0 / (
double)
odds);
1838 return index < t.Length;
1861 for (
int i = 0;
i < 5;
i++)
1899 ChatManager.
DrawColorCodedStringWithShadow(sb,
value,
text, pos, color, 0f,
new Vector2(
anchorx,
anchory) *
vector,
new Vector2(scale), -1f, 1.5f);
1910 for (
int i = -1;
i < 2;
i++)
1912 for (
int j = -1;
j < 2;
j++)
1914 DynamicSpriteFontExtensionMethods.
DrawString(spriteBatch,
value,
text, pos +
new Vector2(
i,
j),
Color.
Black, 0f,
new Vector2(
anchorx,
anchory) *
value.MeasureString(
text), scale,
SpriteEffects.None, 0f);
1917 DynamicSpriteFontExtensionMethods.
DrawString(spriteBatch,
value,
text, pos, color, 0f,
new Vector2(
anchorx,
anchory) *
value.MeasureString(
text), scale,
SpriteEffects.None, 0f);
1918 return value.MeasureString(
text) * scale;
1933 if (c ==
default(
Color))
1935 c =
new Color(63, 65, 151, 255) * 0.785f;
1964 public static void DrawSplicedPanel(
SpriteBatch sb,
Texture2D texture,
int x,
int y,
int w,
int h,
int leftEnd,
int rightEnd,
int topEnd,
int bottomEnd,
Color c)
1998 spriteBatch.
Draw(texture,
new Vector2(position.
X + (
float)
edgeWidth, position.
Y),
new Rectangle(
edgeWidth +
edgeShove, 0, texture.
Width - (
edgeWidth +
edgeShove) * 2, texture.
Height), color, 0f,
Vector2.
Zero,
new Vector2((width - (
float)(
edgeWidth * 2)) / (
float)(texture.
Width - (
edgeWidth +
edgeShove) * 2), 1f),
SpriteEffects.None, 0f);
2014 float num = (end -
start).Length();
2015 float rotation =
vector2.ToRotation() - (float)
Math.
PI / 2f;
2027 while (
num2 + 1f < num)
2030 if (num -
num2 < (
float)frame.Height)
2033 frame.Height = (int)(num -
num2);
2055 float rotation =
vector.ToRotation();
2059 spriteBatch.
Draw(
TextureAssets.
BlackTile.Value,
vector2 - screenPosition,
null,
new Color(
new Vector4(
num3,
num3,
num3, 1f) * color.
ToVector4()), rotation,
Vector2.
Zero, 0.25f,
SpriteEffects.None, 0f);
2070 float rotation =
vector.ToRotation();
2071 float scale = width / 16f;
2075 spriteBatch.
Draw(
TextureAssets.
BlackTile.Value,
vector2 - screenPosition,
null,
Color.
Lerp(
colorStart,
colorEnd,
amount), rotation,
Vector2.
Zero, scale,
SpriteEffects.None, 0f);
2122 if (
float.IsNaN(
rot))
2140 num += (float)
Math.
PI * 2f;
2159 sb.
Draw(
TextureAssets.
Cursors[
cursorSlot].Value,
vector +
vector2 +
Vector2.
One,
null, color.MultiplyRGB(
new Color(0.2f, 0.2f, 0.2f, 0.5f)),
rot, origin, scale * 1.1f,
SpriteEffects.None, 0f);
void Draw(Texture2D texture, Vector2 position, Color color)
static float Lerp(float value1, float value2, float amount)
static float WrapAngle(float angle)
static float Clamp(float value, float min, float max)
static float Min(float value1, float value2)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
void Add(TKey key, TValue value)
virtual ? PropertyDescriptor Find(string name, bool ignoreCase)
static PropertyDescriptorCollection GetProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType)
static CultureInfo InvariantCulture
static DirectoryInfo CreateDirectory(string path)
static bool Exists([NotNullWhen(true)] string? path)
static double Cos(double d)
static byte Min(byte val1, byte val2)
static double Atan2(double y, double x)
static double Sqrt(double d)
static decimal Round(decimal d)
static double Log(double d)
static double Abs(double value)
static double Sin(double a)
static byte Max(byte val1, byte val2)
static RuntimeAssembly GetExecutingAssembly(ref StackCrawlMark stackMark)
static int NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX=0f, float SpeedY=0f, int Alpha=0, Color newColor=default(Color), float Scale=1f)
static Asset< DynamicSpriteFont > DeathText
static Asset< DynamicSpriteFont > MouseText
static Asset< Texture2D > SettingsPanel
static Asset< Texture2D > InventoryBack13
static Asset< Texture2D > BlackTile
static Asset< Texture2D >[] Cursors
static int NewGore(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
static Vector2 DrawThickCursor(bool smart=false)
static Vector2 screenPosition
static SpriteViewMatrix GameViewMatrix
static UnifiedRandom rand
static Vector2 DrawColorCodedStringWithShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth=-1f, float spread=2f)
static List< TextSnippet > ParseMessage(string text, Color baseColor)
static void ShowDirectoryCreationFailError(Exception exception, string folderPath)
virtual double NextDouble()
delegate void LaserLineFraming(int stage, Vector2 currentPosition, float distanceLeft, Rectangle lastFrame, out float distanceCovered, out Rectangle frame, out Vector2 origin, out Color color)
static void Swap< T >(ref T t1, ref T t2)
static Vector2D RotatedBy(this Vector2D spinningpoint, double radians, Vector2D center=default(Vector2D))
static Vector2 Vector2FromElipse(Vector2 angleVector, Vector2 elipseSizes)
static Vector2 ZW(this Vector4 vec)
static void DrawCursorSingle(SpriteBatch sb, Color color, float rot=float.NaN, float scale=1f, Vector2 manualPosition=default(Vector2), int cursorSlot=0, int specialMode=0)
static double Lerp(double value1, double value2, double amount)
static float Remap(float fromValue, float fromMin, float fromMax, float toMin, float toMax, bool clamped=true)
static Point16 ToTileCoordinates16(this Vector2D vec)
static Regex _substitutionRegex
static float NextFloat(this UnifiedRandom random, FloatRange range)
static Vector2 RotatedByRandom(this Vector2 spinninpoint, double maxRadians)
static Vector2 TopRight(this Rectangle r)
static Vector3 XZW(this Vector4 vec)
static int[] CoinsSplit(long count)
static bool WithinRange(this Vector2 Origin, Vector2 Target, float MaxRange)
static Vector2 DirectionTo(this Vector2 Origin, Vector2 Target)
static bool TryCreatingDirectory(string folderPath)
static Vector2 Center(this Rectangle r)
static bool IntersectsConeFastInaccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
static Vector2 RandomVector2(UnifiedRandom random, float min, float max)
static int ToInt(this bool value)
static List< int > GetTrueIndexes(params bool[][] arrays)
static Vector2 Size(this Texture2D tex)
static string ReadEmbeddedResource(string path)
static string FormatWith(string original, object obj)
static float WrappedLerp(float value1, float value2, float percent)
static void DrawSplicedPanel(SpriteBatch sb, Texture2D texture, int x, int y, int w, int h, int leftEnd, int rightEnd, int topEnd, int bottomEnd, Color c)
delegate bool TileActionAttempt(int x, int y)
static void WriteVector2(this BinaryWriter bb, Vector2 v)
static Vector2 rotateTowards(Vector2 currentPosition, Vector2 currentVelocity, Vector2 targetPosition, float maxChange)
static bool IsPowerOfTwo(int x)
static Rectangle Modified(this Rectangle r, int x, int y, int w, int h)
static void DrawInvBG(SpriteBatch sb, Rectangle R, Color c=default(Color))
static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Rectangle rect, Color color)
static bool PressingShift(this KeyboardState kb)
static Dictionary< DynamicSpriteFont, float[]> charLengths
static Color MultiplyRGB(this Color firstColor, Color secondColor)
static Vector2 NextVector2Circular(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight)
static Vector2D ToVector2D(this Point16 p)
static Vector2 NextVector2FromRectangle(this UnifiedRandom r, Rectangle rect)
static string[] WordwrapString(string text, DynamicSpriteFont font, int maxWidth, int maxLines, out int lineAmount)
static Vector2 ReadPackedVector2(this BinaryReader bb)
static int Count< T >(this T[] arr, T value)
static Vector2 NextVector2CircularEdge(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight)
static void DrawInvBG(SpriteBatch sb, float x, float y, float w, float h, Color c=default(Color))
static int RandomInt(ref ulong seed, int min, int max)
static Rectangle Frame(this Texture2D tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)
static Vector2 BottomLeft(this Rectangle r)
static Vector2 OriginFlip(this Rectangle rect, Vector2 origin, SpriteEffects effects)
static R[] MapArray< T, R >(T[] array, Func< T, R > mapper)
static Vector2 BottomRight(this Rectangle r)
static Vector2D RandomVector2D(UnifiedRandom random, double min, double max)
static void PoofOfSmoke(Vector2 position)
static int RandomInt(ref ulong seed, int max)
static double GetLerpValue(double from, double to, double t, bool clamped=false)
static float RandomFloat(ref ulong seed)
static bool deepCompare(this int[] firstArray, int[] secondArray)
static int RandomConsecutive(double random, int odds)
static Color ReadRGB(this BinaryReader bb)
static string[] ConvertMonoArgsToDotNet(string[] brokenArgs)
static float AngleFrom(this Vector2 Origin, Vector2 Target)
static Vector2 ToRotationVector2(this float f)
static Vector2 Left(this Rectangle r)
static float Distance(this Rectangle r, Vector2 point)
static ChaseResults GetChaseResults(Vector2 chaserPosition, float chaserSpeed, Vector2 runnerPosition, Vector2 runnerVelocity)
static void WriteRGB(this BinaryWriter bb, Color c)
static float NextFloatDirection(this UnifiedRandom r)
static void DrawBorderStringFourWay(SpriteBatch sb, DynamicSpriteFont font, string text, float x, float y, Color textColor, Color borderColor, Vector2 origin, float scale=1f)
static bool PlotTileLine(Vector2D start, Vector2D end, double width, TileActionAttempt plot)
static bool FloatIntersect(float r1StartX, float r1StartY, float r1Width, float r1Height, float r2StartX, float r2StartY, float r2Width, float r2Height)
static string Hex3(this Color color)
static bool PlotLine(int x0, int y0, int x1, int y1, TileActionAttempt plot, bool jump=true)
static T NextFromList< T >(this UnifiedRandom random, params T[] objs)
static float AngleTowards(this float curAngle, float targetAngle, float maxChange)
static Vector2 Round(Vector2 input)
static int RandomNext(ref ulong seed, int bits)
static bool PlotLine(Point p0, Point p1, TileActionAttempt plot, bool jump=true)
static void DrawInvBG(SpriteBatch sb, int x, int y, int w, int h, Color c=default(Color))
static T NextFromCollection< T >(this UnifiedRandom random, List< T > objs)
static float GetLerpValue(float from, float to, float t, bool clamped=false)
static bool DoesFitInCone(Vector2 point, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
static float Turn01ToCyclic010(float value)
static Rectangle OffsetSize(this Rectangle rect, int xSize, int ySize)
static Vector2 ClosestPointInRect(this Rectangle r, Vector2 point)
static long CoinsCombineStacks(out bool overFlowing, params long[] coinCounts)
static Vector2 TopLeft(this Rectangle r)
static float DistanceSQ(this Vector2 Origin, Vector2 Target)
static bool RectangleLineCollision(Vector2 rectTopLeft, Vector2 rectBottomRight, Vector2 lineStart, Vector2 lineEnd)
static Vector2 Bottom(this Rectangle r)
static Vector2 Size(this Asset< Texture2D > tex)
static double UnclampedSmoothStep(double min, double max, double x)
static Vector2 Floor(this Vector2 vec)
static Vector2 DirectionFrom(this Vector2 Origin, Vector2 Target)
static Vector2 DrawBorderString(SpriteBatch sb, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1)
static float SmoothStep(float min, float max, float x)
static double SmoothStep(double min, double max, double x)
static Vector2 RotatedBy(this Vector2 spinningpoint, double radians, Vector2 center=default(Vector2))
static Dictionary< string, string > ParseArguements(string[] args)
static bool IndexInRange< T >(this T[] t, int index)
static void DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
static float Distance(this Vector2 Origin, Vector2 Target)
static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color)
static float NextFloat(this UnifiedRandom r)
const ulong RANDOM_MULTIPLIER
static void DrawRectangle(SpriteBatch sb, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
static Vector2 NextVector2Square(this UnifiedRandom r, float min, float max)
static Rectangle Frame(this Asset< Texture2D > tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)
static bool PlotTileArea(int x, int y, TileActionAttempt plot)
static bool PlotTileLine(Vector2 start, Vector2 end, float width, TileActionAttempt plot)
static int ModulusPositive(this int myInteger, int modulusNumber)
static Vector2 NextVector2Unit(this UnifiedRandom r, float startRotation=0f, float rotationRange=(float) Math.PI *2f)
static void DrawLaser(SpriteBatch sb, Texture2D tex, Vector2 start, Vector2 end, Vector2 scale, LaserLineFraming framing)
static bool HasNaNs(this Vector2 vec)
static int Height(this Asset< Texture2D > asset)
static bool PlotTileTale(Vector2D start, Vector2D end, double width, TileActionAttempt plot)
static Vector2 Right(this Rectangle r)
static Point16 ToTileCoordinates16(this Vector2 vec)
static Vector2 SafeNormalize(this Vector2 v, Vector2 defaultValue)
static void DrawSettingsPanel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
static Color MultiplyRGBA(this Color firstColor, Color secondColor)
static Vector2 ReadVector2(this BinaryReader bb)
static float AngleTo(this Vector2 Origin, Vector2 Target)
static T Max< T >(params T[] args)
static Point ToTileCoordinates(this Vector2D vec)
static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
static void DrawPanel(Texture2D texture, int edgeWidth, int edgeShove, SpriteBatch spriteBatch, Vector2 position, float width, Color color)
static Vector2 ToVector2(this Point p)
static Color ColorLerp_BlackToWhite(float percent)
static Vector2D ToVector2D(this Point p)
static void DrawRect(SpriteBatch spriteBatch, Vector2 topLeft, Vector2 topRight, Vector2 bottomRight, Vector2 bottomLeft, Color color)
static Vector2 FactorAcceleration(Vector2 currentVelocity, float timeToInterception, Vector2 descendOfProjectile, int framesOfLenience)
static byte[] ToByteArray(this string str)
static int Width(this Asset< Texture2D > asset)
static T Clamp< T >(T value, T min, T max)
static void TrimTextIfNeeded(ref string text, DynamicSpriteFont font, float scale, float maxWidth)
static Vector2 ToWorldCoordinates(this Point p, float autoAddX=8f, float autoAddY=8f)
static string PrettifyPercentDisplay(float percent, string originalFormat)
static Vector3 YZW(this Vector4 vec)
delegate Color ColorLerpMethod(float percent)
static float AngleLerp(this float curAngle, float targetAngle, float amount)
static Vector2 GetDayTimeAsDirectionIn24HClock()
static List< int > GetTrueIndexes(this bool[] array)
static Vector2 ToWorldCoordinates(this Point16 p, float autoAddX=8f, float autoAddY=8f)
static Vector2 ClosestPointOnLine(this Vector2 P, Vector2 A, Vector2 B)
static void OpenFolder(string folderPath)
static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Point start, Point end, Color color)
static Vector2 ToScreenPosition(this Vector2 worldPosition)
static float GetDayTimeAs24FloatStartingFromMidnight()
static T SelectRandom< T >(UnifiedRandom random, params T[] choices)
static float PingPongFrom01To010(float value)
static Vector2 Top(this Rectangle r)
static bool PressingControl(this KeyboardState kb)
static Point ToPoint(this Vector2D v)
static void WritePackedVector2(this BinaryWriter bb, Vector2 v)
static string Hex4(this Color color)
static void ClampWithinWorld(ref int minX, ref int minY, ref int maxX, ref int maxY, bool lastValuesInclusiveToIteration=false, int fluffX=0, int fluffY=0)
static Vector2 GetDayTimeAsDirectionIn24HClock(float timeFrom0To24)
static ulong RandomNextSeed(ulong seed)
static void DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color)
static bool IntersectsConeSlowMoreAccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
static List< List< TextSnippet > > WordwrapStringSmart(string text, Color c, DynamicSpriteFont font, int maxWidth, int maxLines)
static long CoinsCount(out bool overFlowing, Item[] inv, params int[] ignoreSlots)
static bool Between(this Vector2 vec, Vector2 minimum, Vector2 maximum)
static int Next(this UnifiedRandom random, IntRange range)
static Vector2 DrawBorderStringBig(SpriteBatch spriteBatch, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1)
static Vector2 XY(this Vector4 vec)
static Vector2 RotateRandom(this Vector2 spinninpoint, double maxRadians)
static Point ToTileCoordinates(this Vector2 vec)
static float MultiLerp(float percent, params float[] floats)
static Vector2 ToVector2(this Point16 p)
static Vector2 Size(this Rectangle r)
static bool SolveQuadratic(float a, float b, float c, out float result1, out float result2)
static float LineRectangleDistance(Rectangle rect, Vector2 lineStart, Vector2 lineEnd)
static Point ToPoint(this Vector2 v)
static Rectangle CenteredRectangle(Vector2 center, Vector2 size)
static float ToRotation(this Vector2 v)
static float UnclampedSmoothStep(float min, float max, float x)
static bool PlotLine(Point16 p0, Point16 p1, TileActionAttempt plot, bool jump=true)
static int ToDirectionInt(this bool value)
static Vector2D ToVector2D(this Vector2 v)
static Vector2 MoveTowards(this Vector2 currentPosition, Vector2 targetPosition, float maxAmountAllowedToMove)
static void DrawSettings2Panel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
static bool InWorld(int x, int y, int fluff=0)
static Color Lerp(Color value1, Color value2, float amount)
static float Dot(Vector2 value1, Vector2 value2)
static Vector2 Transform(Vector2 position, Matrix matrix)
static float DistanceSquared(Vector2 value1, Vector2 value2)
static float Distance(Vector2 value1, Vector2 value2)
Vector2 InterceptionPosition