Updates to BaseGlyphSet

This commit is contained in:
Willem Cazander 2022-02-03 13:21:40 +01:00
parent 480f56a937
commit 44824472f4
12 changed files with 205 additions and 111 deletions

View file

@ -54,19 +54,26 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.combo("Type", selectedBasePart, items); ImGui.combo("Type", selectedBasePart, items);
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV; int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
ImGui.beginTable("base-part", 16, flags); ImGui.beginTable("base-part", 23, flags);
ImGui.tableSetupColumn("BȍőnNaam"); ImGui.tableSetupColumn("BȍőnNaam");
ImGui.tableSetupColumn("TelNul"); ImGui.tableSetupColumn("TelNul");
ImGui.tableSetupColumn("TelEen"); ImGui.tableSetupColumn("TelEen");
ImGui.tableSetupColumn("Tone"); ImGui.tableSetupColumn("Tone");
ImGui.tableSetupColumn("16LBasic"); ImGui.tableSetupColumn("10Tone");
ImGui.tableSetupColumn("16Greek"); ImGui.tableSetupColumn("10Kor");
ImGui.tableSetupColumn("16Korean"); ImGui.tableSetupColumn("10DTMF");
ImGui.tableSetupColumn("36LBasic"); ImGui.tableSetupColumn("10Ben");
ImGui.tableSetupColumn("36Greek"); ImGui.tableSetupColumn("16Tone");
ImGui.tableSetupColumn("36Hebrew"); ImGui.tableSetupColumn("16Kor");
ImGui.tableSetupColumn("ChinaK"); ImGui.tableSetupColumn("16LatB");
ImGui.tableSetupColumn("ChinaV"); ImGui.tableSetupColumn("16Gre");
ImGui.tableSetupColumn("36Tone");
ImGui.tableSetupColumn("36Kor");
ImGui.tableSetupColumn("36LatB");
ImGui.tableSetupColumn("36Gre");
ImGui.tableSetupColumn("36Heb");
ImGui.tableSetupColumn("prcK");
ImGui.tableSetupColumn("prcV");
ImGui.tableSetupColumn("Alt1"); ImGui.tableSetupColumn("Alt1");
ImGui.tableSetupColumn("Alt2"); ImGui.tableSetupColumn("Alt2");
ImGui.tableSetupColumn("Alt3"); ImGui.tableSetupColumn("Alt3");
@ -84,11 +91,25 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnIdentifierTone()); ImGui.text(part.BȍőnIdentifierTone());
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.LATIN_DTMF));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.BENGALI));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC)); ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.GREEK)); ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.GREEK));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.KOREAN)); ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC)); ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC));
ImGui.tableNextColumn(); ImGui.tableNextColumn();

View file

@ -9,30 +9,40 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
@BãßBȍőnClassInfoʸᴰ(name = "BaseGlyphSet", purpose = "The encoded base scripts.") @BãßBȍőnClassInfoʸᴰ(name = "BaseGlyphSet", purpose = "The encoded base scripts.")
public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> { public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
// TODO: ImGui add font for SINHALA
// TODO: ImGui add font for TONE_LETTER missing plane 1,2,3
// TODO: ImGui add font for BURMESE
// TODO: ImGui add font for ARABIC
BURMESE(new BaseGlyphSetNumber10("\u1040","\u1041","\u1042","\u1043","\u1044","\u1045","\u1046","\u1047","\u1048","\u1049")), BURMESE(new BaseGlyphSetNumber10("\u1040","\u1041","\u1042","\u1043","\u1044","\u1045","\u1046","\u1047","\u1048","\u1049")),
BENGALI(new BaseGlyphSetNumber10("","","","","","","","","","")), BENGALI(new BaseGlyphSetNumber10("","","","","","","","","","")),
SINHALA(new BaseGlyphSetNumber10("","","","","","","","","","")), SINHALA(new BaseGlyphSetNumber10("","","","","","","","","","")),
TONE_LETTER(new BaseGlyphSetNumber10("˥","˦","˧","˨","˩","","","","",""),
new BaseGlyphSetNumber16("˧˥˩","˧˩˥","˧˥˦","˧˩˨","˧˦˦","˧˨˨","˧˥˥","˧˩˩","˥˩˧","˩˥˧","˥˦˧","˩˨˧","˦˦˧","˨˨˧","˥˥˧","˩˩˧"),
new BaseGlyphSetNumber36("꜊꜈","꜊꜉","꜊꜋","꜊꜌","꜊꜍","꜊꜎","꜊꜏","꜊꜐","꜊꜑","˧˥","˧˦","˧˨","˧˩","˧꜒","˧꜓","˧꜔","˧꜕","˧꜖","꜏˥","꜏˦","꜏˧","꜏˨","꜏˩","꜏꜍","꜏꜎","꜏꜐","꜏꜑")),
GREEK(new BaseGlyphSetNumber10("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"), GREEK(new BaseGlyphSetNumber10("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
new BaseGlyphSetNumber16("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"), new BaseGlyphSetNumber16("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"),
new BaseGlyphSetNumber36("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")), new BaseGlyphSetNumber36("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")),
KOREAN(new BaseGlyphSetNumber10("","","","","","","","","",""),
new BaseGlyphSetNumber16("","","","","","","","","","","","","","","",""),
new BaseGlyphSetNumber36("","","","","","","","","","","","","","","","","","","","","","","","","","","")),
LATIN_BASIC(new BaseGlyphSetNumber10("0","1","2","3","4","5","6","7","8","9"), LATIN_BASIC(new BaseGlyphSetNumber10("0","1","2","3","4","5","6","7","8","9"),
new BaseGlyphSetNumber16("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"), new BaseGlyphSetNumber16("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"),
new BaseGlyphSetNumber36("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")), new BaseGlyphSetNumber36("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 BaseGlyphSetNumber10("zero","one","two","three","four","five","six","seven","eight","nine"),
LATIN_DTMF(new BaseGlyphSetNumber10("zero","one","two","three","four","five","six","seven","eight","nine").withSeperator(" "),
new BaseGlyphSetNumber16("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")), new BaseGlyphSetNumber16("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")),
LATIN_SUPER(new BaseGlyphSetNumber10("","¹","²","³","","","","","",""), LATIN_SUPER(new BaseGlyphSetNumber10("","¹","²","³","","","","","",""),
new BaseGlyphSetNumber16("","¹","²","³","","","","","","","","","","","","")), new BaseGlyphSetNumber16("","¹","²","³","","","","","","","","","","","","")),
LATIN_SUB(new BaseGlyphSetNumber10("","","","","","","","","",""), LATIN_SUB(new BaseGlyphSetNumber10("","","","","","","","","",""),
new BaseGlyphSetNumber16("","","","","","","","","","","","","","","","բ")), new BaseGlyphSetNumber16("","","","","","","","","","","","","","","","բ")),
KOREAN(new BaseGlyphSetNumber10("","","","","","","","","",""), HEBREW(new BaseGlyphSetNumber10("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע‎","חֲמִשָּׁה‎","שֵׁשׁ‎","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה‎").withSeperator(" "),
new BaseGlyphSetNumber16("","","","","","","","","","","","","","","","")),
HEBREW(new BaseGlyphSetNumber10("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע‎","חֲמִשָּׁה‎","שֵׁשׁ‎","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה‎"),
new BaseGlyphSetNumber36("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")), new BaseGlyphSetNumber36("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")),
ARABIC(new BaseGlyphSetNumber10("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"), ARABIC(new BaseGlyphSetNumber10("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
new BaseGlyphSetNumber36("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")), new BaseGlyphSetNumber36("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")),
; ;

View file

@ -10,4 +10,6 @@ public interface BaseGlyphSetNumber {
} }
String BȍőnCharFor(int number); String BȍőnCharFor(int number);
String BȍőnCharSeperator();
} }

View file

@ -6,6 +6,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_10) @BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_10)
public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber { public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber {
private String charSeperator;
private final String char0; private final String char0;
private final String char1; private final String char1;
private final String char2; private final String char2;
@ -20,6 +21,7 @@ public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber {
public BaseGlyphSetNumber10(String char0, String char1, String char2, String char3, String char4, String char5, public BaseGlyphSetNumber10(String char0, String char1, String char2, String char3, String char4, String char5,
String char6, String char7, String char8, String char9) { String char6, String char7, String char8, String char9) {
super(); super();
this.charSeperator = "";
this.char0 = char0; this.char0 = char0;
this.char1 = char1; this.char1 = char1;
this.char2 = char2; this.char2 = char2;
@ -32,6 +34,12 @@ public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber {
this.char9 = char9; this.char9 = char9;
} }
public BaseGlyphSetNumber10 withSeperator(String charSeperator) {
this.charSeperator = charSeperator;
return this;
}
@Override
public String BȍőnCharFor(int number) { public String BȍőnCharFor(int number) {
switch (number) { switch (number) {
case 0: case 0:
@ -59,6 +67,11 @@ public final class BaseGlyphSetNumber10 implements BaseGlyphSetNumber {
} }
} }
@Override
public String BȍőnCharSeperator() {
return charSeperator;
}
public String getChar0() { public String getChar0() {
return char0; return char0;
} }

View file

@ -6,6 +6,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_16) @BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_16)
public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber { public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
private String charSeperator;
private final String char0; private final String char0;
private final String char1; private final String char1;
private final String char2; private final String char2;
@ -26,7 +27,7 @@ public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
public BaseGlyphSetNumber16(String char0, String char1, String char2, String char3, String char4, String char5, public BaseGlyphSetNumber16(String char0, String char1, String char2, String char3, String char4, String char5,
String char6, String char7, String char8, String char9, String charA, String charB, String charC, String char6, String char7, String char8, String char9, String charA, String charB, String charC,
String charD, String charE, String charF) { String charD, String charE, String charF) {
super(); this.charSeperator = "";
this.char0 = char0; this.char0 = char0;
this.char1 = char1; this.char1 = char1;
this.char2 = char2; this.char2 = char2;
@ -45,6 +46,12 @@ public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
this.charF = charF; this.charF = charF;
} }
public BaseGlyphSetNumber16 withSeperator(String charSeperator) {
this.charSeperator = charSeperator;
return this;
}
@Override
public String BȍőnCharFor(int number) { public String BȍőnCharFor(int number) {
switch (number) { switch (number) {
case 0: case 0:
@ -84,6 +91,11 @@ public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
} }
} }
@Override
public String BȍőnCharSeperator() {
return charSeperator;
}
public String getChar0() { public String getChar0() {
return char0; return char0;
} }

View file

@ -6,6 +6,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_36) @BãßBȍőnGlyphSetNumberInfoʸᴰ(base = BaseGlyphSetNumberType.BASE_36)
public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber { public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber {
private String charSeperator;
private final String char1; private final String char1;
private final String char2; private final String char2;
private final String char3; private final String char3;
@ -39,7 +40,7 @@ public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber {
String char50, String char60, String char70, String char80, String char90, String char100, String char200, String char50, String char60, String char70, String char80, String char90, String char100, String char200,
String char300, String char400, String char500, String char600, String char700, String char800, String char300, String char400, String char500, String char600, String char700, String char800,
String char900) { String char900) {
super(); this.charSeperator = "";
this.char1 = char1; this.char1 = char1;
this.char2 = char2; this.char2 = char2;
this.char3 = char3; this.char3 = char3;
@ -69,6 +70,12 @@ public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber {
this.char900 = char900; this.char900 = char900;
} }
public BaseGlyphSetNumber36 withSeperator(String charSeperator) {
this.charSeperator = charSeperator;
return this;
}
@Override
public String BȍőnCharFor(int number) { public String BȍőnCharFor(int number) {
switch (number) { switch (number) {
case 1: case 1:
@ -130,6 +137,11 @@ public final class BaseGlyphSetNumber36 implements BaseGlyphSetNumber {
} }
} }
@Override
public String BȍőnCharSeperator() {
return charSeperator;
}
public String getChar1() { public String getChar1() {
return char1; return char1;
} }

View file

@ -23,6 +23,37 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE); return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE);
} }
default String BȍőnGlyphSetNumber10(BaseGlyphSet glyphSet) {
StringBuilder buf = new StringBuilder();
T[] values = BãßInstances();
if (values.length <= 10) {
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(BȍőnRangTelNul()));
} else if (values.length <= 100) {
int count = BȍőnRangTelNul();
int mod10 = count % 10;
int div10 = count / 10;
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(mod10));
} else if (values.length <= 1000) {
int count = BȍőnRangTelNul();
int mod10 = count % 10;
int div10 = count / 10;
int div100 = count / 100;
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(div100));
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber10().BȍőnCharFor(mod10));
} else {
throw new IllegalStateException("Can't handle more than 1000 values.");
}
if (BaseGlyphSet.HEBREW.equals(glyphSet)) {
return buf.reverse().toString(); // TODO: ImGui workaround
}
return buf.toString();
}
default String BȍőnGlyphSetNumber16(BaseGlyphSet glyphSet) { default String BȍőnGlyphSetNumber16(BaseGlyphSet glyphSet) {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
T[] values = BãßInstances(); T[] values = BãßInstances();
@ -30,16 +61,19 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul())); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul()));
} else if (values.length <= 256) { } else if (values.length <= 256) {
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4)); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F)); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
} else if (values.length <= 0xFFF+1) { } else if (values.length <= 0xFFF+1) {
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F)); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F)); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F)); buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
} else { } else {
throw new IllegalStateException("Can't handle more than 0xFFF values."); throw new IllegalStateException("Can't handle more than 0xFFF values.");
} }
if (BaseGlyphSet.HEBREW.equals(glyphSet)) { if (BaseGlyphSet.HEBREW.equals(glyphSet)) {
return buf.reverse().toString(); return buf.reverse().toString(); // TODO: ImGui workaround
} }
return buf.toString(); return buf.toString();
} }
@ -54,20 +88,23 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
int mod10 = count % 9 + 1; int mod10 = count % 9 + 1;
int div10 = count / 9 + 1; int div10 = count / 9 + 1;
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(div10)); buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(mod10)); buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(mod10));
} else if (values.length <= 999) { } else if (values.length <= 999) {
int count = BȍőnRangTelNul(); int count = BȍőnRangTelNul();
int mod10 = count % 9 + 1; int mod10 = count % 9 + 1;
int div10 = count / 90 + 1; int div10 = count / 90 + 1;
int div100 = count / 900 + 1; int div100 = count / 900 + 1;
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(div10)); buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(div100)); buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(mod10)); buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(div100));
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor(mod10));
} else { } else {
throw new IllegalStateException("Can't handle more than 1000 values."); throw new IllegalStateException("Can't handle more than 1000 values.");
} }
if (BaseGlyphSet.HEBREW.equals(glyphSet)) { if (BaseGlyphSet.HEBREW.equals(glyphSet)) {
return buf.reverse().toString(); return buf.reverse().toString(); // TODO: ImGui workaround
} }
return buf.toString(); return buf.toString();
} }

View file

@ -7,18 +7,16 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnClassInfoʸᴰ(name = "T08PartOctal", purpose = "The distribution by 8.") @BãßBȍőnClassInfoʸᴰ(name = "T08PartOctal", purpose = "The distribution by 8.")
@BãßBȍőnPartAlt1Infoʸᴰ(name = "Absolute Tone Sequence", website = "https://en.wikipedia.org/wiki/Tone_letter") public enum T08PartOctal implements BãßBȍőnPartʸᴰ<T08PartOctal>,BãßBȍőnPartShiftBitsʸᴰ<T08PartOctal> {
@BãßBȍőnPartAlt2Infoʸᴰ(name = "Relative Tone Sequence", website = "https://en.wikipedia.org/wiki/Tone_letter")
public enum T08PartOctal implements BãßBȍőnPartAlt2ʸᴰ<T08PartOctal>,BãßBȍőnPartShiftBitsʸᴰ<T08PartOctal> {
PART_1("˥","","heart","˧˥˩","˥˩˧", 0), PART_1("˥","","heart",0),
PART_2("˩","","head", "˧˩˥","˩˥˧", 3), PART_2("˩","","head", 3),
PART_3("","","eye", "˧˥˦","˥˦˧", 6), PART_3("","","eye", 6),
PART_4("","","mouth","˧˩˨","˩˨˧", 9), PART_4("","","mouth",9),
PART_5("","","arm", "˧˦˦","˦˦˧", 12), PART_5("","","arm", 12),
PART_6("","","hand", "˧˨˨","˨˨˧", 15), PART_6("","","hand", 15),
PART_7("","","leg", "˧˥˥","˥˥˧", 18), PART_7("","","leg", 18),
PART_8("","","feet", "˧˩˩","˩˩˧", 21), PART_8("","","feet", 21),
; ;
public static int BIT_COUNT = 3; public static int BIT_COUNT = 3;
@ -27,13 +25,11 @@ public enum T08PartOctal implements BãßBȍőnPartAlt2ʸᴰ<T08PartOctal>,Bãß
public BãßBȍőnCoffinʸᴰ<BãßBȍőnPartKeyʸᴰ> GET_BBC() { return BBC; } public BãßBȍőnCoffinʸᴰ<BãßBȍőnPartKeyʸᴰ> GET_BBC() { return BBC; }
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };
private T08PartOctal(String idTone, String chinaKey, String chinaValue, String alt1Value, String alt2Value, int shiftBits) { private T08PartOctal(String idTone, String chinaKey, String chinaValue, int shiftBits) {
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ID_TONE, idTone); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ID_TONE, idTone);
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey);
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue);
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.SHIFT_BITS, Integer.valueOf(shiftBits)); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.SHIFT_BITS, Integer.valueOf(shiftBits));
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value);
BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_2_VALUE, alt2Value);
BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE);
BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA);
} }

View file

@ -41,7 +41,7 @@ public enum T20PartScore implements BãßBȍőnPartAlt4ʸᴰ<T20PartScore> {
; ;
private static final Map<String, T20PartScore> OPENLC_MAP = Collections.unmodifiableMap( private static final Map<String, T20PartScore> OPENLC_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.BȍőnAlt3Value(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.BȍőnAlt4Value(), v -> v)));
private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<BãßBȍőnPartKeyʸᴰ> GET_BBC() { return BBC; } public BãßBȍőnCoffinʸᴰ<BãßBȍőnPartKeyʸᴰ> GET_BBC() { return BBC; }
public static int LENGTH() { return values().length; }; public static int LENGTH() { return values().length; };

View file

@ -9,69 +9,66 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
@BãßBȍőnClassInfoʸᴰ(name = "T60Sexagesimal", purpose = "The distribution by 60.") @BãßBȍőnClassInfoʸᴰ(name = "T60Sexagesimal", purpose = "The distribution by 60.")
public enum T60PartSexagesimal implements BãßBȍőnPartʸᴰ<T60PartSexagesimal> { public enum T60PartSexagesimal implements BãßBȍőnPartʸᴰ<T60PartSexagesimal> {
PART_1 ("˧˩˥","","cow"), PART_1 ("˥˥","","cow"),
PART_2 ("˧˥˦","","chicken"), PART_2 ("˥˦","","chicken"),
PART_3 ("˧˩˨","","sheep"), PART_3 ("˥˧","","sheep"),
PART_4 ("˧˦˦","","wolf"), PART_4 ("˥˨","","wolf"),
PART_5 ("˧˨˨","","rat"), PART_5 ("˥˩","","rat"),
PART_6 ("˧˥˥","","cat"), PART_6 ("˥꜒","","cat"),
PART_7 ("˧˩˩","","rabbit"), PART_7 ("˥꜓","","rabbit"),
PART_8 ("˥˩˧","","ape"), PART_8 ("˥꜔","","ape"),
PART_9 ("˩˥˧","","snake"), PART_9 ("˥꜕","","snake"),
PART_10("˥˦˧","","horse"), PART_10("˥꜖","","horse"),
PART_11("˩˨˧","","elepant"), PART_11("˦˥","","elepant"),
PART_12("˦˦˧","","leopard"), PART_12("˦˦","","leopard"),
PART_13("˨˨˧","","crow"), PART_13("˦˧","","crow"),
PART_14("˥˥˧","","pig"), PART_14("˦˨","","pig"),
PART_15("˩˩˧","","dog"), PART_15("˦˩","","dog"),
PART_16("˦꜒","","fish"),
PART_16("꜔꜒꜖","","fish"), PART_17("˦꜓","","shrimp"),
PART_17("꜔꜒꜓","","shrimp"), PART_18("˦꜔","","whale"),
PART_18("꜔꜖꜕","","whale"), PART_19("˦꜕","","bear"),
PART_19("꜔꜓꜓","","bear"), PART_20("˦꜖","鹿","deer"),
PART_20("꜔꜕꜕","鹿","deer"), PART_21("˧˥","","donkey"),
PART_21("꜔꜒꜒","","donkey"), PART_22("˧˦","","tapir"),
PART_22("꜔꜖꜖","","tapir"), PART_23("˧˧","","bird"),
PART_23("꜒꜖꜔","","bird"), PART_24("˧˨","","crane"),
PART_24("꜖꜒꜔","","crane"), PART_25("˧˩","","eagle"),
PART_25("꜒꜓꜔","","eagle"), PART_26("˧꜒","","falcon"),
PART_26("꜖꜕꜔","","falcon"), PART_27("˧꜓","","goose"),
PART_27("꜓꜓꜔","","goose"), PART_28("˧꜔","","salamander"),
PART_28("꜕꜕꜔","","salamander"), PART_29("˧꜕","","turtle"),
PART_29("꜒꜒꜔","","turtle"), PART_30("˧꜖","","centipede"),
PART_30("꜖꜖꜔","","centipede"), PART_31("˨˥","","fly"),
PART_32("˨˦","","scorpion"),
PART_31("꜊꜌꜈","","fly"), PART_33("˨˧","","worm"),
PART_32("꜊꜈꜉","","scorpion"), PART_34("˨˨","","tiger"),
PART_33("꜊꜌꜋","","worm"), PART_35("˨˩","","camel"),
PART_34("꜊꜉꜉","","tiger"), PART_36("˨꜒","","monkey"),
PART_35("꜊꜋꜋","","camel"), PART_37("˨꜓","","shark"),
PART_36("꜊꜈꜈","","monkey"), PART_38("˨꜔","","duck"),
PART_37("꜊꜌꜌","","shark"), PART_39("˨꜕","","mustard"),
PART_38("꜈꜌꜊","","duck"), PART_40("˨꜖","","salt"),
PART_39("꜌꜈꜊","","mustard"), PART_41("˩˥","","pepper"),
PART_40("꜈꜉꜊","","salt"), PART_42("˩˦","","ginger"),
PART_41("꜌꜋꜊","","pepper"), PART_43("˩˧","","corn"),
PART_42("꜉꜉꜊","","ginger"), PART_44("˩˨","","beans"),
PART_43("꜋꜋꜊","","corn"), PART_45("˩˩","","pomelos"),
PART_44("꜈꜈꜊","","beans"), PART_46("˩꜒","","jujube"),
PART_45("꜌꜌꜊","","pomelos"), PART_47("˩꜓","","melon"),
PART_48("˩꜔","","grape"),
PART_46("꜏꜍꜑","","jujube"), PART_49("˩꜕","","plum"),
PART_47("꜏꜍꜎","","melon"), PART_50("˩꜖","","lime"),
PART_48("꜏꜑꜐","","grape"), PART_51("꜒˥","","pear"),
PART_49("꜏꜎꜎","","plum"), PART_52("꜒˦","","banana"),
PART_50("꜏꜐꜐","","lime"), PART_53("꜒˧","","lemon"),
PART_51("꜏꜍꜍","","pear"), PART_54("꜒˨","","persimmon"),
PART_52("꜏꜑꜑","","banana"), PART_55("꜒˩","","orange"),
PART_53("꜍꜑꜏","","lemon"), PART_56("꜒꜒","","peach"),
PART_54("꜑꜍꜏","","persimmon"), PART_57("꜒꜓","","apricot"),
PART_55("꜍꜎꜏","","orange"), PART_58("꜒꜔","","strawberry"),
PART_56("꜑꜐꜏","","peach"), PART_59("꜒꜕","","patato"),
PART_57("꜎꜎꜏","","apricot"), PART_60("꜒꜖","","apple"),
PART_58("꜐꜐꜏","","strawberry"),
PART_59("꜍꜍꜏","","patato"),
PART_60("꜑꜑꜏","","apple"),
; ;
private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();

View file

@ -15,12 +15,6 @@ public class T08PartOctalTest {
Assertions.assertNotNull(value.BȍőnIdentifierTone()); Assertions.assertNotNull(value.BȍőnIdentifierTone());
Assertions.assertNotNull(value.BȍőnChinaKey()); Assertions.assertNotNull(value.BȍőnChinaKey());
Assertions.assertNotNull(value.BȍőnChinaValue()); Assertions.assertNotNull(value.BȍőnChinaValue());
Assertions.assertNotNull(value.BȍőnAlt1Value());
Assertions.assertNotNull(value.BãßAlt1Name());
Assertions.assertNotNull(value.BãßAlt1Website());
Assertions.assertNotNull(value.BȍőnAlt2Value());
Assertions.assertNotNull(value.BãßAlt2Name());
Assertions.assertNotNull(value.BãßAlt2Website());
} }
} }

View file

@ -20,10 +20,10 @@ public class T60SexagesimalTest {
@Test @Test
public void testToneMap() { public void testToneMap() {
Assertions.assertEquals(T60PartSexagesimal.PART_1, T60PartSexagesimal.PART_1.BãßValueOfTone("˧˩˥")); Assertions.assertEquals(T60PartSexagesimal.PART_1, T60PartSexagesimal.PART_1.BãßValueOfTone("˥˥"));
Assertions.assertEquals(T60PartSexagesimal.PART_2, T60PartSexagesimal.PART_1.BãßValueOfTone("˧˥˦")); Assertions.assertEquals(T60PartSexagesimal.PART_2, T60PartSexagesimal.PART_1.BãßValueOfTone("˥˦"));
Assertions.assertEquals(T60PartSexagesimal.PART_59, T60PartSexagesimal.PART_1.BãßValueOfTone("꜍꜍꜏")); Assertions.assertEquals(T60PartSexagesimal.PART_59, T60PartSexagesimal.PART_1.BãßValueOfTone("꜒꜕"));
Assertions.assertEquals(T60PartSexagesimal.PART_60, T60PartSexagesimal.PART_1.BãßValueOfTone("꜑꜑꜏")); Assertions.assertEquals(T60PartSexagesimal.PART_60, T60PartSexagesimal.PART_1.BãßValueOfTone("꜒꜖"));
} }
@Test @Test