FC18: prepared salt3 for duel bank octal select option feature letters
This commit is contained in:
parent
b964f97421
commit
53b9db8319
7 changed files with 95 additions and 55 deletions
|
|
@ -38,7 +38,7 @@ import org.x4o.fc18.cake2.FourCornerX00PetitVideCoinCarneFrapperRetrait;
|
|||
/// @version 1.0 Dec 22, 2024
|
||||
///
|
||||
public enum FCDotCDC1604DashP6 implements FourCornerDotColleZero33 {
|
||||
// [__NUL][_ESC6_X1][_ESC6_X2][_ESC6_X3] ‽¿!? <>[] (){}
|
||||
// [__NUL][_ESC6_X1][_ESC6_X2][_ESC6_X3] ‽¿?! <>[] (){}
|
||||
// ~+-* ,.:; '"`^ =#$%
|
||||
// |_\/ @ABC DEFG HIJK
|
||||
// LMNO PQRS TUVW XYZ&
|
||||
|
|
@ -57,12 +57,12 @@ public enum FCDotCDC1604DashP6 implements FourCornerDotColleZero33 {
|
|||
NS05_RAKA1_UPQUESTION('¿'),
|
||||
|
||||
/// Use 3 pepper marks, to spice up the escape sequences.
|
||||
NS06_PEPPER3_EXCLAMATION('!'),
|
||||
NS07_PEPPER3_QUESTION('?'),
|
||||
NS06_PEPPER3_QUESTION('?'),
|
||||
NS07_PEPPER3_EXCLAMATION('!'),
|
||||
|
||||
/// Suger Argument Lexer Token, to sweat up the escape sequences.
|
||||
NS08_SUGER1_COMPARE_LEFT('<'),
|
||||
NS09_SUGER1_COMPARE_RIGHT('>'), // TODO: make it suger3
|
||||
/// Use 3 Super Argument Lexer Token, to sweat up the escape sequences.
|
||||
NS08_SALT3_COMPARE_LEFT('<'),
|
||||
NS09_SALT3_COMPARE_RIGHT('>'),
|
||||
|
||||
/// Second set of number letters.
|
||||
NY27_SQUARE_LEFT('['),
|
||||
|
|
@ -202,40 +202,55 @@ public enum FCDotCDC1604DashP6 implements FourCornerDotColleZero33 {
|
|||
return cakePoint == NS01_ESC3_X1.cakePointDotIndex() || cakePoint == NS02_ESC3_X2.cakePointDotIndex() || cakePoint == NS03_ESC3_X3.cakePointDotIndex();
|
||||
}
|
||||
|
||||
static public boolean isEscapeSugerLeft(int cakePoint) {
|
||||
return cakePoint == NS08_SUGER1_COMPARE_LEFT.cakePointDotIndex();
|
||||
}
|
||||
|
||||
static public boolean isEscapeSugerRight(int cakePoint) {
|
||||
return cakePoint == NS09_SUGER1_COMPARE_RIGHT.cakePointDotIndex();
|
||||
}
|
||||
|
||||
static public boolean isEscapePepper(int cakePoint) {
|
||||
return cakePoint == NS06_PEPPER3_EXCLAMATION.cakePointDotIndex() || cakePoint == NS07_PEPPER3_QUESTION.cakePointDotIndex();
|
||||
return cakePoint == NS07_PEPPER3_EXCLAMATION.cakePointDotIndex() || cakePoint == NS06_PEPPER3_QUESTION.cakePointDotIndex();
|
||||
}
|
||||
|
||||
static public boolean isEscapeSalt(int cakePoint) {
|
||||
return cakePoint == NS08_SALT3_COMPARE_LEFT.cakePointDotIndex() || cakePoint == NS09_SALT3_COMPARE_RIGHT.cakePointDotIndex();
|
||||
}
|
||||
|
||||
static public int pepper3SequenceRead(FCDotCDC1604DashP6 msb, FCDotCDC1604DashP6 csb, FCDotCDC1604DashP6 lsb) {
|
||||
int c1 = msb == FCDotCDC1604DashP6.NS06_PEPPER3_EXCLAMATION?0:1;
|
||||
int c2 = csb == FCDotCDC1604DashP6.NS06_PEPPER3_EXCLAMATION?0:1;
|
||||
int c3 = lsb == FCDotCDC1604DashP6.NS06_PEPPER3_EXCLAMATION?0:1;
|
||||
int c1 = msb == FCDotCDC1604DashP6.NS07_PEPPER3_EXCLAMATION?1:0;
|
||||
int c2 = csb == FCDotCDC1604DashP6.NS07_PEPPER3_EXCLAMATION?1:0;
|
||||
int c3 = lsb == FCDotCDC1604DashP6.NS07_PEPPER3_EXCLAMATION?1:0;
|
||||
return (c1 << 2) + (c2 << 1) + (c3 << 0);
|
||||
}
|
||||
|
||||
static public List<Integer> pepper3SequenceWritePoints(int mode) {
|
||||
return pepper3SequenceWrite(mode).stream().map(v -> v.cakePointDotIndex()).toList();
|
||||
}
|
||||
|
||||
static public List<FCDotCDC1604DashP6> pepper3SequenceWrite(int mode) {
|
||||
static public List<Integer> pepper3SequenceWrite(List<Integer> out, int mode) {
|
||||
if (mode < 0) {
|
||||
throw new IllegalArgumentException("Negative pepper is illegal");
|
||||
}
|
||||
if (mode > 7) {
|
||||
throw new IllegalArgumentException("Pepper spray is only 3 bit");
|
||||
}
|
||||
return List.of(
|
||||
((mode >> 2) & 0b1)==0?NS06_PEPPER3_EXCLAMATION:NS07_PEPPER3_QUESTION,
|
||||
((mode >> 1) & 0b1)==0?NS06_PEPPER3_EXCLAMATION:NS07_PEPPER3_QUESTION,
|
||||
((mode >> 0) & 0b1)==0?NS06_PEPPER3_EXCLAMATION:NS07_PEPPER3_QUESTION
|
||||
);
|
||||
int pepperZero = NS06_PEPPER3_QUESTION.cakePointDotIndex();
|
||||
int pepperOne = NS07_PEPPER3_EXCLAMATION.cakePointDotIndex();
|
||||
out.add(((mode >> 2) & 0b1)==0?pepperZero:pepperOne);
|
||||
out.add(((mode >> 1) & 0b1)==0?pepperZero:pepperOne);
|
||||
out.add(((mode >> 0) & 0b1)==0?pepperZero:pepperOne);
|
||||
return out;
|
||||
}
|
||||
|
||||
static public int salt3SequenceRead(FCDotCDC1604DashP6 msb, FCDotCDC1604DashP6 csb, FCDotCDC1604DashP6 lsb) {
|
||||
int c1 = msb == FCDotCDC1604DashP6.NS09_SALT3_COMPARE_RIGHT?1:0;
|
||||
int c2 = csb == FCDotCDC1604DashP6.NS09_SALT3_COMPARE_RIGHT?1:0;
|
||||
int c3 = lsb == FCDotCDC1604DashP6.NS09_SALT3_COMPARE_RIGHT?1:0;
|
||||
return (c1 << 2) + (c2 << 1) + (c3 << 0);
|
||||
}
|
||||
|
||||
static public List<Integer> salt3SequenceWrite(List<Integer> out, int mode) {
|
||||
if (mode < 0) {
|
||||
throw new IllegalArgumentException("Negative salt is illegal");
|
||||
}
|
||||
if (mode > 7) {
|
||||
throw new IllegalArgumentException("Salt wash is only 3 bit");
|
||||
}
|
||||
int pepperZero = NS08_SALT3_COMPARE_LEFT.cakePointDotIndex();
|
||||
int pepperOne = NS09_SALT3_COMPARE_RIGHT.cakePointDotIndex();
|
||||
out.add(((mode >> 2) & 0b1)==0?pepperZero:pepperOne);
|
||||
out.add(((mode >> 1) & 0b1)==0?pepperZero:pepperOne);
|
||||
out.add(((mode >> 0) & 0b1)==0?pepperZero:pepperOne);
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public enum FCDotCMD5401Dash2D implements FourCornerX06BaklavaPointSequence, Fou
|
|||
|
||||
private FCDotCMD5401Dash2D(FCDotCDC1604DashP6 selector) {
|
||||
this.selector = Objects.requireNonNull(selector);
|
||||
if (selector.ordinal() <= FCDotCDC1604DashP6.NS09_SUGER1_COMPARE_RIGHT.ordinal()) {
|
||||
if (selector.ordinal() <= FCDotCDC1604DashP6.NS09_SALT3_COMPARE_RIGHT.ordinal()) {
|
||||
throw new IllegalArgumentException("Not used here to keep mind space free");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
|||
*/
|
||||
public enum FCDotINC0801DashP8 implements FourCornerX06BaklavaPointSequence, FourCornerX18CakePointSequence, FourCornerX18CakePointDotName {
|
||||
|
||||
// TODO: renumber add CDC1604 first ? and make it duel bank with salt AND pepper so print mixed case does not exit the escape sequence.
|
||||
|
||||
/// !!!
|
||||
/// Select LUA page 7A mode.
|
||||
INC_LUA0127_P7A(FourCornerDotCake.FC_LUA0127_P7A),
|
||||
|
|
@ -89,7 +91,7 @@ public enum FCDotINC0801DashP8 implements FourCornerX06BaklavaPointSequence, Fou
|
|||
public List<Integer> baklavaPointSequence() {
|
||||
List<Integer> result = new ArrayList<>();
|
||||
result.addAll(FCDotDEC2701DashPX0.ESC6_INC0801_P8.baklavaPointSequence());
|
||||
result.addAll(FCDotCDC1604DashP6.pepper3SequenceWritePoints(ordinal()));
|
||||
FCDotCDC1604DashP6.pepper3SequenceWrite(result, ordinal());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -792,20 +792,20 @@ public class FourCornerZionStenoLexer implements FourCornerZionStenoPetroglyphs
|
|||
if (cdcPoint >= FCDotCDC1604DashP6.NY27_SQUARE_LEFT.ordinal() && cdcPoint <= FCDotCDC1604DashP6.NY01_AT.ordinal()) {
|
||||
lexer.cdcDECModePie = FCDotCDC1604DashP6.NY01_AT.ordinal() - cdcPoint; // goto relative
|
||||
return true; // swallow button
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS06_PEPPER3_EXCLAMATION.ordinal()) {
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS07_PEPPER3_EXCLAMATION.ordinal()) {
|
||||
if (lexer.cdcDECModePie < 26) {
|
||||
lexer.cdcDECModePie++;
|
||||
}
|
||||
return true; // eat the up pepper
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS07_PEPPER3_QUESTION.ordinal()) {
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS06_PEPPER3_QUESTION.ordinal()) {
|
||||
if (lexer.cdcDECModePie > 0) {
|
||||
lexer.cdcDECModePie--;
|
||||
}
|
||||
return true; // eat the down suger
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS08_SUGER1_COMPARE_LEFT.ordinal()) {
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS08_SALT3_COMPARE_LEFT.ordinal()) {
|
||||
lexer.cdcDECModePieAlt = false;
|
||||
return true; // eat the left suger
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS09_SUGER1_COMPARE_RIGHT.ordinal()) {
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS09_SALT3_COMPARE_RIGHT.ordinal()) {
|
||||
lexer.cdcDECModePieAlt = true;
|
||||
return true; // eat the right suger
|
||||
} else if (cdcPoint == FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG.ordinal() || cdcPoint == FCDotCDC1604DashP6.NS05_RAKA1_UPQUESTION.ordinal()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue