Skip to content

Commit 9809666

Browse files
Non-GS letter display for SC-8850.
Holy all non-capital glyphs in libre56 needs a redesign!
1 parent a6bfcec commit 9809666

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

src/disp/disp_sc8850.mjs

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,17 @@ let Sc8850Display = class extends RootDisplay {
310310
break;
311311
};
312312
};
313-
upThis.font56.getStr("123456789\x80\x81\x82\x83\x84\x85\x86").forEach((e0, i0) => {
314-
let offsetX = i0 * 6;
315-
e0.forEach((e1, i1) => {
316-
let pX = (i1 % 5) + offsetX + 49, pY = Math.floor(i1 / 5) + 49;
317-
if (e1) {
318-
upThis.#nmdb[pY * totalWidth + pX] = 255;
319-
};
313+
if (timeNow >= sum.letter.expire) {
314+
upThis.font56.getStr("123456789\x80\x81\x82\x83\x84\x85\x86").forEach((e0, i0) => {
315+
let offsetX = i0 * 6;
316+
e0.forEach((e1, i1) => {
317+
let pX = (i1 % 5) + offsetX + 49, pY = Math.floor(i1 / 5) + 49;
318+
if (e1) {
319+
upThis.#nmdb[pY * totalWidth + pX] = 255;
320+
};
321+
});
320322
});
321-
});
323+
};
322324
switch (upThis.#mode) {
323325
case "?":
324326
case "gs":
@@ -464,6 +466,31 @@ let Sc8850Display = class extends RootDisplay {
464466
flipBitsInBuffer(upThis.#nmdb, totalWidth, 48, 12, 97, 44);
465467
};
466468
};
469+
// Letter display
470+
if (timeNow < sum.letter.expire) {
471+
switch (upThis.#mode) {
472+
case "gs":
473+
case "sc": {
474+
break;
475+
};
476+
default: {
477+
fillBitsInBuffer(upThis.#nmdb, totalWidth, 48, 48, 97, 15, 0);
478+
//fillBitsInBuffer(upThis.#nmdb, totalWidth, 47, 47, 99, 1, 255);
479+
fillBitsInBuffer(upThis.#nmdb, totalWidth, 47, 63, 99, 1, 255);
480+
fillBitsInBuffer(upThis.#nmdb, totalWidth, 47, 47, 1, 16, 255);
481+
fillBitsInBuffer(upThis.#nmdb, totalWidth, 145, 47, 1, 16, 255);
482+
upThis.font56.getStr(sum.letter.text).forEach((e0, i0) => {
483+
let offsetX = (i0 & 15) * 6;
484+
e0.forEach((e1, i1) => {
485+
let pX = (i1 % 5) + offsetX + 49, pY = Math.floor(i1 / 5) + 49 + 7 * (i0 >> 4);
486+
if (e1) {
487+
upThis.#nmdb[pY * totalWidth + pX] = 255;
488+
};
489+
});
490+
});
491+
};
492+
};
493+
};
467494
// EFX and bank?
468495
if (upThis.device.getEffectSink()[upThis.#ch]) {
469496
let cx = 153, cy = 19;

0 commit comments

Comments
 (0)