diff --git a/SVSim.BattleEngine/Engine/BMGlyph.cs b/SVSim.BattleEngine/Engine/BMGlyph.cs index 4852f3d8..5c31a2da 100644 --- a/SVSim.BattleEngine/Engine/BMGlyph.cs +++ b/SVSim.BattleEngine/Engine/BMGlyph.cs @@ -18,28 +18,8 @@ public class BMGlyph public int offsetY; - public int advance; - - public int channel; - public List kerning; - public int GetKerning(int previousChar) - { - if (kerning != null && previousChar != 0) - { - int i = 0; - for (int count = kerning.Count; i < count; i += 2) - { - if (kerning[i] == previousChar) - { - return kerning[i + 1]; - } - } - } - return 0; - } - public void Trim(int xMin, int yMin, int xMax, int yMax) { int num = x + width; diff --git a/SVSim.BattleEngine/Engine/Global.cs b/SVSim.BattleEngine/Engine/Global.cs index 6c15516a..fe7ca78c 100644 --- a/SVSim.BattleEngine/Engine/Global.cs +++ b/SVSim.BattleEngine/Engine/Global.cs @@ -509,10 +509,4 @@ public static class Global string textLanguage = CustomPreference.GetTextLanguage(); return AlphabetLanguageNames.Contains(textLanguage); } - - public static bool IsWordBreakLanguage() - { - string textLanguage = CustomPreference.GetTextLanguage(); - return WordBreakLanguageNames.Contains(textLanguage); - } } diff --git a/SVSim.BattleEngine/Engine/NGUIMath.cs b/SVSim.BattleEngine/Engine/NGUIMath.cs index 5df7d93d..8c3ce0ed 100644 --- a/SVSim.BattleEngine/Engine/NGUIMath.cs +++ b/SVSim.BattleEngine/Engine/NGUIMath.cs @@ -78,28 +78,6 @@ public static class NGUIMath } } - [DebuggerHidden] - [DebuggerStepThrough] - public static string DecimalToHex24(int num) - { - num &= 0xFFFFFF; - return num.ToString("X6"); - } - - [DebuggerHidden] - [DebuggerStepThrough] - public static string DecimalToHex32(int num) - { - return num.ToString("X8"); - } - - [DebuggerHidden] - [DebuggerStepThrough] - public static int ColorToInt(Color c) - { - return 0 | (Mathf.RoundToInt(c.r * 255f) << 24) | (Mathf.RoundToInt(c.g * 255f) << 16) | (Mathf.RoundToInt(c.b * 255f) << 8) | Mathf.RoundToInt(c.a * 255f); - } - public static Rect ConvertToTexCoords(Rect rect, int width, int height) { Rect result = rect; diff --git a/SVSim.BattleEngine/Engine/NGUIText.cs b/SVSim.BattleEngine/Engine/NGUIText.cs index f0370ff6..df74d667 100644 --- a/SVSim.BattleEngine/Engine/NGUIText.cs +++ b/SVSim.BattleEngine/Engine/NGUIText.cs @@ -20,14 +20,12 @@ public static class NGUIText public Vector2 u2; public Vector2 u3; public float advance; - public bool rotated; public int channel; } // Static fields — defaults matching original initializers public static UIFont bitmapFont; public static UnityEngine.Font dynamicFont; - public static GlyphInfo glyph = new GlyphInfo(); public static int fontSize = 16; public static float fontScale = 1f; public static float pixelDensity = 1f; @@ -50,7 +48,6 @@ public static class NGUIText public static int finalSize = 0; public static float finalSpacingX = 0f; public static float finalLineHeight = 0f; - public static float baseline = 0f; public static bool useSymbols = false; // Static methods — all no-ops or default returns @@ -58,20 +55,15 @@ public static class NGUIText public static void Update(bool request, UIWidget.Pivot piv) { } public static void Prepare(string text) { } public static BMSymbol GetSymbol(string text, int index, int textLength) => null; - public static float GetGlyphWidth(int ch, int prev) => 0f; public static GlyphInfo GetGlyph(int ch, int prev) => null; public static Color ParseColor24(string text, int offset) => Color.white; public static Color ParseColor32(string text, int offset) => Color.white; - public static string EncodeColor(Color c) => ""; public static string EncodeColor24(Color c) => ""; public static string EncodeColor32(Color c) => ""; - public static bool ParseSymbol(string text, ref int index) => false; public static bool IsHex(char ch) => false; - public static string StripSymbols(string text) => text; public static void Align(BetterList verts, int indexOffset, float printedWidth, int elements = 4) { } public static int GetExactCharacterIndex(BetterList verts, BetterList indices, Vector2 pos) => 0; public static int GetApproximateCharacterIndex(BetterList verts, BetterList indices, Vector2 pos) => 0; - public static void EndLine(ref StringBuilder s) { } public static Vector2 CalculatePrintedSize(string text) => Vector2.zero; public static int CalculateOffsetToFit(string text) => 0; public static bool WrapText(string text, out string finalText, bool wrapLineColors = false) { finalText = text; return false; } diff --git a/SVSim.BattleEngine/Engine/UIFont.cs b/SVSim.BattleEngine/Engine/UIFont.cs index 697be214..db5e41c2 100644 --- a/SVSim.BattleEngine/Engine/UIFont.cs +++ b/SVSim.BattleEngine/Engine/UIFont.cs @@ -610,37 +610,4 @@ public class UIFont : MonoBehaviour } } } - - public BMSymbol MatchSymbol(string text, int offset, int textLength) - { - int count = mSymbols.Count; - if (count == 0) - { - return null; - } - textLength -= offset; - for (int i = 0; i < count; i++) - { - BMSymbol bMSymbol = mSymbols[i]; - int length = bMSymbol.length; - if (length == 0 || textLength < length) - { - continue; - } - bool flag = true; - for (int j = 0; j < length; j++) - { - if (text[offset + j] != bMSymbol.sequence[j]) - { - flag = false; - break; - } - } - if (flag && bMSymbol.Validate(atlas)) - { - return bMSymbol; - } - } - return null; - } } diff --git a/SVSim.BattleEngine/Engine/Wizard/RubyText.cs b/SVSim.BattleEngine/Engine/Wizard/RubyText.cs index 201b8de8..b949e091 100644 --- a/SVSim.BattleEngine/Engine/Wizard/RubyText.cs +++ b/SVSim.BattleEngine/Engine/Wizard/RubyText.cs @@ -31,14 +31,6 @@ public static class RubyText return true; } - public static bool ParseSymbol(string text, ref int index, BetterList colors, bool premultiply, ref int sub, ref bool bold, ref bool italic, ref bool underline, ref bool strike, ref bool ignoreColor) - { - float rubyTotalAdvanceRaw = 0f; - float charWithRubyTotalAdvance = 0f; - bool isDot = false; - return ParseSymbol(text, ref index, colors, premultiply, ref sub, ref bold, ref italic, ref underline, ref strike, ref ignoreColor, ref rubyTotalAdvanceRaw, ref charWithRubyTotalAdvance, isRuby: false, ref isDot); - } - private static bool ParseSymbol(string text, ref int index, BetterList colors, bool premultiply, ref int sub, ref bool bold, ref bool italic, ref bool underline, ref bool strike, ref bool ignoreColor, ref float rubyTotalAdvanceRaw, ref float charWithRubyTotalAdvance, bool isRuby, ref bool isDot) { int length = text.Length; diff --git a/SVSim.BattleEngine/Shim/UnityEngine/UnityShimExt.cs b/SVSim.BattleEngine/Shim/UnityEngine/UnityShimExt.cs index bf86c44a..573c4506 100644 --- a/SVSim.BattleEngine/Shim/UnityEngine/UnityShimExt.cs +++ b/SVSim.BattleEngine/Shim/UnityEngine/UnityShimExt.cs @@ -100,9 +100,6 @@ namespace UnityEngine public partial struct CharacterInfo { - public int advance; - public int minX, maxX, minY, maxY; - public Vector2 uvBottomLeft, uvBottomRight, uvTopLeft, uvTopRight; } public partial class Font @@ -110,8 +107,6 @@ namespace UnityEngine public string[] fontNames { get; set; } public Material material { get; set; } public static event Action textureRebuilt; - public bool GetCharacterInfo(char ch, out CharacterInfo info, int size, FontStyle style) - { info = default; return false; } public void RequestCharactersInTexture(string characters, int size, FontStyle style) { } }