diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Import.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Import.java index 2ce4e6c..fbc4a83 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Import.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Import.java @@ -36,36 +36,36 @@ import org.x4o.fc18.zion7.octal8.PrimordialOctalOrangeString; /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 public final class WarpManifestX18Import { - + private WarpManifestX18Import() { } - + static public WarpManifestX18 fromX8(WarpManifestX8 manifest) { WarpManifestX18Section sectionX18 = null; WarpManifestX18HeaderField fieldX18 = null; WarpManifestX18 result = new WarpManifestX18(); for (WarpManifestX8HeaderField attrX8 : manifest.getAttributes()) { - fieldX18 = result.makeAttribute(toX8(attrX8.getName()), toX8(attrX8.getBody())); + fieldX18 = result.makeAttribute(toFC8(attrX8.getName()), toFC8(attrX8.getBody())); for (String remark : attrX8.getRemarks()) { - fieldX18.withRemark(toX8(remark)); + fieldX18.withRemark(toFC8(remark)); } } for (WarpManifestX8Section sectionX8 : manifest.getSections()) { - sectionX18 = result.makeSection(toX8(sectionX8.getName())); + sectionX18 = result.makeSection(toFC8(sectionX8.getName())); for (String remark : sectionX8.getRemarks()) { - sectionX18.withRemark(toX8(remark)); + sectionX18.withRemark(toFC8(remark)); } for (WarpManifestX8HeaderField attrX8 : sectionX8.getAttributes()) { - fieldX18 = sectionX18.makeAttribute(toX8(attrX8.getName()), toX8(attrX8.getBody())); + fieldX18 = sectionX18.makeAttribute(toFC8(attrX8.getName()), toFC8(attrX8.getBody())); for (String remark : attrX8.getRemarks()) { - fieldX18.withRemark(toX8(remark)); + fieldX18.withRemark(toFC8(remark)); } } } return result; } - - static private PrimordialOctalOrangeJuiceStraw toX8(String value) { - return PrimordialOctalOrangeString.valueOfSmurfs(FourCornerUnicodeImport.lossy().convertToInt18(value)); + + static private PrimordialOctalOrangeJuiceStraw toFC8(String value) { + return PrimordialOctalOrangeString.ioSmurfReadListX18(FourCornerUnicodeImport.lossy().convertToFC18(value)); } } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeImport.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeImport.java index baeb57f..237be2d 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeImport.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeImport.java @@ -86,25 +86,20 @@ public class FourCornerUnicodeImport { return new FourCornerUnicodeImport(true, false, List.of(FCDotCDC1604DashP6.NS05_RAKA1_UPQUESTION)); // TODO: change } - @Deprecated - public List convertToInt18(String text) { - return convertToX18(text, new ArrayList<>(text.length())); + public List convertToFC6(String text) { + return convertToFC6(text, new ArrayList<>(text.length())); } - public List convertToX06(String text) { - return convertToX06(text, new ArrayList<>(text.length())); + public List convertToFC18(String text) { + return convertToFC18(text, new ArrayList<>(text.length())); } - public List convertToX18(String text) { - return convertToX18(text, new ArrayList<>(text.length())); - } - - public List convertToX06(String text, List out) { + public List convertToFC6(String text, List out) { convertToXXX(text, true, v -> out.add(v)); return out; } - public List convertToX18(String text, List out) { + public List convertToFC18(String text, List out) { convertToXXX(text, false, v -> out.add(v)); return out; } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java index ad28797..782cc5d 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java @@ -220,9 +220,9 @@ public enum FourCornerDotCake { // - no value owning numbers // - no colored symbols - FC_BMW0102_S2(1024 - 12, 2, "Binary Model Words, for bit 0 and bit 1 notation"), + FC_BMW0102_S2(1024 - 12, 2, "Binary Model Words, for binary in 1 bit"), FC_AMD0110_SA(1024 - 10, 10, "Application Methodoums Decimals, normal numbers"), - FC_IBM1616_H8(1024, 256, "Interim Byte Mode, custom HEX codes"), + FC_IBM1616_H8(1024, 256, "Interim Byte Mode, custom HEX codes in 8 bit"), FC_NES0127_9C(1280, 27, "Nigerian Extra Smile, hebrew gematria"), FC_WDC0109_S9(1307, 9, "Wholly Direct Counts, real postive numbers"), FC_SCO0106_S6(1316, 6, "Six Character Object"), @@ -230,7 +230,7 @@ public enum FourCornerDotCake { FC_NEC0105_S5(1325, 5, "New Endian Compass"), FC_W3C0107_S7(1330, 7, "Water 3th Color"), FC_UWU0101_S1(1337, 1, "Universal White Unidad, one slice for all space"), - FC_DNA0104_S4(1338, 4, "Direct Nuclear Air strike, of quadratonic values"), + FC_DNA0104_S4(1338, 4, "Direct Nuclear Air strike, of quadratonic values in 2 bit"), FC_ICL0126_9B(1342, 26, "Intentional Cookie Linker, for lowcase monsters"), FC_PDS6001_BC(1368, 60, "Personal Dating System, for babylonian cuneiform girls"), FC_SDS1201_AM(1428, 12, "Small Drowning Snow, for advanced missions outside"), diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerX18CakePointDotName.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerX18CakePointDotName.java index 1c3fae9..d968e64 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerX18CakePointDotName.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerX18CakePointDotName.java @@ -35,6 +35,6 @@ public interface FourCornerX18CakePointDotName extends FourCornerX00PetitVide { String name(); // copy name from internal enum value default List nameX18() { - return FourCornerUnicodeImport.strict().convertToX18(name()); + return FourCornerUnicodeImport.strict().convertToFC18(name()); } } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java index 462d0e1..eed94d7 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java @@ -142,7 +142,7 @@ public class FourCornerZionStenoGrapher { } } - private void outAddBankCake(int bankBits, BigInteger bankMask, int cakeSel0, int cakeBank, int bankStart, BigInteger value, IntConsumer pipe, Function overrideMsb) { + private void sliceBankCake(int bankBits, BigInteger bankMask, int cakeSel0, int cakeBank, int bankStart, BigInteger value, IntConsumer pipe, Function overrideMsb) { boolean strobePage = true; for (int i = bankStart; i >= 0; i--) { int bankValue = value.shiftRight(i * bankBits).and(bankMask).intValue(); @@ -164,7 +164,7 @@ public class FourCornerZionStenoGrapher { private void outAddBankCakeFC6(int bankBits, BigInteger bankMask,FCFlameFremanSuit suit, int bankStart, BigInteger value, Function overrideMsb) { outAddAll(suit.escapeSequenceFC6().baklavaPointSequence()); outAddAll(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), suit.ordinal())); - outAddBankCake(bankBits, bankMask, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, v -> { + sliceBankCake(bankBits, bankMask, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, v -> { if (v < suit.cakeOffsetBank()) { int sel0 = v - suit.cakeOffsetSel0(); outAdd(FCDotCDC1604DiceSaw.FACE_6NY.encodeOctal(sel0).baklavaPointDotIndex()); @@ -184,7 +184,7 @@ public class FourCornerZionStenoGrapher { if (outTongue.isSixBit()) { outAddBankCakeFC6(NCR_BANK8_BITS, BIG_BITS_8, suit, bankStart, value, overrideMsb); } else { - outAddBankCake(NCR_BANK8_BITS, BIG_BITS_8, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, out, overrideMsb); + sliceBankCake(NCR_BANK8_BITS, BIG_BITS_8, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, out, overrideMsb); } outFlush(); } @@ -193,13 +193,13 @@ public class FourCornerZionStenoGrapher { if (outTongue.isSixBit()) { outAddBankCakeFC6(NCR_BANK9_BITS, BIG_BITS_9, suit, bankStart, value, overrideMsb); } else { - outAddBankCake(NCR_BANK9_BITS, BIG_BITS_9, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, out, overrideMsb); + sliceBankCake(NCR_BANK9_BITS, BIG_BITS_9, suit.cakeOffsetSel0(), suit.cakeOffsetBank(), bankStart, value, out, overrideMsb); } outFlush(); } protected void outAddBankCake12(int cakeSel0, int cakeBank, int bankStart, BigInteger value, Function overrideMsb) { - outAddBankCake(NCR_BANK12_BITS, BIG_BITS_12, cakeSel0, cakeBank, bankStart, value, out, overrideMsb); + sliceBankCake(NCR_BANK12_BITS, BIG_BITS_12, cakeSel0, cakeBank, bankStart, value, out, overrideMsb); outFlush(); } @@ -338,7 +338,7 @@ public class FourCornerZionStenoGrapher { outAdd(FCDotCDC1604DiceSaw.FACE_3NX.encodeOctal(percentage).baklavaPointDotIndex()); outAdd(FCDotCDC1604DiceSaw.FACE_2NX.encodeOctal(percentage).baklavaPointDotIndex()); outAdd(FCDotCDC1604DiceSaw.FACE_1NX.encodeOctal(percentage).baklavaPointDotIndex()); - outAdd(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG.cakePointDotIndex()); + outAdd(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG.baklavaPointDotIndex()); } else { outAdd(FourCornerDotCake.FC_CLK4K_SPACE.getStart() + percentage); } diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/FourCornerUnicodeImportTest.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/FourCornerUnicodeImportTest.java index 9192027..c73ea32 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/FourCornerUnicodeImportTest.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/FourCornerUnicodeImportTest.java @@ -41,7 +41,7 @@ public class FourCornerUnicodeImportTest { @Test public void testAsciiUpper() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX06("FOOBAR"); + List cdc = FourCornerUnicodeImport.strict().convertToFC6("FOOBAR"); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); Assertions.assertEquals(6, cdc.size()); @@ -58,7 +58,7 @@ public class FourCornerUnicodeImportTest { @Test public void testAsciiLower() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX06("foobar"); + List cdc = FourCornerUnicodeImport.strict().convertToFC6("foobar"); Iterator cdi = cdc.iterator(); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); @@ -80,7 +80,7 @@ public class FourCornerUnicodeImportTest { @Test public void testAsciiMixedX06() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX06("fooBAR"); + List cdc = FourCornerUnicodeImport.strict().convertToFC6("fooBAR"); Iterator cdi = cdc.iterator(); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); @@ -106,7 +106,7 @@ public class FourCornerUnicodeImportTest { @Test public void testAsciiMixedX18() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX18("fooBAR"); + List cdc = FourCornerUnicodeImport.strict().convertToFC18("fooBAR"); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); Assertions.assertEquals(6, cdc.size()); // = 108 bit @@ -125,30 +125,30 @@ public class FourCornerUnicodeImportTest { @Test public void testCheckDiacritics() throws Exception { String foobar = "ꞘȍőḆẬř"; - List cdc = FourCornerUnicodeImport.lossy().convertToX06(foobar); + List cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); Assertions.assertEquals("FOOBAR", FourCornerUnicodeDisplay.text().renderFromInt18(cdc)); Assertions.assertThrows(IllegalArgumentException.class, () -> { - FourCornerUnicodeImport.strict().convertToX06(foobar); + FourCornerUnicodeImport.strict().convertToFC6(foobar); }); } @Test public void testCheckMissingChar() throws Exception { String foobar = "FOO\u5432\u5432\u5432"; - List cdc = FourCornerUnicodeImport.lossy().convertToX06(foobar); + List cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); Assertions.assertEquals("FOO¿¿¿", FourCornerUnicodeDisplay.text().renderFromInt18(cdc)); Assertions.assertThrows(IllegalArgumentException.class, () -> { - FourCornerUnicodeImport.strict().convertToX06(foobar); + FourCornerUnicodeImport.strict().convertToFC6(foobar); }); } @Test public void testNumberX06() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX06("01201337"); + List cdc = FourCornerUnicodeImport.strict().convertToFC6("01201337"); Iterator cdi = cdc.iterator(); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); @@ -172,7 +172,7 @@ public class FourCornerUnicodeImportTest { @Test public void testNumberX18() throws Exception { - List cdc = FourCornerUnicodeImport.strict().convertToX18("01201337"); + List cdc = FourCornerUnicodeImport.strict().convertToFC18("01201337"); Assertions.assertNotNull(cdc); Assertions.assertFalse(cdc.isEmpty()); Assertions.assertEquals(8, cdc.size()); @@ -191,7 +191,7 @@ public class FourCornerUnicodeImportTest { @Test public void testLineEndings() throws Exception { - List cdc = FourCornerUnicodeImport.lossy().convertToX06("A\nB\rC\r\nD\nE\u001B\u0085F\n\r\n\r\r\n"); + List cdc = FourCornerUnicodeImport.lossy().convertToFC6("A\nB\rC\r\nD\nE\u001B\u0085F\n\r\n\r\r\n"); Iterator cdi = cdc.iterator(); Assertions.assertNotNull(cdc); Assertions.assertTrue(cdi.hasNext()); @@ -220,7 +220,7 @@ public class FourCornerUnicodeImportTest { @Test public void testWhiteSpace() throws Exception { String space16 = "\u3000\u205F\u202F\u200A\u2009\u2008\u2007\u2006\u2005\u2004\u2003\u2002\u2001\u2000\u00A0\u0020"; - List cdc = FourCornerUnicodeImport.lossy().convertToX06(space16); + List cdc = FourCornerUnicodeImport.lossy().convertToFC6(space16); Iterator cdi = cdc.iterator(); Assertions.assertNotNull(cdc); Assertions.assertTrue(cdi.hasNext());