Moved interface to BaseGlyphSet
This commit is contained in:
parent
f26163e405
commit
7fdb522e68
|
@ -53,14 +53,14 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
|
|||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber10(BaseGlyphSet glyphSet) {
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber10(BȍőnRangTelNul(), BãßInstances().length);
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber10(BȍőnRangTelNul(), BãßInstances().length - 1);
|
||||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber16(BaseGlyphSet glyphSet) {
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber16(BȍőnRangTelNul(), BãßInstances().length);
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber16(BȍőnRangTelNul(), BãßInstances().length - 1);
|
||||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber36(BaseGlyphSet glyphSet) {
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber36(BȍőnRangTelNul(), BãßInstances().length);
|
||||
default String BȍőnPrintGlyphSetNumber27(BaseGlyphSet glyphSet) {
|
||||
return glyphSet.BȍőnPrintGlyphSetNumber27(BȍőnRangTelNul(), BãßInstances().length - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,29 @@
|
|||
package love.distributedrebirth.numberxd.glyph;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnConstantsʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumSetᴶᴹˣ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.T10PartDecimal;
|
||||
import love.distributedrebirth.numberxd.base2t.part.T16PartHex;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
@BãßBȍőnClassInfoʸᴰ(name = "BaseGlyphSet", purpose = "The encoded base scripts.")
|
||||
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
|
||||
public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
||||
public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ<BaseGlyphSet,BãßBȍőnGlyphSetKeyʸᴰ> {
|
||||
|
||||
LATIN_BASIC(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(Integer.toString(x.BȍőnRangTelNul())))),
|
||||
new BaseGlyphSetNumber(v -> T16PartHex.PART_1.BãßVoorElk(x -> v.add(x.BȍőnAlt1Value()))),
|
||||
new BaseGlyphSetNumber("1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R")),
|
||||
LATIN_DTMF(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnChinaValue()))).withSeperator(BãßBȍőnConstantsʸᴰ.STR_SPACE),
|
||||
new BaseGlyphSetNumber("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D"),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber36()),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber27()),
|
||||
LATIN_TOP(new BaseGlyphSetNumber("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"),
|
||||
new BaseGlyphSetNumber("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ"),
|
||||
new BaseGlyphSetNumber("¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ","ᴳ","ᴴ","ᴵ","ᴶ","ᴷ","ᴸ","ᴹ","ᴺ","ᴼ","ᴾ","Q","ᴿ")),
|
||||
|
@ -28,23 +32,23 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
|||
new BaseGlyphSetNumber("₁","₂","₃","₄","₅","₆","₇","₈","₉","ₐ","₆","꜀","ₔ","ₑ","բ","G","ₕ","ᵢ","ⱼ","ₖ","ₗ","ₘ","ₙ","ₒ","ₚ","Q","ᵣ")),
|
||||
LATIN_TOPHEX(LATIN_BASIC.BȍőnGlyphSetNumber10(),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber36()),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber27()),
|
||||
|
||||
TONE_SCRIPT(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnDialTone()))),
|
||||
new BaseGlyphSetNumber(v -> T16PartHex.PART_1.BãßVoorElk(x -> v.add(x.BȍőnDialTone()))),
|
||||
new BaseGlyphSetNumber("꜊꜈","꜊꜉","꜊꜋","꜊꜌","꜊꜍","꜊꜎","꜊꜏","꜊꜐","꜊꜑","˧˥","˧˦","˧˨","˧˩","˧꜒","˧꜓","˧꜔","˧꜕","˧꜖","꜏˥","꜏˦","꜏˧","꜏˨","꜏˩","꜏꜍","꜏꜎","꜏꜐","꜏꜑")),
|
||||
DIPAVALI_LRPATH_TOPHEX(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnAlt1Value()))),
|
||||
new BaseGlyphSetNumber("˧˥˩","˧˩˥","˧˥˦","˧˩˨","˧˦˦","˧˨˨","˧˥˥","˧˩˩","˥˩˧","˩˥˧","˥˦˧","˩˨˧","˦˦˧","˨˨˧","˥˥˧","˩˩˧").withAltGlyphSet(BaseGlyphSet.LATIN_TOP),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber27()),
|
||||
DIPAVALI_LRPATH_SUBHEX(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnAlt1Value()))),
|
||||
new BaseGlyphSetNumber("˧˥˩","˧˩˥","˧˥˦","˧˩˨","˧˦˦","˧˨˨","˧˥˥","˧˩˩","˥˩˧","˩˥˧","˥˦˧","˩˨˧","˦˦˧","˨˨˧","˥˥˧","˩˩˧").withAltGlyphSet(BaseGlyphSet.LATIN_SUB),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber27()),
|
||||
DIPAVALI_RLPATH_TOPHEX(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnAlt2Value()))),
|
||||
new BaseGlyphSetNumber("꜔꜒꜖","꜔꜖꜒","꜔꜒꜓","꜔꜖꜕","꜔꜓꜓","꜔꜕꜕","꜔꜒꜒","꜔꜖꜖","꜒꜖꜔","꜖꜒꜔","꜒꜓꜔","꜖꜕꜔","꜓꜓꜔","꜕꜕꜔","꜒꜒꜔","꜖꜖꜔").withAltGlyphSet(BaseGlyphSet.LATIN_TOP),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber27()),
|
||||
DIPAVALI_RLPATH_SUBHEX(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnAlt2Value()))),
|
||||
new BaseGlyphSetNumber("꜔꜒꜖","꜔꜖꜒","꜔꜒꜓","꜔꜖꜕","꜔꜓꜓","꜔꜕꜕","꜔꜒꜒","꜔꜖꜖","꜒꜖꜔","꜖꜒꜔","꜒꜓꜔","꜖꜕꜔","꜓꜓꜔","꜕꜕꜔","꜒꜒꜔","꜖꜖꜔").withAltGlyphSet(BaseGlyphSet.LATIN_SUB),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
||||
TONE_SCRIPT.BȍőnGlyphSetNumber27()),
|
||||
|
||||
GREEK(new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
|
||||
new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"),
|
||||
|
@ -61,13 +65,13 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
|||
new BaseGlyphSetNumber("ᚠ","ᚢ","ᚦ","ᚨ","ᚱ","ᚲ","ᚷ","ᚹ","ᚺ","ᚾ","ᛁ","ᛃ","ᛇ","ᛈ","ᛉ","ᛊ","ᛏ","ᛒ","ᛖ","ᛗ","ᛚ","ᛜ","ᛟ","ᛞ","ᚡ","ᚤ","ᚧ")),
|
||||
RUNIC_TOPHEX(RUNIC.BȍőnGlyphSetNumber10(),
|
||||
RUNIC.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
||||
RUNIC.BȍőnGlyphSetNumber36()),
|
||||
RUNIC.BȍőnGlyphSetNumber27()),
|
||||
KOREAN(new BaseGlyphSetNumber("영","일","이","삼","사","오","육","칠","팔","구"),
|
||||
new BaseGlyphSetNumber("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ"),
|
||||
new BaseGlyphSetNumber("ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ","ㄵ","ㄶ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ")),
|
||||
KOREAN_TOPHEX(KOREAN.BȍőnGlyphSetNumber10(),
|
||||
KOREAN.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
||||
KOREAN.BȍőnGlyphSetNumber36()),
|
||||
KOREAN.BȍőnGlyphSetNumber27()),
|
||||
|
||||
CHINA(
|
||||
new BaseGlyphSetNumber("零","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
|
||||
|
@ -85,12 +89,17 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
|||
new BaseGlyphSetNumber("А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ","Ѻ","П","Ч","Р","С","Т","Ѵ","Ф","Х","Ѱ","Ѿ","Ц")),
|
||||
ARABIC(new BaseGlyphSetNumber("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
||||
new BaseGlyphSetNumber("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")),
|
||||
new BaseGlyphSetNumber("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ"),
|
||||
true),
|
||||
HEBREW(new BaseGlyphSetNumber("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע","חֲמִשָּׁה","שֵׁשׁ","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה").withSeperator(BãßBȍőnConstantsʸᴰ.STR_SPACE),
|
||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
||||
new BaseGlyphSetNumber("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")),
|
||||
new BaseGlyphSetNumber("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ"),
|
||||
true),
|
||||
;
|
||||
|
||||
private final GuageCounterᴶᴹˣ printsGlyphSetNumber10;
|
||||
private final GuageCounterᴶᴹˣ printsGlyphSetNumber16;
|
||||
private final GuageCounterᴶᴹˣ printsGlyphSetNumber27;
|
||||
private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnGlyphSetKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
|
||||
public BãßBȍőnCoffinʸᴰ<BãßBȍőnGlyphSetKeyʸᴰ> GET_BBC() { return BBC; }
|
||||
public static int LENGTH() { return values().length; };
|
||||
|
@ -100,11 +109,35 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
|||
}
|
||||
|
||||
private BaseGlyphSet(BaseGlyphSetNumber numbers, BaseGlyphSetNumber hex, BaseGlyphSetNumber gematria) {
|
||||
this(numbers, hex, gematria, false);
|
||||
}
|
||||
|
||||
private BaseGlyphSet(BaseGlyphSetNumber numbers, BaseGlyphSetNumber hex, BaseGlyphSetNumber gematria, Boolean reverseScript) {
|
||||
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers);
|
||||
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, hex);
|
||||
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, gematria);
|
||||
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.REVERSE_SCRIPT, reverseScript); // TODO: ImGui workaround
|
||||
BBC.BOON_INIT(this);
|
||||
this.BȍőnJmxInit(BãßBȍőnGlyphSetKeyʸᴰ.JMX);
|
||||
printsGlyphSetNumber10 = BȍőnJmxInitGuageCounter(BãßBȍőnGlyphSetKeyʸᴰ.JMX, "printsGlyphSetNumber10");
|
||||
printsGlyphSetNumber16 = BȍőnJmxInitGuageCounter(BãßBȍőnGlyphSetKeyʸᴰ.JMX, "printsGlyphSetNumber16");
|
||||
printsGlyphSetNumber27 = BȍőnJmxInitGuageCounter(BãßBȍőnGlyphSetKeyʸᴰ.JMX, "printsGlyphSetNumber27");
|
||||
}
|
||||
|
||||
public BaseGlyphSetNumber BȍőnGlyphSetNumber10() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
public BaseGlyphSetNumber BȍőnGlyphSetNumber16() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
public BaseGlyphSetNumber BȍőnGlyphSetNumber27() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
public Boolean BȍőnGlyphSetReverseScript() {
|
||||
return GET_BBC().GET_BOOL(BãßBȍőnGlyphSetKeyʸᴰ.REVERSE_SCRIPT);
|
||||
}
|
||||
|
||||
public String BȍőnConvertTo(String numbers) {
|
||||
|
@ -119,4 +152,95 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
|||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public String BȍőnPrintGlyphSetNumber10(int number, int numberMax) {
|
||||
printsGlyphSetNumber10.increment();
|
||||
String maxDigitNumber = Integer.toString(numberMax);
|
||||
StringBuilder maxDigitFormat = new StringBuilder();
|
||||
for (int i=0;i<maxDigitNumber.length();i++) {
|
||||
maxDigitFormat.append("0");
|
||||
}
|
||||
String numberStr = new DecimalFormat(maxDigitFormat.toString()).format(number);
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (int i=0;i<numberStr.length();i++) {
|
||||
char c = numberStr.charAt(i);
|
||||
int numberDigit = c - '0';
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(numberDigit));
|
||||
if (i<numberStr.length() - 1) {
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharSeperator());
|
||||
}
|
||||
}
|
||||
if (BȍőnGlyphSetReverseScript()) {
|
||||
return buf.reverse().toString();
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public String BȍőnPrintGlyphSetNumber16(int number, int numberMax) {
|
||||
printsGlyphSetNumber16.increment();
|
||||
String maxDigitNumber = Integer.toHexString(numberMax);
|
||||
String numberStr = Integer.toHexString(number);
|
||||
StringBuilder buf = new StringBuilder();
|
||||
BaseGlyphSet printSet = this;
|
||||
for (int i=numberStr.length();i<maxDigitNumber.length();i++) {
|
||||
buf.append(printSet.BȍőnGlyphSetNumber16().BȍőnCharFor(0));
|
||||
if (i==numberStr.length() && BȍőnGlyphSetNumber16().BȍőnAltGlyphSet() != null) {
|
||||
printSet = BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
|
||||
}
|
||||
}
|
||||
for (int i=0;i<numberStr.length();i++) {
|
||||
char c = numberStr.charAt(i);
|
||||
int numberDigit = 0;
|
||||
if (c >= 'a') {
|
||||
numberDigit = c - 'a' + 10;
|
||||
} else {
|
||||
numberDigit = c - '0';
|
||||
}
|
||||
buf.append(printSet.BȍőnGlyphSetNumber16().BȍőnCharFor(numberDigit));
|
||||
if (i<numberStr.length() - 1) {
|
||||
buf.append(printSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||
}
|
||||
if (i==0 && BȍőnGlyphSetNumber16().BȍőnAltGlyphSet() != null) {
|
||||
printSet = BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
|
||||
}
|
||||
}
|
||||
if (BȍőnGlyphSetReverseScript()) {
|
||||
return buf.reverse().toString();
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public String BȍőnPrintGlyphSetNumber27(int number, int numberMax) {
|
||||
printsGlyphSetNumber27.increment();
|
||||
String maxDigitNumber = Integer.toString(numberMax, 27);
|
||||
String numberStr = Integer.toString(number, 27);
|
||||
StringBuilder buf = new StringBuilder();
|
||||
BaseGlyphSet printSet = this;
|
||||
for (int i=numberStr.length();i<maxDigitNumber.length();i++) {
|
||||
buf.append(printSet.BȍőnGlyphSetNumber27().BȍőnCharFor(0));
|
||||
if (i==numberStr.length() && BȍőnGlyphSetNumber27().BȍőnAltGlyphSet() != null) {
|
||||
printSet = BȍőnGlyphSetNumber27().BȍőnAltGlyphSet();
|
||||
}
|
||||
}
|
||||
for (int i=0;i<numberStr.length();i++) {
|
||||
char c = numberStr.charAt(i);
|
||||
int numberDigit = 0;
|
||||
if (c >= 'a') {
|
||||
numberDigit = c - 'a' + 10;
|
||||
} else {
|
||||
numberDigit = c - '0';
|
||||
}
|
||||
buf.append(printSet.BȍőnGlyphSetNumber27().BȍőnCharFor(numberDigit));
|
||||
if (i<numberStr.length() - 1) {
|
||||
buf.append(printSet.BȍőnGlyphSetNumber27().BȍőnCharSeperator());
|
||||
}
|
||||
if (i==0 && BȍőnGlyphSetNumber27().BȍőnAltGlyphSet() != null) {
|
||||
printSet = BȍőnGlyphSetNumber27().BȍőnAltGlyphSet();
|
||||
}
|
||||
}
|
||||
if (BȍőnGlyphSetReverseScript()) {
|
||||
return buf.reverse().toString(); // TODO: ImGui workaround
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ public final class BaseGlyphSetNumber {
|
|||
return altGlyphSet;
|
||||
}
|
||||
|
||||
public String BȍőnCharFor36(int number) {
|
||||
public String BȍőnCharFor27(int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return chars.get(0);
|
||||
|
|
|
@ -11,5 +11,6 @@ public enum BãßBȍőnGlyphSetKeyʸᴰ implements BãßBȍőnCoffinStoreKeyʸ
|
|||
NUMBERS,
|
||||
GEMATRIA,
|
||||
HEXIMALS,
|
||||
REVERSE_SCRIPT
|
||||
;
|
||||
}
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
package love.distributedrebirth.numberxd.glyph;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumSetᴶᴹˣ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public interface BãßBȍőnGlyphSetʸᴰ<T extends BãßBȍőnGlyphSetʸᴰ<T>> extends DefaultEnumSetᴶᴹˣ<T,BãßBȍőnGlyphSetKeyʸᴰ> {
|
||||
|
||||
default BaseGlyphSetNumber BȍőnGlyphSetNumber10() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
default BaseGlyphSetNumber BȍőnGlyphSetNumber16() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
default BaseGlyphSetNumber BȍőnGlyphSetNumber36() {
|
||||
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, BaseGlyphSetNumber.class);
|
||||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber10(int number, int numberMax) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (numberMax < 10) {
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(number));
|
||||
} else if (numberMax < 100) {
|
||||
int count = number;
|
||||
int mod10 = count % 10;
|
||||
int div10 = count / 10 % 10;
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(div10));
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(mod10));
|
||||
} else if (numberMax < 1000) {
|
||||
int count = number;
|
||||
int mod10 = count % 10;
|
||||
int div10 = count / 10 % 10;
|
||||
int div100 = count / 100 % 10;
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(div10));
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(div100));
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber10().BȍőnCharFor(mod10));
|
||||
} else {
|
||||
throw new IllegalStateException("Can't handle more than 1000 values.");
|
||||
}
|
||||
if (BaseGlyphSet.HEBREW.equals(this)) {
|
||||
return buf.reverse().toString(); // TODO: ImGui workaround
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber16(int number, int numberMax) {
|
||||
//BãßBȍőnGlyphSetʸᴰ<T> glyphSet = this;
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (numberMax < 16) {
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor(number));
|
||||
} else if (numberMax < 256) {
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor(number >> 4));
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||
BaseGlyphSet secondGlyphSet = BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
|
||||
if (secondGlyphSet != null) {
|
||||
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(number & 0x0F));
|
||||
} else {
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor(number & 0x0F));
|
||||
}
|
||||
} else if (numberMax < 0xFFF+1) {
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor((number >> 8) & 0x0F));
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||
BaseGlyphSet secondGlyphSet = BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
|
||||
if (secondGlyphSet != null) {
|
||||
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((number >> 4) & 0x0F));
|
||||
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(number & 0x0F));
|
||||
} else {
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor((number >> 4) & 0x0F));
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber16().BȍőnCharFor(number & 0x0F));
|
||||
}
|
||||
} else {
|
||||
throw new IllegalStateException("Can't handle more than 0xFFF values.");
|
||||
}
|
||||
if (BaseGlyphSet.HEBREW.equals(this)) {
|
||||
return buf.reverse().toString(); // TODO: ImGui workaround
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
default String BȍőnPrintGlyphSetNumber36(int number, int numberMax) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (numberMax < 9) {
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(number + 1));
|
||||
} else if (numberMax < 99) {
|
||||
int count = number + 1;
|
||||
int mod10 = (count % 9) + 1;
|
||||
int div10 = ((count / 9) % 9) + 1;
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(div10));
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(mod10));
|
||||
} else if (numberMax < 999) {
|
||||
int count = number;
|
||||
int mod10 = (count % 9) + 1;
|
||||
int div10 = ((count / 90) & 9) + 1;
|
||||
int div100 = ((count / 900) & 9) + 1;
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(div10));
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(div100));
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharSeperator());
|
||||
buf.append(BȍőnGlyphSetNumber36().BȍőnCharFor36(mod10));
|
||||
} else {
|
||||
throw new IllegalStateException("Can't handle more than 1000 values.");
|
||||
}
|
||||
if (BaseGlyphSet.HEBREW.equals(this)) {
|
||||
return buf.reverse().toString(); // TODO: ImGui workaround
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
|
@ -55,9 +55,11 @@ public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
|
|||
|
||||
private String print16Numbers(BaseGlyphSet set) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
int x=240;
|
||||
for (int i=0;i<16;i++) {
|
||||
buf.append(set.BȍőnPrintGlyphSetNumber16(i, 99));
|
||||
buf.append(set.BȍőnPrintGlyphSetNumber16(i + x, 99));
|
||||
buf.append(" ");
|
||||
x = x - 16;
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
|
|
@ -100,17 +100,17 @@ public class SystemBasePartRenderer extends ImGuiRendererMain {
|
|||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.KOREAN));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_BASIC));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.TONE_SCRIPT));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.TONE_SCRIPT));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.KOREAN));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.KOREAN));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.LATIN_BASIC));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.GREEK));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.GREEK));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.HEBREW));
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.HEBREW));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnChinaKey());
|
||||
ImGui.tableNextColumn();
|
||||
|
|
Loading…
Reference in a new issue