From ab80c81c9759b7d610bebd8c86bf751ad253384f Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 8 Sep 2025 13:04:07 +0200 Subject: [PATCH] FC18: Add missing sandworm offset of cake points (worked by alignment) --- .../java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java | 4 ++-- .../src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java index a33df97..bce55f9 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java @@ -471,9 +471,9 @@ public class FourCornerZionStenoLexer implements FourCornerZionStenoPetroglyphs for (int i = idxFirst; i <= idxLast; i++) { int cakePoint = lexer.input.get(i); if (cakePoint >= FourCornerDotCake.FC_SANDWALK_12.getStart() && cakePoint <= FourCornerDotCake.FC_SANDWALK_12.getStop()) { - sandWalk12.add(cakePoint); + sandWalk12.add(cakePoint - FourCornerDotCake.FC_SANDWALK_12.getStart()); } else { - sandSpice15.add(cakePoint); + sandSpice15.add(cakePoint - FourCornerDotCake.FC_SANDWORM_15.getStart()); } } List sandWalk = new ArrayList<>(); diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java index aac2fef..a128c43 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java @@ -91,9 +91,9 @@ public class StenoGrapherTest { for (int i=0;i<24;i++) { octalMine.add(PrimordialOctalSound.PART_1); } - writerX18.strobeSandWorm(octalMine, List.of(PrimordialOctalSound.PART_1, PrimordialOctalSound.PART_1, PrimordialOctalSound.PART_1, PrimordialOctalSound.PART_1, PrimordialOctalSound.PART_1)); + writerX18.strobeSandWorm(octalMine, List.of(PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8)); String res = FourCornerUnicodeDisplay.text().renderFromInt18(out); - Assertions.assertTrue(res.endsWith("00"), "missing " + res); + Assertions.assertTrue(res.endsWith("77"), "missing " + res); } //Test TODO: MOVE + fix java.io.IOException: Expected 9 bytes, got: 3 from PrimordialOctalOrangeString.ioSmurfReadStreamX8