Moved broken number render code, todo fix

This commit is contained in:
Willem 2022-02-05 14:43:14 +01:00
parent bc02b51d7d
commit dff7e98cc0
5 changed files with 249 additions and 121 deletions

View file

@ -20,7 +20,7 @@ import love.distributedrebirth.gdxapp.matrix4d.ScreenMatrix4D;
import love.distributedrebirth.gdxapp.music.MusicManager; import love.distributedrebirth.gdxapp.music.MusicManager;
import love.distributedrebirth.gdxapp.music.MusicPlayerRenderer; import love.distributedrebirth.gdxapp.music.MusicPlayerRenderer;
import love.distributedrebirth.gdxapp.music.MusicSongType; import love.distributedrebirth.gdxapp.music.MusicSongType;
import love.distributedrebirth.gdxapp.screen.BasePartRenderer; import love.distributedrebirth.gdxapp.screen.SystemBasePartRenderer;
import love.distributedrebirth.gdxapp.screen.BasicConsoleRenderer; import love.distributedrebirth.gdxapp.screen.BasicConsoleRenderer;
import love.distributedrebirth.gdxapp.screen.HebrewWalletRenderer; import love.distributedrebirth.gdxapp.screen.HebrewWalletRenderer;
import love.distributedrebirth.gdxapp.screen.ScreenCredits; import love.distributedrebirth.gdxapp.screen.ScreenCredits;
@ -30,6 +30,7 @@ import love.distributedrebirth.gdxapp.screen.ScreenIntro;
import love.distributedrebirth.gdxapp.screen.ScreenIntroMission; import love.distributedrebirth.gdxapp.screen.ScreenIntroMission;
import love.distributedrebirth.gdxapp.screen.ScreenLoading; import love.distributedrebirth.gdxapp.screen.ScreenLoading;
import love.distributedrebirth.gdxapp.screen.ScreenUnicode4D; import love.distributedrebirth.gdxapp.screen.ScreenUnicode4D;
import love.distributedrebirth.gdxapp.screen.SystemBaseGlyphRenderer;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore; import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser; import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@ -53,7 +54,8 @@ public class Demo4DMain extends Game {
private ImBoolean showImGuiDemo = new ImBoolean(false); private ImBoolean showImGuiDemo = new ImBoolean(false);
private ImBoolean showMusicPlayer = new ImBoolean(false); private ImBoolean showMusicPlayer = new ImBoolean(false);
private ImBoolean showHebrewWallet = new ImBoolean(false); private ImBoolean showHebrewWallet = new ImBoolean(false);
private ImBoolean showBasePart = new ImBoolean(false); private ImBoolean showSystemBasePart = new ImBoolean(false);
private ImBoolean showSystemGlyphPart = new ImBoolean(false);
private ImBoolean showBasicConsole = new ImBoolean(false); private ImBoolean showBasicConsole = new ImBoolean(false);
public Demo4DMain(List<String> args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { public Demo4DMain(List<String> args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) {
@ -106,7 +108,8 @@ public class Demo4DMain extends Game {
putWidget(new MusicPlayerRenderer(this)); putWidget(new MusicPlayerRenderer(this));
putWidget(new HebrewWalletRenderer(this)); putWidget(new HebrewWalletRenderer(this));
putWidget(new BasePartRenderer(this)); putWidget(new SystemBasePartRenderer(this));
putWidget(new SystemBaseGlyphRenderer(this));
putWidget(new BasicConsoleRenderer(this)); putWidget(new BasicConsoleRenderer(this));
putScreen(new ScreenLoading(this)); putScreen(new ScreenLoading(this));
@ -170,8 +173,11 @@ public class Demo4DMain extends Game {
if (showHebrewWallet.get()) { if (showHebrewWallet.get()) {
widgets.get(HebrewWalletRenderer.class).render(showHebrewWallet); widgets.get(HebrewWalletRenderer.class).render(showHebrewWallet);
} }
if (showBasePart.get()) { if (showSystemBasePart.get()) {
widgets.get(BasePartRenderer.class).render(showBasePart); widgets.get(SystemBasePartRenderer.class).render(showSystemBasePart);
}
if (showSystemGlyphPart.get()) {
widgets.get(SystemBaseGlyphRenderer.class).render(showSystemGlyphPart);
} }
if (showBasicConsole.get()) { if (showBasicConsole.get()) {
widgets.get(BasicConsoleRenderer.class).render(showBasicConsole); widgets.get(BasicConsoleRenderer.class).render(showBasicConsole);
@ -220,13 +226,17 @@ public class Demo4DMain extends Game {
if (ImGui.menuItem("Hebrew Wallet")) { if (ImGui.menuItem("Hebrew Wallet")) {
showHebrewWallet.set(true); showHebrewWallet.set(true);
} }
ImGui.separator();
if (ImGui.menuItem("Base Part")) { if (ImGui.menuItem("Base Part")) {
showBasePart.set(true); showSystemBasePart.set(true);
} }
if (ImGui.menuItem("Base Glyph")) {
showSystemGlyphPart.set(true);
}
ImGui.separator();
if (ImGui.menuItem("Basic Console")) { if (ImGui.menuItem("Basic Console")) {
showBasicConsole.set(true); showBasicConsole.set(true);
} }
ImGui.separator();
if (ImGui.menuItem("Music Player")) { if (ImGui.menuItem("Music Player")) {
showMusicPlayer.set(true); showMusicPlayer.set(true);
} }

View file

@ -0,0 +1,110 @@
package love.distributedrebirth.gdxapp.screen;
import java.util.ArrayList;
import java.util.List;
import imgui.ImGui;
import imgui.flag.ImGuiCond;
import imgui.flag.ImGuiTableFlags;
import imgui.type.ImBoolean;
import imgui.type.ImInt;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp.Demo4DMain;
import love.distributedrebirth.gdxapp.ImGuiRendererMain;
import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSet;
import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSetNumber;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
private ImInt selectedGlyphPart = new ImInt();
public SystemBaseGlyphRenderer(Demo4DMain main) {
super(main);
}
@Override
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
ImGui.begin("Base glyph", widgetOpen);
List<BaseGlyphSet> bases = new ArrayList<>();
for (BaseGlyphSet glyphSet:BaseGlyphSet.values()) {
bases.add(glyphSet);
}
String[] items = new String[bases.size()];
for (int i=0;i<items.length;i++) {
items[i] = bases.get(i).BȍőnNaam();
}
String selectedItem = items[selectedGlyphPart.get()];
BaseGlyphSet glyphSet = BaseGlyphSet.valueOf(selectedItem);
ImGui.text("Glyph:");
ImGui.sameLine();
ImGui.combo("Set", selectedGlyphPart, items);
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
ImGui.beginTable("base-part", 7, flags);
ImGui.tableSetupColumn("Example");
ImGui.tableSetupColumn("tel10");
ImGui.tableSetupColumn("hon10");
ImGui.tableSetupColumn("tel16");
ImGui.tableSetupColumn("hon16");
ImGui.tableSetupColumn("tel36");
ImGui.tableSetupColumn("hon36");
ImGui.tableHeadersRow();
int[] numberSet = {0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42};
for (int number:numberSet) {
int number100 = number * 1;
BaseGlyphSetNumber number10 = glyphSet.BȍőnGlyphSetNumber10();
BaseGlyphSetNumber number16 = glyphSet.BȍőnGlyphSetNumber16();
BaseGlyphSetNumber number36 = glyphSet.BȍőnGlyphSetNumber36();
ImGui.tableNextRow();
ImGui.tableNextColumn();
ImGui.text(Integer.toString(number));
if (number10 != null) {
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber10(number, 50));
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber10(number100, 500));
} else {
ImGui.tableNextColumn();
ImGui.text("");
ImGui.tableNextColumn();
ImGui.text("");
}
if (number16 != null) {
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber16(number, 50));
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber16(number100, 500));
} else {
ImGui.tableNextColumn();
ImGui.text("");
ImGui.tableNextColumn();
ImGui.text("");
}
if (number36 != null) {
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber36(number, 50));
ImGui.tableNextColumn();
ImGui.text(glyphSet.BȍőnPrintGlyphSetNumber36(number100, 500));
} else {
ImGui.tableNextColumn();
ImGui.text("");
ImGui.tableNextColumn();
ImGui.text("");
}
}
ImGui.endTable();
ImGui.end();
}
}

View file

@ -20,11 +20,11 @@ import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt4ʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class BasePartRenderer extends ImGuiRendererMain { public class SystemBasePartRenderer extends ImGuiRendererMain {
private ImInt selectedBasePart = new ImInt(); private ImInt selectedBasePart = new ImInt();
public BasePartRenderer(Demo4DMain main) { public SystemBasePartRenderer(Demo4DMain main) {
super(main); super(main);
} }
@ -51,7 +51,7 @@ 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", 23, flags); ImGui.beginTable("base-part", 21, flags);
ImGui.tableSetupColumn("BȍőnNaam"); ImGui.tableSetupColumn("BȍőnNaam");
ImGui.tableSetupColumn("TelNul"); ImGui.tableSetupColumn("TelNul");
ImGui.tableSetupColumn("TelEen"); ImGui.tableSetupColumn("TelEen");
@ -59,11 +59,9 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.tableSetupColumn("10Tone"); ImGui.tableSetupColumn("10Tone");
ImGui.tableSetupColumn("10Kor"); ImGui.tableSetupColumn("10Kor");
ImGui.tableSetupColumn("10DTMF"); ImGui.tableSetupColumn("10DTMF");
ImGui.tableSetupColumn("10Ben");
ImGui.tableSetupColumn("16Tone"); ImGui.tableSetupColumn("16Tone");
ImGui.tableSetupColumn("16Kor"); ImGui.tableSetupColumn("16Kor");
ImGui.tableSetupColumn("16LatB"); ImGui.tableSetupColumn("16LatB");
ImGui.tableSetupColumn("16Gre");
ImGui.tableSetupColumn("36Tone"); ImGui.tableSetupColumn("36Tone");
ImGui.tableSetupColumn("36Kor"); ImGui.tableSetupColumn("36Kor");
ImGui.tableSetupColumn("36LatB"); ImGui.tableSetupColumn("36LatB");
@ -88,31 +86,27 @@ 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.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.KOREAN)); ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.LATIN_DTMF)); ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_DTMF));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber10(BaseGlyphSet.BENGALI)); ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.TONE_LETTER)); ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.KOREAN)); ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_BASIC));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC)); ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.TONE_LETTER));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber16(BaseGlyphSet.GREEK)); ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.KOREAN));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.TONE_LETTER)); ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.KOREAN)); ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.GREEK));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC)); ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.HEBREW));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.GREEK));
ImGui.tableNextColumn();
ImGui.text(part.BȍőnGlyphSetNumber36(BaseGlyphSet.HEBREW));
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.BȍőnChinaKey()); ImGui.text(part.BȍőnChinaKey());
ImGui.tableNextColumn(); ImGui.tableNextColumn();

View file

@ -18,4 +18,100 @@ public interface BãßBȍőnGlyphSetʸᴰ<T extends BãßBȍőnGlyphSetʸᴰ<T>>
default BaseGlyphSetNumber BȍőnGlyphSetNumber36() { default BaseGlyphSetNumber BȍőnGlyphSetNumber36() {
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, BaseGlyphSetNumber.class); 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();
}
} }

View file

@ -35,100 +35,6 @@ 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) {
StringBuilder buf = new StringBuilder();
T[] values = BãßInstances();
if (values.length <= 16) {
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul()));
} else if (values.length <= 256) {
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
BaseGlyphSet secondGlyphSet = glyphSet.BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
if (secondGlyphSet == null) {
secondGlyphSet = glyphSet;
}
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
} else if (values.length <= 0xFFF+1) {
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F));
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
BaseGlyphSet secondGlyphSet = glyphSet.BȍőnGlyphSetNumber16().BȍőnAltGlyphSet();
if (secondGlyphSet == null) {
secondGlyphSet = glyphSet;
}
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F));
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
} else {
throw new IllegalStateException("Can't handle more than 0xFFF values.");
}
if (BaseGlyphSet.HEBREW.equals(glyphSet)) {
return buf.reverse().toString(); // TODO: ImGui workaround
}
return buf.toString();
}
default String BȍőnGlyphSetNumber36(BaseGlyphSet glyphSet) {
StringBuilder buf = new StringBuilder();
T[] values = BãßInstances();
if (values.length <= 9) {
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(BȍőnRangTelEen()));
} else if (values.length <= 99) {
int count = BȍőnRangTelNul();
int mod10 = count % 9 + 1;
int div10 = count / 9 + 1;
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(mod10));
} else if (values.length <= 999) {
int count = BȍőnRangTelNul();
int mod10 = count % 9 + 1;
int div10 = count / 90 + 1;
int div100 = count / 900 + 1;
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(div10));
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(div100));
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharSeperator());
buf.append(glyphSet.BȍőnGlyphSetNumber36().BȍőnCharFor36(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();
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
default T BãßValueOfTone(String identifierTone) { default T BãßValueOfTone(String identifierTone) {
Map<String,Object> mapTone = GET_BBC().GET_MAP_OBJ(BãßBȍőnPartKeyʸᴰ.MAP_TONE); Map<String,Object> mapTone = GET_BBC().GET_MAP_OBJ(BãßBȍőnPartKeyʸᴰ.MAP_TONE);
@ -146,4 +52,16 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
} }
return (T) mapChina.get(chinaKey); return (T) mapChina.get(chinaKey);
} }
default String BȍőnPrintGlyphSetNumber10(BaseGlyphSet glyphSet) {
return glyphSet.BȍőnPrintGlyphSetNumber10(BȍőnRangTelNul(), BãßInstances().length);
}
default String BȍőnPrintGlyphSetNumber16(BaseGlyphSet glyphSet) {
return glyphSet.BȍőnPrintGlyphSetNumber16(BȍőnRangTelNul(), BãßInstances().length);
}
default String BȍőnPrintGlyphSetNumber36(BaseGlyphSet glyphSet) {
return glyphSet.BȍőnPrintGlyphSetNumber36(BȍőnRangTelNul(), BãßInstances().length);
}
} }