diff --git a/src/Static/Assets.bf b/src/Static/Assets.bf index f6f8ee2..b08ecdd 100644 --- a/src/Static/Assets.bf +++ b/src/Static/Assets.bf @@ -14,6 +14,18 @@ namespace Strawberry static public readonly String Root = "assets/"; #endif + static public String GetDir(String outStr, params String[] subDirectories) + { + outStr.Append(Root); + for (int i = 0; i < subDirectories.Count; i++) + { + outStr.Append(subDirectories[i]); + if (i < subDirectories.Count - 1) + outStr.Append(Path.DirectorySeparatorChar); + } + return outStr; + } + static public void LoadAll() { Textures = new Dictionary(); diff --git a/src/Struct/Point.bf b/src/Struct/Point.bf index 71ebbe0..3f3abc9 100644 --- a/src/Struct/Point.bf +++ b/src/Struct/Point.bf @@ -2,7 +2,7 @@ using System; namespace Strawberry { - public struct Point + public struct Point : IHashable { static public readonly Point Right = .(1, 0); static public readonly Point Left = .(-1, 0); @@ -104,5 +104,10 @@ namespace Strawberry { return .(a.X * (int)f, a.Y); } + + public int GetHashCode() + { + return X + 9973 * Y; + } } }