Skip to content

Commit

Permalink
Max padding for letter displays are now 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Sep 23, 2023
1 parent 3966e2b commit dc535bc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ let OctaviaDevice = class extends CustomEventSource {
};
});
upThis.#letterExpire = Date.now() + 3200;
upThis.#letterDisp = upThis.#letterDisp.padEnd(32, " ");
upThis.#letterDisp = upThis.#letterDisp.padEnd(16, " ");
if (invalidCp) {
invalidCp = Array.from(invalidCp);
invalidCp.forEach((e, i, a) => {
Expand Down Expand Up @@ -2494,14 +2494,14 @@ let OctaviaDevice = class extends CustomEventSource {
// variation
commitSlot = 31;
}][key - 2] || (() => {
console.debug(`Unknown XG-style drum param ${key} on set ${drumId + 1}.`);
console.debug(`Unknown GS-style drum param ${key} on set ${drumId + 1}.`);
}))();
};
if (commitSlot > -1) {
getDebugState() && console.debug(drumOff, commitSlot, note, e);
upThis.#drum[(drumOff + dnToPos[commitSlot]) * allocated.dnc + note] = e;
} else {
getDebugState() && console.debug(`XG-style drum param ${key} has no writes.`);
getDebugState() && console.debug(`GS-style drum param ${key} has no writes.`);
};
});
};
Expand Down Expand Up @@ -2944,6 +2944,7 @@ let OctaviaDevice = class extends CustomEventSource {
// GS display letter
let offset = msg[1];
upThis.setLetterDisplay(msg.subarray(2), "GS display text", offset);
getDebugState() && console.debug(`GS display text "${upThis.#letterDisp}".`);
break;
};
case 32: {
Expand All @@ -2969,7 +2970,7 @@ let OctaviaDevice = class extends CustomEventSource {
upThis.#bitmapStore[realPage] = new Uint8Array(256);
};
let target = upThis.#bitmapStore[realPage];
getDebugState() && console.debug(`GS frame draw page ${realPage}.\n`);
getDebugState() && console.debug(`GS frame draw page ${realPage}.`);
let offset = msg[1] & 63;
target.fill(0); // Init
let workArr = msg.subarray(2);
Expand Down

0 comments on commit dc535bc

Please sign in to comment.