FC18: Moved salah sequence enum to zion flame support package

This commit is contained in:
Willem Cazander 2025-09-05 16:46:28 +02:00
parent 531868df39
commit 24ee669345
5 changed files with 15 additions and 12 deletions

View file

@ -40,7 +40,6 @@ import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash09;
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
import org.x4o.fc18.octal8.PrimordialOctal;
import org.x4o.fc18.zion7.FourCornerZion7Candlelier;
import org.x4o.fc18.zion7.FourCornerZion7SalahSequence;
import org.x4o.fc18.zion7.FourCornerZionStenoLexer;
import org.x4o.fc18.zion7.FourCornerZionStenoLexerSmoke;
import org.x4o.fc18.zion7.flame4.FCFlameFremanChocoBase8;
@ -48,6 +47,7 @@ import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase2;
import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase8;
import org.x4o.fc18.zion7.flame4.FCFlameFremanSignedBase2;
import org.x4o.fc18.zion7.flame4.FCFlameNumberTaste;
import org.x4o.fc18.zion7.flame4.FCFlameSalahSequence;
import org.x4o.fc18.zion7.flame4.FCFlameNumberGram;
/// Renders unicode from four corner 18 bit text.
@ -59,7 +59,7 @@ public class FourCornerUnicodeDisplay {
private boolean failPipeSmoke = false;
private boolean handleEscape = true;
private String renderSeperator = null;
private final Map<FourCornerZion7SalahSequence, Consumer<List<List<Integer>>>> escHandlers = new HashMap<>();
private final Map<FCFlameSalahSequence, Consumer<List<List<Integer>>>> escHandlers = new HashMap<>();
public FourCornerUnicodeDisplay(boolean failPipeSmoke, boolean handleEscape, String renderSeperator) {
this.failPipeSmoke = failPipeSmoke;
@ -67,7 +67,7 @@ public class FourCornerUnicodeDisplay {
this.renderSeperator = renderSeperator;
}
public FourCornerUnicodeDisplay withEscapeHandler(FourCornerZion7SalahSequence type, Consumer<List<List<Integer>>> handler) {
public FourCornerUnicodeDisplay withEscapeHandler(FCFlameSalahSequence type, Consumer<List<List<Integer>>> handler) {
escHandlers.put(type, handler);
return this;
}
@ -306,7 +306,7 @@ public class FourCornerUnicodeDisplay {
}
@Override
public void strobeSalahSequence(FourCornerZion7SalahSequence type, List<List<Integer>> arguments) {
public void strobeSalahSequence(FCFlameSalahSequence type, List<List<Integer>> arguments) {
Consumer<List<List<Integer>>> handler = escHandlers.get(type);
if (handler != null) {
handler.accept(arguments);

View file

@ -31,6 +31,7 @@ import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase2;
import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase8;
import org.x4o.fc18.zion7.flame4.FCFlameFremanSignedBase2;
import org.x4o.fc18.zion7.flame4.FCFlameNumberTaste;
import org.x4o.fc18.zion7.flame4.FCFlameSalahSequence;
/// Handles the main four corner cake strobes.
///
@ -63,7 +64,7 @@ public interface FourCornerZion7Bereshit extends FourCornerZion7AlphaOmega {
void strobeSandWorm(List<PrimordialOctal> sandWalk, List<PrimordialOctal> sandSpice);
/// The external supported salah sequence strobes.
void strobeSalahSequence(FourCornerZion7SalahSequence type, List<List<Integer>> arguments);
void strobeSalahSequence(FCFlameSalahSequence type, List<List<Integer>> arguments);
interface Adapter extends FourCornerZion7Bereshit, FourCornerZion7AlphaOmega.Adapter {
@ -96,7 +97,7 @@ public interface FourCornerZion7Bereshit extends FourCornerZion7AlphaOmega {
}
@Override
default void strobeSalahSequence(FourCornerZion7SalahSequence type, List<List<Integer>> arguments) {
default void strobeSalahSequence(FCFlameSalahSequence type, List<List<Integer>> arguments) {
}
}
}

View file

@ -44,6 +44,7 @@ import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase8;
import org.x4o.fc18.zion7.flame4.FCFlameFremanSignedBase2;
import org.x4o.fc18.zion7.flame4.FCFlameFremanSuit;
import org.x4o.fc18.zion7.flame4.FCFlameNumberTaste;
import org.x4o.fc18.zion7.flame4.FCFlameSalahSequence;
import org.x4o.fc18.zion7.flame4.FCFlameNumberGram;
/// Write steno for zion.
@ -314,7 +315,7 @@ public class FourCornerZionStenoGrapher {
}
@Override
public void strobeSalahSequence(FourCornerZion7SalahSequence type, List<List<Integer>> arguments) {
public void strobeSalahSequence(FCFlameSalahSequence type, List<List<Integer>> arguments) {
Objects.requireNonNull(type);
Objects.requireNonNull(arguments);
int arguSize = arguments.size();
@ -331,7 +332,7 @@ public class FourCornerZionStenoGrapher {
}
}
}
if (FourCornerZion7SalahSequence.ESC_VT06.equals(type)) {
if (FCFlameSalahSequence.ESC_VT06.equals(type)) {
if (isSixBit) {
outAddAll(FCDotDEC2701DashPX0.ESC_VT06.baklavaPointSequence());
} else {

View file

@ -44,6 +44,7 @@ import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase2;
import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase8;
import org.x4o.fc18.zion7.flame4.FCFlameFremanSignedBase2;
import org.x4o.fc18.zion7.flame4.FCFlameNumberTaste;
import org.x4o.fc18.zion7.flame4.FCFlameSalahSequence;
import org.x4o.fc18.zion7.flame4.FCFlameNumberGram;
import org.x4o.fc18.zion7.flame4.FCFlameNumberSparklerSmoke;
@ -700,9 +701,9 @@ public class FourCornerZionStenoLexer implements FourCornerZionStenoPetroglyphs
return true; // point is eaten
}
if (FCDotDEC2701DashPX0.ESC_VT06.equals(cdcDECMode)) {
lexer.handler.strobeSalahSequence(FourCornerZion7SalahSequence.ESC_VT06, args);
lexer.handler.strobeSalahSequence(FCFlameSalahSequence.ESC_VT06, args);
} else {
lexer.handler.strobeSalahSequence(FourCornerZion7SalahSequence.values()[cdcDECMode.ordinal()], args); // todo: use fast enum
lexer.handler.strobeSalahSequence(FCFlameSalahSequence.values()[cdcDECMode.ordinal()], args); // todo: use fast enum
}
return true;
}

View file

@ -20,13 +20,13 @@
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.x4o.fc18.zion7;
package org.x4o.fc18.zion7.flame4;
/// The salah sequence strobe supported external types.
///
/// @author Willem Cazander
/// @version 1.0 Jan 11, 2025
public enum FourCornerZion7SalahSequence {
public enum FCFlameSalahSequence {
ESC_USER_1,
ESC_USER_2,