From ca1fe9d9d0695d06dd5c86e1e9a52b828789dcbb Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 10 Oct 2022 18:04:27 +0200 Subject: [PATCH] Hewbrew+unicode=hell --- README.md | 3 +- .../app/calculator/CalculatorDeskApp.java | 10 +- .../glyphdemo/apps/DemoGlyphSetDeskApp.java | 2 +- .../glyphdemo/apps/DemoNumberPartDeskApp.java | 2 +- .../apps/DemoUnicodePlaneDeskApp.java | 4 +- .../app/hewallet/HeWalletDeskApp.java | 74 ++++++++++-- .../gdxapp4d/app/notepad/NotepadDeskApp.java | 109 ++++++++++++++---- .../numberxd/Gê̄ldGetậl.java | 75 +++++++++--- .../numberxd/Gê̄ldGetậlÅtHebrew.java | 29 ++++- .../numberxd/Gê̄ldGetậlÅtHebrewVowel.java | 19 +++ .../numberxd/unicode}/BaseGlyphSet.java | 38 +++--- .../numberxd/unicode/BaseGlyphSetKeyʸᴰ.java | 4 +- .../numberxd/unicode}/BaseGlyphSetNumber.java | 2 +- .../numberxd/unicode/SourceGlyph.java | 64 ++++++++++ .../numberxd/unicode/SourceGlyphCharSet.java | 26 +++++ .../numberxd/unicode/UnicodePlane.java | 14 +-- .../numberxd/Gê̄ldGetậlTest.java | 29 +++++ .../unicode4d/draw/ImCharacter.java | 27 ++--- .../unicode4d/TestConvFont.java | 5 +- .../unicode4d/TestSwingPlane.java | 5 +- .../gdxapp4d/tos4/GDXAppTos4.java | 4 +- .../gdxapp4d/tos4/GDXAppTos4BootFactory.java | 1 + .../tos4/service/SystemGdxTerminal.java | 2 +- .../vrgem4/GDXAppVrGem4Activator.java | 2 +- .../vrgem4/view/DeskAppController.java | 3 + .../vrgem4/view/DeskTopScreenMenu.java | 21 +++- pom.xml | 1 + 27 files changed, 460 insertions(+), 115 deletions(-) rename {gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d => gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode}/BaseGlyphSet.java (91%) rename gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/BãßBȍőnGlyphSetKeyʸᴰ.java => gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/BaseGlyphSetKeyʸᴰ.java (70%) rename {gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d => gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode}/BaseGlyphSetNumber.java (98%) create mode 100644 gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/SourceGlyph.java create mode 100644 gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/SourceGlyphCharSet.java rename gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/UnicodePlaneᶻᴰ.java => gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/UnicodePlane.java (97%) create mode 100644 gdxapp4d-lib-numberxd/src/test/java/love/distributedrebirth/numberxd/Gê̄ldGetậlTest.java diff --git a/README.md b/README.md index b52e78bf..c1feb2e8 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Unicode4D should be based on a extended version of the four corner method; When the underlining data storage is china keyed we can render any glyph with it; [Example](https://kanji.sljfaq.org/four.html) -A mimetype based link chain sea file/package manager model aggregates into one hash; +A mimetype based link chain red sea file/package manager model aggregates into one hash; - "RandomHashKey" Some random app - "XHTML7HashKey" Some static documents - "OtherHashKey" One music album @@ -105,6 +105,7 @@ Mentat training goals; * Learn LR dutch language and culture * Learn RL hebrew based numbers * Learn the GLYPH china key value (nozero) +* Brainspeed overclocking [JewishDirectMemoryAccess](https://www.youtube.com/watch?v=Hzz2Qo0pX3w) error results * Run mental simulation in FTL etherspace True coders have fake love with an human partner because they love the machine by heart. diff --git a/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java b/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java index 45524746..4b1bd2c1 100644 --- a/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java +++ b/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java @@ -10,7 +10,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer; -import love.distributedrebirth.unicode4d.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRenderer { @@ -58,7 +58,7 @@ public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRendere String selectedItem = items[selectedNumberGlyph.get()]; BaseGlyphSet baseNumber = BaseGlyphSet.valueOf(selectedItem); if (changedLoc) { - valueLoc = baseNumber.BȍőnPrintNumber10(valueNum, 9999999); + valueLoc = baseNumber.BȍőnPrintNumber10(valueNum); } ImGui.text("Value:"); @@ -68,7 +68,7 @@ public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRendere if (value.length() > 8) { value = "0"; // dirty limit for parseInt - valueLoc = baseNumber.BȍőnPrintNumber10(Integer.parseInt(value), 9999999); + valueLoc = baseNumber.BȍőnPrintNumber10(Integer.parseInt(value)); } if (ImGui.button(baseNumber.BȍőnNumber10().BȍőnCharFor(7), buttonSize, buttonSize)) { @@ -173,7 +173,7 @@ public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRendere } int v2 = Integer.parseInt(value); if (valueArg.isEmpty()) { - valueLoc = baseNumber.BȍőnPrintNumber10(v2, 9999999); + valueLoc = baseNumber.BȍőnPrintNumber10(v2); return; } int v1 = Integer.parseInt(valueArg); @@ -197,7 +197,7 @@ public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRendere } valueNum = result; value = "" + valueNum; - valueLoc = baseNumber.BȍőnPrintNumber10(valueNum, 9999999); + valueLoc = baseNumber.BȍőnPrintNumber10(valueNum); } } } diff --git a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoGlyphSetDeskApp.java b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoGlyphSetDeskApp.java index ca8151c7..e9be718f 100644 --- a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoGlyphSetDeskApp.java +++ b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoGlyphSetDeskApp.java @@ -9,7 +9,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer; -import love.distributedrebirth.unicode4d.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class DemoGlyphSetDeskApp extends AbstractDeskApp { diff --git a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoNumberPartDeskApp.java b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoNumberPartDeskApp.java index f7fc71a1..643edf64 100644 --- a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoNumberPartDeskApp.java +++ b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoNumberPartDeskApp.java @@ -18,7 +18,7 @@ import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt2ʸᴰ; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt3ʸᴰ; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt4ʸᴰ; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ; -import love.distributedrebirth.unicode4d.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class DemoNumberPartDeskApp extends AbstractDeskApp implements DeskAppRenderer { diff --git a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java index 3659a9cd..6a43f8fe 100644 --- a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java +++ b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java @@ -12,7 +12,7 @@ import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer; -import love.distributedrebirth.unicode4d.UnicodePlaneᶻᴰ; +import love.distributedrebirth.numberxd.unicode.UnicodePlane; import love.distributedrebirth.unicode4d.draw.DrawCharacter; import love.distributedrebirth.unicode4d.draw.ImCharacter; @@ -45,7 +45,7 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR ImGui.tableSetupColumn(getTxt("colPlane")); ImGui.tableSetupColumn(getTxt("colText")); ImGui.tableHeadersRow(); - for (UnicodePlaneᶻᴰ plane:UnicodePlaneᶻᴰ.values()) { + for (UnicodePlane plane:UnicodePlane.values()) { ImGui.tableNextRow(); ImGui.tableNextColumn(); ImGui.text(plane.name()); diff --git a/gdxapp4d-app-hewallet/src/main/java/love/distributedrebirth/gdxapp4d/app/hewallet/HeWalletDeskApp.java b/gdxapp4d-app-hewallet/src/main/java/love/distributedrebirth/gdxapp4d/app/hewallet/HeWalletDeskApp.java index cc0cda42..af045499 100644 --- a/gdxapp4d-app-hewallet/src/main/java/love/distributedrebirth/gdxapp4d/app/hewallet/HeWalletDeskApp.java +++ b/gdxapp4d-app-hewallet/src/main/java/love/distributedrebirth/gdxapp4d/app/hewallet/HeWalletDeskApp.java @@ -1,19 +1,53 @@ package love.distributedrebirth.gdxapp4d.app.hewallet; +import java.util.ArrayList; +import java.util.List; + import imgui.ImGui; import imgui.flag.ImGuiTableFlags; +import imgui.type.ImInt; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer; import love.distributedrebirth.numberxd.Gê̄ldGetậl; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.SourceGlyphCharSet; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class HeWalletDeskApp extends AbstractDeskApp implements DeskAppRenderer { + private final List walletData = new ArrayList(); + private final List paymentData = new ArrayList(); + private final ImInt selectedNumberGlyph = new ImInt(); + private final ImInt selectedSourceGlyph = new ImInt(); + public void create() { getContours().setTitle("Hebrew Wallet"); getContours().registrateContour(DeskAppContourSection.MAIN, this); + + String[] walletDataExample = { + "יהוה","יְסוֺד","ה","מ","מָ","ח","חֱ","חֱ‎מָא", + "א","בד","ב","ד","ץףן", + "הזפץ","מספר","צצצצ","ץאאא","ץאא","דואר" + }; + String[] paymentDataExample = { + "מִזְ","מ֗וֹר","לְאָ֫","סָ֥ף","אֱלֹ","הִ֗ים","נִצָּ֥ב","בַּֽעֲדַ","ת־","אֵ֑ל","בְּקֶ֖","רֶב","אֱלֹ","הִ֣ים","יִשְׁ","פֹּֽט", + "עַד־","מָתַ֣י","תִּ","שְׁפְּ","טוּ־","עָ֑וֶל","וּפְנֵ֥י","רְ֜שָׁ","עִ֗ים","תִּשְׂ","אוּ־סֶֽ","לָה", + "שִׁפְט","וּ־דָ֥ל","וְיָת֑","וֹם","עָנִ֖י","וָרָ֣שׁ","הַצְדִּֽ","יקוּ", + "פַּלְּט","וּ־דַ֣ל","וְאֶבְ","י֑וֹן","מִיַּ֖ד","רְשָׁ","עִ֣ים","הַצִּֽ","ילוּ", + "לֹ֚יָֽ","דְע֨וּ","וְלֹ֬א","יָבִ֗","ינוּ","בַּֽחֲ","שֵׁכָ֥ה","יִתְהַ","לָּ֑כוּ","יִ֜מּ֗","וֹטוּ","כָּל־מ֥","וֹסְדֵי","אָֽרֶץ", + "אֲֽנִ֣י","אָ֖מַ","רְתִּי","אֱלֹ","הִ֣ים","אַתֶּ֑ם","וּבְנֵ֖י","עֶלְ","י֣וֹן","כֻּלְּ","כֶֽם", + "אָכֵ֥ן","כְּאָ","דָ֣ם","תְּמוּ","ת֑וּן","וּכְאַ","חַ֖ד","הַשָּׂ","רִ֣ים","תִּפֹּֽ","לוּ", + "קוּ","מָ֣ה","אֱ֖לֹ","הִים","שָׁפְ","טָ֣ה","הָאָ֑","רֶץ","כִּֽי־","אַתָּ֥ה","תִ֜נְ", + "חַ֗ל","בְּכָל","־הַגּ","וֹיִֽם", + }; + for (String data:walletDataExample) { + walletData.add(data); + } + for (String data:paymentDataExample) { + paymentData.add(data); + } } @Override @@ -22,21 +56,39 @@ public class HeWalletDeskApp extends AbstractDeskApp implements DeskAppRenderer ImGui.sameLine(); ImGui.text("0000"); ImGui.separator(); - if (ImGui.button("Pay")) { + + List bases = new ArrayList<>(); + for (BaseGlyphSet base:BaseGlyphSet.values()) { + bases.add(base.name()); + } + String[] items = new String[bases.size()]; + items = bases.toArray(items); + ImGui.combo("GlyphType", selectedNumberGlyph, items); + String selectedItem = items[selectedNumberGlyph.get()]; + BaseGlyphSet baseNumber = BaseGlyphSet.valueOf(selectedItem); + + + List bases2 = new ArrayList<>(); + for (SourceGlyphCharSet base2:SourceGlyphCharSet.values()) { + bases2.add(base2.name()); + } + String[] items2 = new String[bases2.size()]; + items2 = bases2.toArray(items2); + ImGui.combo("SourceType", selectedSourceGlyph, items2); + String selectedItem2 = items2[selectedSourceGlyph.get()]; + SourceGlyphCharSet sourceCharset = SourceGlyphCharSet.valueOf(selectedItem2); + + if (!paymentData.isEmpty() && ImGui.button("Pay" )) { + walletData.add(paymentData.remove(0)); } int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV | ImGuiTableFlags.Resizable; ImGui.beginTable("wallet", 4, flags); ImGui.tableSetupColumn("In/Out"); - ImGui.tableSetupColumn("AmountRaw"); - ImGui.tableSetupColumn("AmountFix"); + ImGui.tableSetupColumn("Amount"); + ImGui.tableSetupColumn("Fraction"); ImGui.tableSetupColumn("Decimal"); ImGui.tableHeadersRow(); - String[] walletData = { - "ה","מ","מָ","ח","חֱ","חֱ‎מָא", - "א","בד","ב","ד","ץףן", - "הזפץ","מספר","צצצצ","ץאאא","דואר" - }; for (String data:walletData) { Gê̄ldGetậl geld = new Gê̄ldGetậl(data); Gê̄ldGetậl geld2 = geld.toClone(); // unit test @@ -44,11 +96,11 @@ public class HeWalletDeskApp extends AbstractDeskApp implements DeskAppRenderer ImGui.tableNextColumn(); ImGui.text(data.length()==2||data.length()==3?"OUT":"IN"); ImGui.tableNextColumn(); - ImGui.text(data); - ImGui.tableNextColumn(); ImGui.text(geld2.toHebrewString(true)); // true=reverse for ImGui ImGui.tableNextColumn(); - ImGui.text(Double.toString(geld.getTotalDecimalValue())); + ImGui.text(geld2.toFractionNotation(baseNumber, sourceCharset)); + ImGui.tableNextColumn(); + ImGui.text(Double.toString(geld.toDecimalValue())); } ImGui.endTable(); } diff --git a/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java b/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java index b1448c91..3f16562e 100644 --- a/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java +++ b/gdxapp4d-app-notepad/src/main/java/love/distributedrebirth/gdxapp4d/app/notepad/NotepadDeskApp.java @@ -1,21 +1,58 @@ package love.distributedrebirth.gdxapp4d.app.notepad; +import java.util.Random; + +import imgui.ImDrawList; import imgui.ImGui; +import imgui.ImVec2; +import imgui.type.ImInt; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection; import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer; +import love.distributedrebirth.numberxd.unicode.UnicodePlane; +import love.distributedrebirth.unicode4d.draw.DrawCharacter; import love.distributedrebirth.unicode4d.draw.ImCharacter; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class NotepadDeskApp extends AbstractDeskApp implements DeskAppRenderer { private final VrGem4Unicode4DService unicode4DService; - private String value = ""; + private final int gridWidth = 120; + private final int gridHeight = 40; + private final String gridChars; + private final int[][] gridBuffer; + private final int[] gridRank; + private final Random random; + private int runCounter; + private final ImInt runSpeed = new ImInt(30); + private final static UnicodePlane[] GRID_PLANES = { + UnicodePlane.BRAHMI, + UnicodePlane.UGARITIC, + UnicodePlane.BAMUM_SUPPLEMENT, + UnicodePlane.TAI_XUAN_JING_SYMBOLS + }; public NotepadDeskApp(VrGem4Unicode4DService unicode4DService) { this.unicode4DService = unicode4DService; + this.gridBuffer = new int[gridHeight][gridWidth]; + this.gridRank = new int[gridWidth]; + this.random = new Random(); + for (int y=0; y0; x--) { + for (int y=0; y0?(random.nextInt(100)<70? charSelect:' '):(random.nextInt(100)<1? charSelect:' '); + gridBuffer[0][y] = charRandom; + if (gridBuffer[0][y]==' ') { + gridRank[y] = 0; + } else { + gridRank[y]++; + } + } } } diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/Gê̄ldGetậl.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/Gê̄ldGetậl.java index 5a987732..642749d9 100644 --- a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/Gê̄ldGetậl.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/Gê̄ldGetậl.java @@ -4,16 +4,19 @@ import java.util.ArrayList; import java.util.List; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.bassboonyd.BãßBȍőnConstantsʸᴰ; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; import love.distributedrebirth.numberxd.base2t.part.T04PartQuad; import love.distributedrebirth.numberxd.base2t.type.V009Tyte; import love.distributedrebirth.numberxd.base2t.type.V036Teger; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.SourceGlyph; +import love.distributedrebirth.numberxd.unicode.SourceGlyphCharSet; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class Gê̄ldGetậl extends AbstractBaseGetậlMatrix1 { private final V036Teger value; - private final double totalDecimalValue; private static final Character LEFT_TO_RIGHT_MARK = 0x200E; private static final Character RIGHT_TO_LEFT_MARK = 0x200F; @@ -23,7 +26,6 @@ public class Gê̄ldGetậl extends AbstractBaseGetậlMatrix1 { +public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ { // TODO: Move this into unicode4D and TyyPartXxx LATIN_BASIC( @@ -94,7 +94,7 @@ public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); - public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } + private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); + public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } private BaseGlyphSet(BaseGlyphSetNumber numbers) { this(numbers, null, null); @@ -164,31 +164,31 @@ public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ","\uE33A", "〉"), + + PART_EXT_ARRAY_BEGIN("˧[","\uE258", "⦗ "), + PART_EXT_ARRAY_CLOSE("]꜔","\uE25D", "⦘"), + PART_EXT_BLOCK_BEGIN("˧{","\uE259", "【"), + PART_EXT_BLOCK_CLOSE("}꜔","\uE25C", "】"), + PART_EXT_TAG_BEGIN("˧<","\uE255", "《"), + PART_EXT_TAG_CLOSE(">꜔","\uE256", "》"), + ; + + private final String charLatin; + private final String charHiero; + private final String charChina; + + private SourceGlyph(String charLatin, String charHiero, String charChina) { + this.charLatin = charLatin; + this.charHiero = charHiero; + this.charChina = charChina; + } + + public String getCharLatin() { + return charLatin; + } + + public String getCharHiero() { + return charHiero; + } + + public String getCharChina() { + return charChina; + } +} diff --git a/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/SourceGlyphCharSet.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/SourceGlyphCharSet.java new file mode 100644 index 00000000..26f64146 --- /dev/null +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/SourceGlyphCharSet.java @@ -0,0 +1,26 @@ +package love.distributedrebirth.numberxd.unicode; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") +public enum SourceGlyphCharSet { + + LATIN, + HIERO, + CHINA, + ; + + public String print(SourceGlyph ugs) { + if (this == HIERO) { + StringBuilder buf = new StringBuilder(); + buf.append("\u2006"); // TODO: find better hiero font + buf.append(ugs.getCharHiero()); + buf.append("\u2006"); + return buf.toString(); + } + if (this == CHINA) { + return ugs.getCharChina(); + } + return ugs.getCharLatin(); + } +} diff --git a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/UnicodePlaneᶻᴰ.java b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/UnicodePlane.java similarity index 97% rename from gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/UnicodePlaneᶻᴰ.java rename to gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/UnicodePlane.java index 7b007b0e..3ca09e22 100644 --- a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/UnicodePlaneᶻᴰ.java +++ b/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/unicode/UnicodePlane.java @@ -1,9 +1,9 @@ -package love.distributedrebirth.unicode4d; +package love.distributedrebirth.numberxd.unicode; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") -public enum UnicodePlaneᶻᴰ { +public enum UnicodePlane { // =========== PLANE 0 @@ -369,11 +369,11 @@ public enum UnicodePlaneᶻᴰ { private final int stop; private final boolean leftToRight; - private UnicodePlaneᶻᴰ(int start, int stop) { + private UnicodePlane(int start, int stop) { this(start, stop, true); } - private UnicodePlaneᶻᴰ(int start, int stop, boolean leftToRight) { + private UnicodePlane(int start, int stop, boolean leftToRight) { this.start = start; this.stop = stop; this.leftToRight = leftToRight; @@ -395,12 +395,12 @@ public enum UnicodePlaneᶻᴰ { return getStart() < 0xFFFF; } - public static UnicodePlaneᶻᴰ valueOfUnicode(int unicode) { - for (UnicodePlaneᶻᴰ value:values()) { + public static UnicodePlane valueOfUnicode(int unicode) { + for (UnicodePlane value:values()) { if (unicode >= value.getStart() && unicode <= value.getStop()) { return value; } } - return UnicodePlaneᶻᴰ.UNKNOWN; + return UnicodePlane.UNKNOWN; } } diff --git a/gdxapp4d-lib-numberxd/src/test/java/love/distributedrebirth/numberxd/Gê̄ldGetậlTest.java b/gdxapp4d-lib-numberxd/src/test/java/love/distributedrebirth/numberxd/Gê̄ldGetậlTest.java new file mode 100644 index 00000000..f63483ef --- /dev/null +++ b/gdxapp4d-lib-numberxd/src/test/java/love/distributedrebirth/numberxd/Gê̄ldGetậlTest.java @@ -0,0 +1,29 @@ +package love.distributedrebirth.numberxd; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; + +@BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") +public class Gê̄ldGetậlTest { + + @Test + public void testHebrewAliases() { + String[] paymentDataExample = { + "מִזְ","מ֗וֹר","לְאָ֫","סָ֥ף","אֱלֹ","הִ֗ים","נִצָּ֥ב","בַּֽעֲדַ","ת־","אֵ֑ל","בְּקֶ֖","רֶב","אֱלֹ","הִ֣ים","יִשְׁ","פֹּֽט", + "עַד־","מָתַ֣י","תִּ","שְׁפְּ","טוּ־","עָ֑וֶל","וּפְנֵ֥י","רְ֜שָׁ","עִ֗ים","תִּשְׂ","אוּ־סֶֽ","לָה", + "שִׁפְט","וּ־דָ֥ל","וְיָת֑","וֹם","עָנִ֖י","וָרָ֣שׁ","הַצְדִּֽ","יקוּ", + "פַּלְּט","וּ־דַ֣ל","וְאֶבְ","י֑וֹן","מִיַּ֖ד","רְשָׁ","עִ֣ים","הַצִּֽ","ילוּ", + "לֹ֚יָֽ","דְע֨וּ","וְלֹ֬א","יָבִ֗","ינוּ","בַּֽחֲ","שֵׁכָ֥ה","יִתְהַ","לָּ֑כוּ","יִ֜מּ֗","וֹטוּ","כָּל־מ֥","וֹסְדֵי","אָֽרֶץ", + "אֲֽנִ֣י","אָ֖מַ","רְתִּי","אֱלֹ","הִ֣ים","אַתֶּ֑ם","וּבְנֵ֖י","עֶלְ","י֣וֹן","כֻּלְּ","כֶֽם", + "אָכֵ֥ן","כְּאָ","דָ֣ם","תְּמוּ","ת֑וּן","וּכְאַ","חַ֖ד","הַשָּׂ","רִ֣ים","תִּפֹּֽ","לוּ", + "קוּ","מָ֣ה","אֱ֖לֹ","הִים","שָׁפְ","טָ֣ה","הָאָ֑","רֶץ","כִּֽי־","אַתָּ֥ה","תִ֜נְ", + "חַ֗ל","בְּכָל","־הַגּ","וֹיִֽם", + }; + for (String data:paymentDataExample) { + Gê̄ldGetậl geld = new Gê̄ldGetậl(data); + Assertions.assertNotNull(geld.toHebrewString()); + } + } +} diff --git a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java b/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java index a4572c69..e7bf5381 100644 --- a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java +++ b/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java @@ -13,9 +13,10 @@ import love.distributedrebirth.unicode4d.draw.DrawGlyphPath.ImGlyphQuadCurveTo; public class ImCharacter { public static final float HEIGHT = 26f; + public static final float WIDTH = 22f; public static final float MARGIN_MENUBAR = 4f; - private static final ImVec2 SIZE = new ImVec2(22f, HEIGHT); - private static final int COLOR = ImColor.intToColor(255, 255, 255, 255); + private static final ImVec2 SIZE = new ImVec2(WIDTH, HEIGHT); + private static final int DEFAULT_COLOR = ImColor.intToColor(255, 255, 255, 255); public static void render(DrawCharacter drawChar) { ImGui.invisibleButton("canvas", SIZE.x, SIZE.y); @@ -23,10 +24,13 @@ public class ImCharacter { ImVec2 p1 = ImGui.getItemRectMax(); // p1 = p0 + size ImDrawList drawList = ImGui.getWindowDrawList(); drawList.pushClipRect(p0.x, p0.y, p1.x, p1.y); - - // draw unicode4D - float xOff = p0.x; - float yOff = p0.y + 19f; + drawUnicode4D(drawChar, p0.x, p0.y, DEFAULT_COLOR, drawList); + drawList.popClipRect(); + } + + public static void drawUnicode4D(DrawCharacter drawChar, float posX, float posY, int color, ImDrawList drawList) { + float xOff = posX; + float yOff = posY + 19f; float yFlip = -1f; float scale = 0.0199f; if (drawChar.getyMax() > 900) { @@ -47,7 +51,7 @@ public class ImCharacter { yOff+prev.getY()*scale*yFlip, xOff+lineTo.getX()*scale, yOff+lineTo.getY()*scale*yFlip, - COLOR); + color); prev = cmd; continue; } @@ -60,7 +64,7 @@ public class ImCharacter { yOff+quadCurveTo.getY1()*scale*yFlip, xOff+quadCurveTo.getX()*scale, yOff+quadCurveTo.getY()*scale*yFlip, - COLOR, + color, 1); prev = cmd; continue; @@ -71,11 +75,8 @@ public class ImCharacter { yOff+prev.getY()*scale*yFlip, xOff+first.getX()*scale, yOff+first.getY()*scale*yFlip, - COLOR); + color); } } - //drawList.addQuad(p0.x, p0.y, p0.x+size.x, p0.y, p1.x, p1.y, p0.x, p0.y+size.y, - // ImColor.intToColor(127, 127, 255, 255), 1f); - drawList.popClipRect(); } -} \ No newline at end of file +} diff --git a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java index 777bb09e..4a9faa52 100644 --- a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java +++ b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java @@ -18,6 +18,7 @@ import org.xml.sax.XMLReader; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.numberxd.base2t.part.T02PartBinary; import love.distributedrebirth.numberxd.base2t.type.V072Tong; +import love.distributedrebirth.numberxd.unicode.UnicodePlane; import love.distributedrebirth.unicode4d.atlas.FontAtlas; import love.distributedrebirth.unicode4d.atlas.FontAtlasDriver; import love.distributedrebirth.unicode4d.atlas.FontAtlasStore; @@ -144,7 +145,7 @@ public class TestConvFont { private boolean startPoint = false; private V072Tong point = null; private int unicode = -1; - private UnicodePlaneᶻᴰ unicodePlane2; + private UnicodePlane unicodePlane2; public FontContentHandler(FontAtlasStore fontStore, String inputName) { @@ -222,7 +223,7 @@ public class TestConvFont { unicodeStr = unicodeStr.substring(7); } unicode = Integer.parseInt(unicodeStr, 16); - unicodePlane2 = UnicodePlaneᶻᴰ.valueOfUnicode(unicode); + unicodePlane2 = UnicodePlane.valueOfUnicode(unicode); int xMax = Integer.parseInt(atts.getValue("xMax")); int yMax = Integer.parseInt(atts.getValue("yMax")); int xMin = Integer.parseInt(atts.getValue("xMin")); diff --git a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestSwingPlane.java b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestSwingPlane.java index 3bda3809..686ba30f 100644 --- a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestSwingPlane.java +++ b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestSwingPlane.java @@ -10,6 +10,7 @@ import javax.swing.JTable; import javax.swing.SwingUtilities; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import love.distributedrebirth.numberxd.unicode.UnicodePlane; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") public class TestSwingPlane extends JPanel { @@ -21,10 +22,10 @@ public class TestSwingPlane extends JPanel { String[] columnNames = { "Plane", "Example"}; - Object[][] data = new Object[UnicodePlaneᶻᴰ.values().length][2]; + Object[][] data = new Object[UnicodePlane.values().length][2]; int x=0; - for (UnicodePlaneᶻᴰ plane:UnicodePlaneᶻᴰ.values()) { + for (UnicodePlane plane:UnicodePlane.values()) { data[x][0] = plane.name(); StringBuilder buf = new StringBuilder(); int offset = 33; diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java index 770465fe..f5bc656e 100644 --- a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java @@ -107,8 +107,9 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ screenClass) { + public T selectScreen(Class screenClass) { Screen screen = screens.get(screenClass); if (screen == null) { throw new NullPointerException("Unknow screen: "+screenClass); @@ -120,5 +121,6 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ screenClass); + T selectScreen(Class screenClass); } diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java index 8a1ec641..6fdbb977 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/GDXAppVrGem4Activator.java @@ -35,7 +35,7 @@ import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService; import love.distributedrebirth.numberxd.base2t.Base2PartsFactory; import love.distributedrebirth.numberxd.base2t.Base2Terminator; import love.distributedrebirth.numberxd.base2t.Base2WarpCore; -import love.distributedrebirth.unicode4d.BaseGlyphSet; +import love.distributedrebirth.numberxd.unicode.BaseGlyphSet; import love.distributedrebirth.warpme.ship.WaterShipOcean; @BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppController.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppController.java index 16eae8d4..3fc0f47c 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppController.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppController.java @@ -34,6 +34,9 @@ public class DeskAppController { public void removeDeskApp(DeskApp deskApp) { deskApps.remove(deskApp); + if (currentDeskApp == deskApp) { + currentDeskApp = null; + } } public List getDeskApps() { diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskTopScreenMenu.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskTopScreenMenu.java index 478caba6..dc6d0fd3 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskTopScreenMenu.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskTopScreenMenu.java @@ -55,13 +55,32 @@ public class DeskTopScreenMenu { } private void renderSelfMenu(DeskTopScreen appScreen, DeskApp deskApp) { - if (ImGui.beginMenu(deskApp.getContours().getTitle())) {; + if (ImGui.beginMenu(deskApp.getContours().getTitle())) { if (ImGui.menuItem(FontAwesomeIcons.FolderMinus + " Minimize", "", fileMinimizeSelected, deskApp != null )) { fileMinimizeSelected.set(false); if (deskApp != null) { appScreen.getDeskAppController().setCurrentDeskApp(null); } } + if (ImGui.beginMenu(FontAwesomeIcons.WindowRestore + " Move")) { + if (ImGui.menuItem("Desktop1", "", false, !(appScreen instanceof ScreenDesktop1))) { + appScreen.getDeskAppController().removeDeskApp(deskApp); + terminal.selectScreen(ScreenDesktop1.class).getDeskAppController().addDeskApp(deskApp); + } + if (ImGui.menuItem("Desktop2", "", false, !(appScreen instanceof ScreenDesktop2))) { + appScreen.getDeskAppController().removeDeskApp(deskApp); + terminal.selectScreen(ScreenDesktop2.class).getDeskAppController().addDeskApp(deskApp); + } + if (ImGui.menuItem("Desktop3", "", false, !(appScreen instanceof ScreenDesktop3))) { + appScreen.getDeskAppController().removeDeskApp(deskApp); + terminal.selectScreen(ScreenDesktop3.class).getDeskAppController().addDeskApp(deskApp); + } + if (ImGui.menuItem("Desktop4", "", false, !(appScreen instanceof ScreenDesktop4))) { + appScreen.getDeskAppController().removeDeskApp(deskApp); + terminal.selectScreen(ScreenDesktop4.class).getDeskAppController().addDeskApp(deskApp); + } + ImGui.endMenu(); + } if (ImGui.menuItem(FontAwesomeIcons.WindowClose + " Exit", "", fileCloseSelected, deskApp != null)) { fileCloseSelected.set(false); if (deskApp != null) { diff --git a/pom.xml b/pom.xml index c24024c4..73718e4a 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,7 @@ love.distributedrebirth.numberxd.base2t.part, love.distributedrebirth.numberxd.base2t.type, love.distributedrebirth.numberxd.base2t.typexl, + love.distributedrebirth.numberxd.unicode, love.distributedrebirth.numberxd.x4o, love.distributedrebirth.warpme, love.distributedrebirth.warpme.core,