Skip to content

Commit

Permalink
1-second delay before booting animation.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jun 25, 2024
1 parent a04292c commit 17633fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/disp/disp_n5.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ let Ns5rDisplay = class extends RootDisplay {
upThis.#dumpData?.forEach((e, i) => {
upThis.#nmdb[i] = e ? upThis.#pixelLit : upThis.#pixelOff;
});
} else if (upThis.#bootFrame < 200 || upThis.#booted < 1) {
let frame = upThis.#bootFrame > 100 ? 1 : 0;
} else if (upThis.#bootFrame < 250 || upThis.#booted < 1) {
let frame = upThis.#bootFrame > 150 ? 1 : 0;
let data = upThis.bootBm.getBm(`boot_${frame}`);
if (data) {
if (upThis.#bootFrame < 200) {
if (upThis.#bootFrame < 50) {} else if (upThis.#bootFrame < 250) {
data.render((e, x, y) => {
let innerFrame = upThis.#bootFrame;
let innerFrame = upThis.#bootFrame - 50;
innerFrame -= frame * 100;
if (frame) {
if ((Math.abs(y - 13) << 2) < innerFrame) {
Expand Down
8 changes: 5 additions & 3 deletions src/disp/disp_sc8850.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ let Sc8850Display = class extends RootDisplay {
fullRefresh = true;
};
// Booted?
if (upThis.#booted > 0 && upThis.#bootFrame > 49) {
if (upThis.#booted > 0 && upThis.#bootFrame > 99) {
// Test SysEx status
if (upThis.#scheduledEx) {
upThis.#scheduledEx = false;
Expand Down Expand Up @@ -458,16 +458,18 @@ let Sc8850Display = class extends RootDisplay {
break;
};
};
} else {
} else if (upThis.#bootFrame > 49) {
let bootImage = upThis.bootBm?.getBm("boot_mr");
if (bootImage) {
bootImage.render((e, x, y) => {
upThis.#nmdb[x + 1 + (y + 1) * 160] = e ? 255 : 0;
});
upThis.#bootFrame ++;
};
} else {
upThis.#bootFrame ++;
};
if (upThis.#bootFrame > 49 && upThis.#booted < 2) {
if (upThis.#bootFrame > 99 && upThis.#booted < 2) {
let bootImage = upThis.bootBm?.getBm(`bs_${((upThis.#bootFrame - 50) >> 3) & 7}`);
if (bootImage) {
bootImage.render((e, x, y) => {
Expand Down

0 comments on commit 17633fb

Please sign in to comment.